Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Claude Context for openadapt-ml

## MANDATORY: Branches and Pull Requests

**NEVER push directly to main. ALWAYS use feature branches and pull requests.**

1. Create a feature branch: `git checkout -b feat/description` or `fix/description`
2. Make commits on the branch
3. Push the branch: `git push -u origin branch-name`
4. Create a PR: `gh pr create --title "..." --body "..."`
5. Only merge via PR (never `git push origin main`)

This is a hard rule with NO exceptions, even for "small" changes.

---

## Simplicity Guidelines

**Philosophy**: "Less is more. 80/20 impact/complexity. Working code beats elegant design."
Expand Down
9 changes: 4 additions & 5 deletions openadapt_ml/cloud/modal_cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@

import argparse
import json
import os
import subprocess
import sys
import tempfile
Expand Down Expand Up @@ -387,7 +386,9 @@ def infer(
text_content = msg["content"]
# Replace <image> tag in text with proper multi-modal format
if "<image>" in text_content:
text_content = text_content.replace("<image>\n", "").replace("<image>", "")
text_content = text_content.replace("<image>\n", "").replace(
"<image>", ""
)
msg["content"] = [
{"type": "image"},
{"type": "text", "text": text_content},
Expand All @@ -404,9 +405,7 @@ def infer(
text=[text], images=[image], return_tensors="pt", padding=True
)
else:
inputs = infer._processor(
text=[text], return_tensors="pt", padding=True
)
inputs = infer._processor(text=[text], return_tensors="pt", padding=True)

inputs = inputs.to(infer._model.device)

Expand Down