Skip to content
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

Memory overload fix and more metadata #4

Merged
merged 6 commits into from
Aug 21, 2024

Conversation

orionarcher
Copy link

@orionarcher orionarcher commented Aug 20, 2024

In addition to taking a stab at fixing the memory issue, I added some metadata that I'd love to have included. Let me know what you think @esoteric-ephemera.

Summary

Include a summary of major changes in bullet points:

  • Add "ionic_steps" into DATA_OBJECTS so it doesn't surpass MongoDB 16 MB limit
  • Add timing to ASE runs
  • Add tags to task document, can be provided through task_document_kwargs

Questions

Is task_document_kwargs around to maintain backwards compability? It seems like it only supports 3-4 kwargs so I wonder if it'd be easier to just list them explicitly. It's hard to know what arguments are available through it or where they will be used.

Checklist

Work-in-progress pull requests are encouraged, but please put [WIP] in the pull request
title.

Before a pull request can be merged, the following items must be checked:

  • Code is in the standard Python style.
    The easiest way to handle this is to run the following in the correct sequence on
    your local machine. Start with running ruff and ruff format on your new code. This will
    automatically reformat your code to PEP8 conventions and fix many linting issues.
  • Doc strings have been added in the Numpy docstring format.
    Run ruff on your code.
  • Type annotations are highly encouraged. Run mypy to
    type check your code.
  • Tests have been added for any new functionality or bug fixes.
  • All linting and tests pass.

Note that the CI system will run all the above checks. But it will be much more
efficient if you already fix most errors prior to submitting the PR. It is highly
recommended that you use the pre-commit hook provided in the repository. Simply run
pre-commit install and a check will be run prior to allowing commits.

@orionarcher orionarcher changed the base branch from main to ase August 20, 2024 21:33
@orionarcher orionarcher changed the title Ase fixes Memory overload fix and more metadata Aug 20, 2024
@esoteric-ephemera
Copy link
Owner

esoteric-ephemera commented Aug 21, 2024

Thanks, @orionarcher! This is great - I'll have to look more closely but don't expect to have too many requests for changes.

Also yes task_document_kwargs is for backwards compatibility

For the ionic steps: only the energies should be stored by default during MD runs since the full trajectory is saved in blob / GridFS. Do you think we should avoid saving any MD info in ionic_steps / is this also problematic for long (non-MD) relaxations?

@orionarcher
Copy link
Author

What would you think of breaking out task_document_kwargs into separate args? We could leave in task_document_kwargs for backwards compatibility, add a deprecation warning, and pop off any elements into the kwargs if it is given. I've found it pretty hard to introspect on because it gets updated in several places and, as I found out, it creates a dependency in the defaults between ionic_step_data and store_trajectory.

I think it'd be better to avoid storing trajectory info in ionic_steps, IMO that belongs in the trajectory itself. It also creates a memory issue if accidentally misconfigured.

@esoteric-ephemera
Copy link
Owner

What would you think of breaking out task_document_kwargs into separate args? We could leave in task_document_kwargs for backwards compatibility, add a deprecation warning, and pop off any elements into the kwargs if it is given.

@orionarcher I like this solution, I'll merge in your changes and add this feature

@esoteric-ephemera esoteric-ephemera merged commit 321a975 into esoteric-ephemera:ase Aug 21, 2024
9 checks passed
@orionarcher
Copy link
Author

Great!

I made a small oversight about how this change would affect the types of the task_doc, fix here.

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.

2 participants