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

Allow saving coordinate trajectory on disk #327

Closed

Conversation

shoubhikraj
Copy link
Collaborator


Checklist

  • The changes include an associated explanation of how/why
  • Test pass
  • Documentation has been updated
  • Changelog has been updated

@shoubhikraj shoubhikraj requested a review from t-young31 March 4, 2024 21:48
@shoubhikraj
Copy link
Collaborator Author

@t-young31 I am not quite sure how to implement the initialisation of the optimiser history file. Would be interested to hear if you think there are better ways to initialise the file interface.

return None

@staticmethod
def _coords_to_bytes(coords: OptCoordinates) -> bytes:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is lots of effort. why not pickle?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@t-young31 Pickling is said to be unsafe in the sense that it can run arbitrary code while unpickling. Given the feature of reading back an old saved trajectory from disk, it seems better to serialise manually. What do you think?

@shoubhikraj shoubhikraj closed this Mar 9, 2024
@shoubhikraj shoubhikraj deleted the optimiser-hist-refactor branch May 7, 2024 09:46
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