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

use individually named dir instead of GeNNworkspace #137

Open
tnowotny opened this issue Jan 5, 2022 · 1 comment
Open

use individually named dir instead of GeNNworkspace #137

tnowotny opened this issue Jan 5, 2022 · 1 comment

Comments

@tnowotny
Copy link
Contributor

tnowotny commented Jan 5, 2022

This makes sense for at least two reasons:

  • It will allow the GeNN caching system to reduce recompilations
  • it will avoid errors when the contents of GeNNworkspace are partially overwritten for different models
    We need to find the optimal naming convention of the working directory that is model-specific.
@neworderofjamie
Copy link
Collaborator

neworderofjamie commented Jan 5, 2022

We use the following trick in PyNN GeNN to name the model after the name of the PyNN script (in the case of PyNN we do this in the setup(...) function to obtain the name of the python module which calls it):

import inspect

calframe = inspect.getouterframes(inspect.currentframe(), 1)

# Extract model name and path
model_name = os.path.splitext(os.path.basename(calframe[1][1]))[0]

model_name = sanitize_label(model_name)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants