AllenInstitute / bmtk

Brain Modeling Toolkit
https://alleninstitute.github.io/bmtk/
BSD 3-Clause "New" or "Revised" License
272 stars 88 forks source link

Filter movie, run_filternet fails for configuration reasons. When movie is supplied. #283

Closed russelljjarvis closed 1 year ago

russelljjarvis commented 1 year ago

:~/git/bmtk/examples/filter_movie$ python run_filternet.py

2023-02-07 10:21:44,524 [INFO] Created log file

movie added

2023-02-07 10:21:45,724 [INFO] Building cells.
weight_dom_0
Traceback (most recent call last):
  File "/home/rjjarvis/git/bmtk/examples/filter_movie/run_filternet.py", line 18, in <module>
    run('config.simulation.json')
  File "/home/rjjarvis/git/bmtk/examples/filter_movie/run_filternet.py", line 10, in run
    sim = filternet.FilterSimulator.from_config(config, net)
  File "/home/rjjarvis/git/bmtk/bmtk/simulator/filternet/filtersimulator.py", line 164, in from_config
    network.io.log_info('Building cells.')
  File "/home/rjjarvis/git/bmtk/bmtk/simulator/filternet/filternetwork.py", line 58, in build_nodes
    cell.build()
  File "/home/rjjarvis/git/bmtk/bmtk/simulator/filternet/cell.py", line 48, in build
    self._lgn_cell_obj = model_processing_fnc(self, self._node.model_template, self._node.dynamics_params)
  File "/home/rjjarvis/git/bmtk/bmtk/simulator/filternet/default_setters/cell_loaders.py", line 162, in default_cell_loader
    wts = [node['weight_dom_0'], node['weight_dom_1']]
  File "/home/rjjarvis/git/bmtk/bmtk/simulator/filternet/cell.py", line 57, in __getitem__
    return self._node[item]
  File "/home/rjjarvis/git/bmtk/bmtk/simulator/core/sonata_reader/node_adaptor.py", line 49, in __getitem__
    return self._node[prop_key]
  File "/home/rjjarvis/git/bmtk/bmtk/utils/sonata/node.py", line 129, in __getitem__
    raise KeyError('Unknown property {}'.format(prop_key))
KeyError: 'Unknown property weight_dom_0'
russelljjarvis commented 1 year ago

Also the filter gratings example does work though.

here is the config variable contents:

{'manifest': {'workingdir': '/home/rjjarvis/git/bmtk/examples/filter_movie', 'configdir': '/home/rjjarvis/git/bmtk/examples/filter_movie', 'configfname': '/home/rjjarvis/git/bmtk/examples/filter_movie/config.circuit.json', 'time': '10-29-42', 'date': '2023-02-07', 'datetime': '2023-02-07_10-29-42', 'BASE_DIR': '.', 'COMPONETS_DIR': './../filter_components', 'NETWORK_DIR': './network'}, 'run': {'tstop': 2000.0, 'dt': 0.1, 'overwrite_output_dir': True}, 'target_simulator': 'LGNModel', 'conditions': {'jitter_lower': 0.75, 'jitter_upper': 1.25}, 'inputs': {'LGN_spikes': {'input_type': 'movie', 'module': 'graiting', 'row_size': 120, 'col_size': 240, 'gray_screen_dur': 0.5, 'cpd': 0.04, 'temporal_f': 4.0, 'contrast': 0.8, 'evaluation_options': {'downsample': 1, 'separable': True}}}, 'output': {'log_file': '/home/rjjarvis/git/bmtk/examples/filter_movie/output/log.txt', 'output_dir': '/home/rjjarvis/git/bmtk/examples/filter_movie/output', 'rates_csv': 'rates.csv', 'spikes_csv': 'spikes.csv', 'spikes_file': '/home/rjjarvis/git/bmtk/examples/filter_movie/output/spikes.h5', 'overwrite_output_dir': True}, 'network': 'config.circuit.json', 'config_path': '/home/rjjarvis/git/bmtk/examples/filter_movie/config.simulation.json', 'config_dir': '/home/rjjarvis/git/bmtk/examples/filter_movie', 'components': {'filter_models_dir': './../filter_components/model_templates'}, 'networks': {'nodes': [{'nodes_file': './network/lgn_nodes.h5', 'node_types_file': './network/lgn_node_types.csv'}]}}

russelljjarvis commented 1 year ago

This is the filter graitings config: {'manifest': {'workingdir': '/home/rjjarvis/git/bmtk/examples/filter_graitings', 'configdir': '/home/rjjarvis/git/bmtk/examples/filter_graitings', 'configfname': '/home/rjjarvis/git/bmtk/examples/filter_graitings/config.circuit.json', 'time': '10-31-39', 'date': '2023-02-07', 'datetime': '2023-02-07_10-31-39', 'BASE_DIR': '.', 'COMPONENT_DIR': './../filter_components', 'NETWORK_DIR': './network'}, 'run': {'tstop': 2000.0, 'dt': 0.1, 'overwrite_output_dir': True}, 'target_simulator': 'LGNModel', 'conditions': {'jitter_lower': 0.75, 'jitter_upper': 1.25}, 'inputs': {'LGN_spikes': {'input_type': 'movie', 'module': 'graiting', 'row_size': 120, 'col_size': 240, 'gray_screen_dur': 0.5, 'cpd': 0.04, 'temporal_f': 4.0, 'contrast': 0.8, 'evaluation_options': {'downsample': 1, 'separable': True}}}, 'output': {'log_file': '/home/rjjarvis/git/bmtk/examples/filter_graitings/output/log.txt', 'output_dir': '/home/rjjarvis/git/bmtk/examples/filter_graitings/output', 'rates_csv': 'rates.csv', 'spikes_csv': 'spikes.csv', 'spikes_file': '/home/rjjarvis/git/bmtk/examples/filter_graitings/output/spikes.h5', 'overwrite_output_dir': True}, 'network': 'config.circuit.json', 'config_path': '/home/rjjarvis/git/bmtk/examples/filter_graitings/config.simulation.json', 'config_dir': '/home/rjjarvis/git/bmtk/examples/filter_graitings', 'components': {'filter_models_dir': './../filter_components/model_templates'}, 'networks': {'nodes': [{'nodes_file': './network/lgn_nodes.h5', 'node_types_file': './network/lgn_node_types.csv'}]}}

xpliu16 commented 1 year ago

I noticed that COMPONENT_DIR is spelled as 'COMPONETS_DIR" in the top config, but not the bottom one. Perhaps it's unable to find the filter model dynamic params files?

russelljjarvis commented 1 year ago

I think you are right.