Add paths.buffer and PathConfig; rename import→imports with list support#87
Merged
Conversation
Mirrors the existing paths.samples pattern: if paths.buffer is set in the
config (or passed as a Hydra override), buffer snapshots are written to
{paths.buffer}/snapshots/ instead of the default {run_dir}/buffer/snapshots/.
Useful when run_dir is on a fast local filesystem but buffer snapshots
(which can be large) should land on a separate scratch volume.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Keep snapshot_every (renamed from store_fraction in main branch). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ort_dirs - PathConfig dataclass validates cfg.paths against a typed schema (analogous to BufferConfig for cfg.buffer) - imports: Optional[List[str]] replaces the bare import: str key; avoids Python keyword clash and supports multiple search dirs - DeployedGraph/NodeWrapper/MultiplexNodeWrapper accept import_dirs (list) instead of model_path (str) and iterate over all entries when extending sys.path - _resolve_paths() helper merges cfg.paths against PathConfig and returns a plain dict; used in launch_mode and sample_mode - PathConfig exported from falcon top-level alongside BufferConfig Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #87 +/- ##
========================================
+ Coverage 9.61% 9.72% +0.11%
========================================
Files 33 33
Lines 4141 4154 +13
========================================
+ Hits 398 404 +6
- Misses 3743 3750 +7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
paths.bufferconfig key to redirect buffer snapshot storage to a separate volume (e.g. HPC scratch), mirroring the existingpaths.samplespatternPathConfigdataclass to validatecfg.pathsagainst a typed schema, consistent with howBufferConfigvalidatescfg.bufferpaths.import→paths.imports: list[str]— avoids the Python keyword clash and supports multiple search directories prepended tosys.pathin Ray workersmodel_path→import_dirsthroughoutDeployedGraph,NodeWrapper,MultiplexNodeWrapperMotivation
Buffer snapshots can be large (grows with
max_samples × field_size × adaptive_rounds) and should land on fast scratch storage, not alongside model checkpoints and configs on persistent storage.paths.buffergives users independent control over where snapshots land.PathConfigbringscfg.pathsin line with the rest of the config: typed, validated, with unknown-key rejection via OmegaConf structured config merge.importsas a list allows specifying multiple module search directories, which was not possible with the old scalarimportkey.Migration
paths.import: "."paths.imports: ["."]Test plan
falcon launchwith nopaths.bufferset — snapshots land in{run_dir}/buffer/snapshots/as beforepaths.buffer: /scratch/myproject— snapshots redirect correctlypaths.imports: [".", "../shared"]— both dirs appear insys.pathin workerspaths:raises OmegaConf error🤖 Generated with Claude Code