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

Unwanted persistance in interative notebooks #55

Closed
Retiefasaurus opened this issue Nov 24, 2023 · 1 comment · Fixed by #62
Closed

Unwanted persistance in interative notebooks #55

Retiefasaurus opened this issue Nov 24, 2023 · 1 comment · Fixed by #62
Assignees
Labels
bug Something isn't working

Comments

@Retiefasaurus
Copy link
Collaborator

The variables used in class attributes belong to the particular class and not the object. Python class attributes are shared between the same instance. Therefore, re-initializing a Python object will not reset it's class attributes within the same instance. This is unwanted behavior for interactive problems.

Proposed solution:
Move class attributes to class variables of all classes within Grain Learning.

@chyalexcheng
Copy link
Contributor

I had come across this issue but never understood why. Thanks, Retief.

@chyalexcheng chyalexcheng self-assigned this Jan 15, 2024
chyalexcheng added a commit that referenced this issue Jan 16, 2024
* Remove class attributes and set_curr_step function -related to #55

* Remove class attributes

* Fix issue when plotting obs sims when num_ctrl is small

* Remove class attributes

* minor changes to default values

---------

Co-authored-by: chyalexcheng <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants