Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

Commit

Permalink
LazyLoad brain_model access to avoid premature loading
Browse files Browse the repository at this point in the history
  • Loading branch information
mschrimpf committed Jul 16, 2019
1 parent 6b980b5 commit 288c8f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion candidate_models/model_commitments/cornets.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ def __init__(self):
self._accessed_brain_models = []

for basemodel_identifier, brain_model in model_pool.items():
activations_model = brain_model.activations_model
activations_model = LazyLoad(lambda brain_model=brain_model: brain_model.activations_model)
for identifier, activations_model in Hooks().iterate_hooks(basemodel_identifier, activations_model):
def load(basemodel_identifier=basemodel_identifier, identifier=identifier, brain_model=brain_model):
# only update when actually required, otherwise we'd change the activations_model
Expand Down

0 comments on commit 288c8f7

Please sign in to comment.