-
Notifications
You must be signed in to change notification settings - Fork 6
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
Export commit hashes for target & base model repos #127
Comments
Export and simulate are similar processes. In both cases, the commit hash would be an almost-sufficient way to make the state of the code reproducible. To be a complete solution, all repos that the model depends on would have to be committed at the moment of export. Otherwise the hashes would not reliably convey the exact state of the code. To make simulations reproducible, the current solution is to save a snapshot of the models in the job dir. The user can choose (as a application-wide setting) whether to save just the model, or model + dependencies. The default is to save both. There is a function in the app to reconstruct the model from this snapshot as if it were a self-standing repo. This approach is potentially expensive (though N2A models are notably concise compared to other formats). It may make sense to offer automatic-commit + hashes as an alternate way to reconstruct a model at a given point in time. |
That makes sense to me. IMO almost-sufficient commit hashes may still be a useful supplement to snapshotting, e.g. to provide traceability back to the model repos (with appropriate caveats or "dirty" flags) |
We could start by embedding the hashes as metadata in the snapshot file. As for exports, it would depend on the export format. We could dump a separate hash file. Basically, it would list each repo (just by name) and its associated hash. |
That makes sense to me too, or perhaps a separate hash file named for each repo would make for extremely simple parsing. I rolled my own version of this in documentation as a stopgap for another app. Happy to change / replace that (probably a separate discussion). |
Models exported from N2A seem to be often (always?) derived from git repos, which may be modified over time. If this is a common workflow, it may be useful to also export commit hashes of the target/base git repos to aid traceability for the exported code.
Saving the output of
git rev-parse HEAD
to file for all required repos for a given model might be useful (though wouldn't capture any uncommitted modifications -- other variants might)The text was updated successfully, but these errors were encountered: