Skip to content

feat: add Dagster orchestration project for StrainRelief - #32

Open
erwallace wants to merge 8 commits into
prescient-design:mainfrom
erwallace:feat/dagster-orchestration
Open

feat: add Dagster orchestration project for StrainRelief#32
erwallace wants to merge 8 commits into
prescient-design:mainfrom
erwallace:feat/dagster-orchestration

Conversation

@erwallace

Copy link
Copy Markdown
Collaborator

Add the dag/ Dagster project that wraps the StrainRelief workflow as assets (preprocess -> conformers -> local/global optimisation -> aggregate -> plot).

Resources are config-driven, mirroring the Hydra _target_ pattern:

  • CalculatorResource selects MACE/MMFF94/FAIRChem via a kind-discriminated union, loaded exactly once per run (module cache + in-process executor).
  • OptimiserResource base + Local/Global subclasses build BFGS and attach the shared calculator.

Config classes in configs.py map 1:1 to the strain_relief function kwargs, with a full example run.yaml.

Ewan Wallace and others added 8 commits June 17, 2026 21:21
Add the `dag/` Dagster project that wraps the StrainRelief workflow as
assets (preprocess -> conformers -> local/global optimisation ->
aggregate -> plot).

Resources are config-driven, mirroring the Hydra `_target_` pattern:
- CalculatorResource selects MACE/MMFF94/FAIRChem via a `kind`-discriminated
  union, loaded exactly once per run (module cache + in-process executor).
- OptimiserResource base + Local/Global subclasses build BFGS and attach the
  shared calculator.

Config classes in configs.py map 1:1 to the strain_relief function kwargs,
with a full example run.yaml.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…n job

Split preprocess_data into input_df + docked_mols assets (Option B) so the
original DataFrame flows to aggregate_results for the id-merge in
process_output. Route input_df through the DuckDB pandas io manager (dropping
the unserialisable live RDKit mol column; molecules persist as mol_bytes and
are rebuilt downstream, normalising DuckDB's bytearray back to bytes).

Add an all_assets job (AssetSelection.all()) so the pipeline launches via
`dg launch --job all_assets` — avoiding the antlr asset-selection grammar that
conflicts with the omegaconf/hydra antlr pin.

Make the optimiser config a discriminated union (BFGSConfig + placeholder) so
calculator and optimiser configs share a uniform selector representation.

Fix PyTorchIOManager to create parent dirs before torch.save, and correct the
asset input type annotations (dict, not ConformerBatch).

Document how to run the pipeline and where each asset's output is stored.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Write all run artifacts under an absolute, run-scoped directory using a flat
per-asset layout: data/<run_id>/<asset_name>.<ext> (DATA_DIR resolved from the
repo layout, independent of the launch directory), so runs never overwrite
each other.

- Replace DuckDBPandasIOManager with a custom ParquetIOManager
  (data/<run_id>/<asset>.parquet); drop the dagster_duckdb_pandas dep.
- PyTorchIOManager writes data/<run_id>/<asset>.pt.
- aggregate_results takes AssetExecutionContext and writes the final parquet
  into the run directory; drop the DuckDB-specific bytearray->bytes workarounds
  (parquet preserves bytes).
- Rename the job to `strain_relief`.
- Update README run instructions and output-location table.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant