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

Batch simulation: batching over deeper Net params? #896

Closed
darcywaller opened this issue Sep 23, 2024 · 3 comments
Closed

Batch simulation: batching over deeper Net params? #896

darcywaller opened this issue Sep 23, 2024 · 3 comments

Comments

@darcywaller
Copy link

Hi team - I was checking out the new BatchSimulate function in 0.4 and it seems it is set up primarily for testing different parameters of the external drives. Is there any functionality or can you suggest the best way to test multiple parameters for the local network parameters (e.g., let's say, L5 basket -> L5 Pyr soma GABAb weights)?

A challenge I am facing is that I can set up a new network configuration in a notebook and test it for such a parameter change but as referenced in #774 (comment) , such an externalized network instance won't simulate in parallel because of some MPI security settings, and have to manually change the hnn-core code in my own fork to test out new network configurations if I want to run multiple trials or optimize in parallel. Would be great to 1) not have to change the hnn-core library code each time I want to sub in a parameter to test or 2) be able to batch this at once over a range of values in parallel.

@ntolley
Copy link
Contributor

ntolley commented Sep 23, 2024

This isn't an answer to your question, but in the short term would it make sense to parallelize with joblib? If you're using batch simulate then at some level each simulation in the batch independent from the other.

@ntolley
Copy link
Contributor

ntolley commented Sep 23, 2024

Also you can configure batch simulate to update internal network values in a custom set_params function:

def set_params(param_values, net):
    net.cell_types['L5_pyramidal'].your_attribute_here = param_values['custom_value']

param_dict = {'custom_values': np.linspace(0, 5, 10)}

@darcywaller
Copy link
Author

Thanks Nick, that ended up working just fine - assumedly because the parameter adjustments on the network are happening within the scope of the hnn-core scripts and not out in an external notebook.

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

No branches or pull requests

2 participants