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

Feature/randomness #7

Merged
merged 4 commits into from
May 20, 2024
Merged

Feature/randomness #7

merged 4 commits into from
May 20, 2024

Conversation

drodarie
Copy link
Contributor

  • Add randomness to NEST simulations (seed)
  • Allow NEST random distribution for neuron parameters

close #6

@drodarie drodarie requested a review from Helveg May 13, 2024 17:17
@drodarie drodarie self-assigned this May 13, 2024
bsb_nest/distributions.py Show resolved Hide resolved
bsb_nest/distributions.py Show resolved Hide resolved
bsb_nest/distributions.py Outdated Show resolved Hide resolved
tests/test_nest.py Outdated Show resolved Hide resolved
Co-authored-by: Robin De Schepper <[email protected]>
@drodarie
Copy link
Contributor Author

Hmm for some reason the hasattr you suggested does not work.
To give some context, I copied the implementation of Distribution in _distributions.py in bsb.core, and here too the __getattr__ uses self.__dict__.
I will revert the change and put a comment but I am not sure why this happens

@drodarie drodarie requested a review from Helveg May 14, 2024 10:36
@Helveg
Copy link
Contributor

Helveg commented May 15, 2024

ah oops, I did not see that this was inside of __getattr__. It doesn't work because hasattr uses the entire Python attribute access cascade, including a lookup of __getattr__ itself :)

Copy link
Contributor

@Helveg Helveg left a comment

Choose a reason for hiding this comment

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

I'll approve it, but once bsb-core implements reproducibility/randomness systematically, this logic will probably have to be redone.

@drodarie drodarie merged commit c21176a into main May 20, 2024
7 checks passed
@drodarie drodarie deleted the feature/randomness branch May 20, 2024 14:48
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.

Feature request: Randomness
2 participants