-
Notifications
You must be signed in to change notification settings - Fork 334
Support v1 raw multimodal image offload #2836
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
eligotts
wants to merge
27
commits into
main
Choose a base branch
from
feat/v1-raw-mm-offload
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 16 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
034e83e
Support v1 raw multimodal offload
eligotts b7903f6
Update raw image renderer pin
eligotts 6c0157a
Simplify v1 raw multimodal serving: always materialize refs
S1ro1 5ec8148
serving: use canonical split_raw_mm_ref + bump renderers pin
S1ro1 bcc93c2
Bump renderers pin (drop orphaned image_cache_max)
S1ro1 2c5af36
Merge remote-tracking branch 'origin/main' into feat/v1-raw-mm-offload
eligotts 75b9e7c
Bump raw image dependency pins
eligotts 99b590a
feat: support inline multimodal image storage
eligotts 3518763
fix: preserve launcher image asset env
eligotts f37ceac
Simplify raw multimodal offload path
eligotts a66f1b1
Merge remote-tracking branch 'origin/main' into feat/v1-raw-mm-offload
eligotts 80dc59f
Simplify raw multimodal validation
eligotts bf2bc8e
Clarify raw image asset env wiring
eligotts 805486f
Use URI-complete raw multimodal refs
eligotts 2f000f3
Merge branch 'main' into feat/v1-raw-mm-offload
eligotts dce2759
Drop raw multimodal descriptor version
eligotts 0b0f1fb
Bump verifiers raw multimodal client prep
eligotts d8218c3
Merge remote-tracking branch 'origin/main' into feat/v1-raw-mm-offload
eligotts d18ed10
Bump renderers for processed multimodal output
eligotts 0da60a8
Bump renderers lock cleanup
eligotts c7deb3b
Bump verifiers for main sync
eligotts 89fcbc1
Merge remote-tracking branch 'origin/main' into feat/v1-raw-mm-offload
eligotts 36b5042
fix: truncate raw multimodal refs safely
eligotts 53d9ed8
Tighten raw multimodal validation and trainer mm plumbing
eligotts a13a214
Bump renderers and verifiers for raw multimodal hardening
eligotts 7ea71a9
Merge remote-tracking branch 'origin/main' into feat/v1-raw-mm-offload
eligotts 1f290dc
Document multimodal offload monitoring in the monitor-run skill
eligotts File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Submodule renderers
updated
9 files
| +8 −9 | renderers/base.py | |
| +82 −109 | renderers/client.py | |
| +1 −22 | renderers/configs.py | |
| +110 −78 | renderers/kimi_k25.py | |
| +241 −0 | renderers/mm_store.py | |
| +8 −67 | renderers/qwen35.py | |
| +158 −145 | renderers/qwen3_vl.py | |
| +81 −56 | tests/test_client.py | |
| +56 −24 | tests/test_multimodal.py |
Submodule verifiers
updated
20 files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,6 +35,7 @@ | |
| monitor_process, | ||
| set_proc_title, | ||
| ) | ||
| from prime_rl.utils.run_assets import build_run_asset_env | ||
|
|
||
| RL_TOML = "rl.toml" | ||
| RL_SBATCH = "rl.sbatch" | ||
|
|
@@ -125,6 +126,8 @@ def rl_local(config: RLConfig): | |
| "WANDB_SHARED_MODE": "1", | ||
| "WANDB_SHARED_RUN_ID": os.environ.get("WANDB_SHARED_RUN_ID", uuid.uuid4().hex), | ||
| } | ||
| inherited_env = dict(os.environ) | ||
| writer_run_asset_env = build_run_asset_env(config.orchestrator.output_dir, multimodal=config.multimodal) | ||
|
Comment on lines
+129
to
+130
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I dont fully get this part |
||
|
|
||
| # Validate client port matches inference server port | ||
| if config.inference is not None and not config.orchestrator.model.client.is_elastic: | ||
|
|
@@ -170,7 +173,7 @@ def sigterm_handler(signum, frame): | |
| inference_process = Popen( | ||
| inference_cmd, | ||
| env={ | ||
| **os.environ, | ||
| **inherited_env, | ||
| **DEFAULT_COMMON_ENV_VARS, | ||
| **DEFAULT_INFERENCE_ENV_VARS, | ||
| **config.env_vars, | ||
|
|
@@ -225,7 +228,7 @@ def sigterm_handler(signum, frame): | |
| stdout=log_file, | ||
| stderr=log_file, | ||
| env={ | ||
| **os.environ, | ||
| **writer_run_asset_env, | ||
| **DEFAULT_COMMON_ENV_VARS, | ||
| "LOGURU_FORCE_COLORS": "1", | ||
| "WANDB_PROGRAM": "uv run rl", | ||
|
|
@@ -274,7 +277,7 @@ def sigterm_handler(signum, frame): | |
| trainer_process = Popen( | ||
| trainer_cmd, | ||
| env={ | ||
| **os.environ, | ||
| **inherited_env, | ||
| **DEFAULT_COMMON_ENV_VARS, | ||
| **DEFAULT_TRAINER_ENV_VARS, | ||
| "LOGURU_FORCE_COLORS": "1", | ||
|
|
@@ -372,6 +375,9 @@ def write_slurm_script(config: RLConfig, config_dir: Path, script_path: Path) -> | |
| kv_offload_disk_path=str(offload.disk.path) if (is_mooncake and offload.disk is not None) else "", | ||
| kv_offload_device_name=offload.device_name if is_mooncake else "", | ||
| ) | ||
| image_offload_dir = ( | ||
| os.path.expanduser(str(config.multimodal.offload_dir)) if config.multimodal.offload_dir is not None else "" | ||
| ) | ||
|
cursor[bot] marked this conversation as resolved.
|
||
|
|
||
| # Per-component env vars: launcher defaults (shared + multi-node-specific) with the | ||
| # user's config merged on top. Runtime wiring stays in the template. | ||
|
|
@@ -393,6 +399,7 @@ def write_slurm_script(config: RLConfig, config_dir: Path, script_path: Path) -> | |
| **config.slurm.template_vars, | ||
| config_path=config_dir / RL_TOML, | ||
| output_dir=config.output_dir, | ||
| image_offload_dir=image_offload_dir, | ||
| gpus_per_node=config.deployment.gpus_per_node, | ||
| ) | ||
| elif config.inference is not None and config.inference.deployment.type == "disaggregated": | ||
|
|
@@ -404,6 +411,7 @@ def write_slurm_script(config: RLConfig, config_dir: Path, script_path: Path) -> | |
| config_dir=config_dir, | ||
| output_dir=config.output_dir, | ||
| orchestrator_output_dir=config.orchestrator.output_dir, | ||
| image_offload_dir=image_offload_dir, | ||
| num_train_nodes=config.deployment.num_train_nodes, | ||
| num_infer_nodes=infer_deploy.num_nodes * config.deployment.num_infer_replicas, | ||
| nodes_per_infer_replica=infer_deploy.num_nodes, | ||
|
|
@@ -439,6 +447,7 @@ def write_slurm_script(config: RLConfig, config_dir: Path, script_path: Path) -> | |
| config_dir=config_dir, # TODO: should prob have each subconfig path separately | ||
| output_dir=config.output_dir, | ||
| orchestrator_output_dir=config.orchestrator.output_dir, | ||
| image_offload_dir=image_offload_dir, | ||
| num_train_nodes=config.deployment.num_train_nodes, | ||
| num_infer_nodes=config.deployment.total_infer_nodes, | ||
| nodes_per_infer_replica=config.deployment.num_infer_nodes, | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we put this in the multi modal config ?