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

Proof of Concept: Save and reload Glue-related states and data. #2552

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

rosteen
Copy link
Collaborator

@rosteen rosteen commented Nov 3, 2023

Lots of to-do's left, but this shows off a proof of concept for saving and restoring state, including automatically loading the same data as long as it's on disk (currently just prints a warning if objects had been loaded and weren't reloaded prior to restoring state). Demo video attached, I've only tested with Imviz so far.

Screen.Recording.2023-11-03.at.11.31.00.AM.mov

@rosteen rosteen added the feature Feature request label Nov 3, 2023
@rosteen rosteen added this to the 3.8 milestone Nov 3, 2023
for layer_id, layer_dict in saved_viewer_state['layers'].items():
data_label = layer_id.split(" ")[0]
if data_label not in self.data_collection.labels:
print(f"Couldn't find or load {data_label}.")
Copy link
Contributor

Choose a reason for hiding this comment

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

I know this is just POC, but hopefully you do not plan to keep this print?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I had hoped that would be obvious.

Copy link
Contributor

Choose a reason for hiding this comment

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

The continue threw me off. I am not sure if you want some sort of logging here permanently or not.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Probably would make this a snackbar message, assuming restore_state gets a button in the UI.

Copy link
Contributor

@pllim pllim left a comment

Choose a reason for hiding this comment

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

Nice! I am so glad it is not pickle.

I am curious if this would work for downstream stuff like lcviz.

Do we also need to store things like jdaviz version?

@rosteen
Copy link
Collaborator Author

rosteen commented Nov 3, 2023

Do we also need to store things like jdaviz version?

That's a good idea. Plenty of other stuff that still could/needs to go in this.

@rosteen rosteen modified the milestones: 3.8, 3.9 Nov 29, 2023
@gibsongreen gibsongreen modified the milestones: 3.9, 3.10 Apr 5, 2024
@bmorris3 bmorris3 modified the milestones: 3.10, 3.11 May 3, 2024
@bmorris3 bmorris3 added the proof-of-concept Proof of concept for future reference label Jul 17, 2024
@rosteen rosteen modified the milestones: 3.11, 4.1 Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature request proof-of-concept Proof of concept for future reference
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants