Skip to content

Feat: implement fetch and save outputs for modules#78

Merged
seankhl merged 17 commits intomainfrom
feat/structured-outputs
Mar 24, 2026
Merged

Feat: implement fetch and save outputs for modules#78
seankhl merged 17 commits intomainfrom
feat/structured-outputs

Conversation

@seankhl
Copy link
Collaborator

@seankhl seankhl commented Mar 17, 2026

The fetch_outputs commands will load a module's outputs in memory into dataclasses and similar (for the most part: exess exports are a bit complicated, so we leave them as raw json dicts or hdf5 bytes for now), and save_outputs will save them to the workspace as before.

Current status is that this is done for exess.exess, and will continue with this pattern moving forward.

Will update docs to demonstrate a usage pattern with fetch_outputs, which should be a lot more ergonomic.

@seankhl seankhl force-pushed the feat/structured-outputs branch 3 times, most recently from b1e3cf6 to 6dccb03 Compare March 18, 2026 07:04
seankhl and others added 10 commits March 18, 2026 12:55
The `fetch_outputs` commands will load a module's outputs in memory into
dataclasses and similar (for the most part: exess exports are a bit
complicated, so we leave them as raw json dicts or hdf5 bytes for now),
and `save_outputs` will save them to the workspace as before.

Implement both for `exess.exess`, and rename auto3d's function to
`fetch_outputs`, as it should now be named.

Co-authored-by: OpenAI Codex (GPT-5.4 High) <codex@openai.com>
Also, rename some exess dataclasses for clarity.

Co-authored-by: OpenAI Codex (GPT-5.4 High) <codex@openai.com>
Co-authored-by: OpenAI Codex (GPT-5.4 High) <codex@openai.com>
Co-authored-by: OpenAI Codex (GPT-5.4 High) <codex@openai.com>
Co-authored-by: OpenAI Codex (GPT-5.4 High) <codex@openai.com>
Co-authored-by: OpenAI Codex (GPT-5.4 High) <codex@openai.com>
Move the EXESS geo-opt and QM/MM wrappers into dedicated top-level
modules, keep the energy-facing helpers in rush.exess, and update the
surrounding docs/examples/tests to use the new import structure.

This also cleans up the EXESS tutorial and reference snippets so they
match the current output shapes and helper APIs.

Co-authored-by: OpenAI Codex (GPT-5.4 High) <codex@openai.com>
Add typed fetch_outputs and save_outputs helpers for the EXESS geometry
optimization and QM/MM modules, update the examples and tutorials to use
them, and add focused helper coverage.

Co-authored-by: OpenAI Codex (GPT-5.4 High) <codex@openai.com>
@seankhl seankhl force-pushed the feat/structured-outputs branch from 6dccb03 to 762c6f3 Compare March 18, 2026 18:01
seankhl and others added 4 commits March 18, 2026 14:01
Co-authored-by: OpenAI Codex (GPT-5.4 High) <codex@openai.com>
- rename RushError to RushRunError and raise it when it happens
- use a distinct str-like RunID type (via NewType)
- use a distinct str-like Auto3DError type (via NewType)
- change collect_run to behave more generically,
  so that output validation rightfully happens in each module
- overload module functions so that collect=blah typing is automatic
- don't allow run ID pass-throughs in fetch / save outputs,
  it complicates the typing too much and mixes concerns
- add tons of comments and typing, esp. for fetch / save outputs
- remove unnecessary optionals from some module result types
Also, remove schema_version in exess result dataclasses.
@seankhl
Copy link
Collaborator Author

seankhl commented Mar 20, 2026

In the process of doing this, I've moved to raising exceptions for run failures. We'll add an alternative path that avoids raising exceptions for module function calls, but for now, this greatly simplifies things.

seankhl and others added 2 commits March 20, 2026 14:01
Also, move module output helper tests into their own folder.

Co-authored-by: OpenAI Codex (GPT-5.4 High) <codex@openai.com>
@seankhl seankhl marked this pull request as ready for review March 20, 2026 19:12
@seankhl seankhl requested a review from kayleigh222 March 20, 2026 20:46
@seankhl
Copy link
Collaborator Author

seankhl commented Mar 24, 2026

Merging because the changes here were reviewed in the 7b2 PR.

@seankhl seankhl merged commit 6f83357 into main Mar 24, 2026
2 checks passed
@seankhl seankhl deleted the feat/structured-outputs branch March 24, 2026 20:04
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