Describe the bug
I want to simulate the model you provide in cell_type, but I keep getting a key error: sweeps_by_type is not present, and indeed it is not present in the manifest.json I downloaded.
from allensdk.api.queries.biophysical_api import BiophysicalApi
bp = BiophysicalApi()
bp.cache_stimulus = True
neuronal_model_id = 473863035
bp.cache_data(neuronal_model_id, working_directory='neuronal_model')
Run the simulation
cd neuronal_model
nrnivmodl ./modfiles # until this code, it was working fine.
python3 -m allensdk.model.biophysical.runner manifest.json # perisomatic models
Expected behavior
I just want the model simulation you provided to work.
Actual Behaviorpython3 -m allensdk.model.biophysical.runner manifest.json
When I run the above code, I get the following error.
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/lib/python3.8/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/usr/lib/python3.8/multiprocessing/pool.py", line 48, in mapstar
return list(map(*args))
File "/python3.8/site-packages/allensdk/model/biophysical/runner.py", li ne 119, in run_sync
sweeps_by_type = run_params['sweeps_by_type']
KeyError: 'sweeps_by_type'
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/python3.8/site-packages/allensdk/model/biophysical/runner.py", li ne 240, in <module>
run(vars(schema))
File "/python3.8/site-packages/allensdk/model/biophysical/runner.py", li ne 87, in run
pool.map(partial(run_sync, description), [[sweep] for sweep in sweeps])
File "/usr/lib/python3.8/multiprocessing/pool.py", line 364, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
File "/usr/lib/python3.8/multiprocessing/pool.py", line 771, in get
raise self._value
KeyError: 'sweeps_by_type'
Environment (please complete the following information):
OS & version: Ubuntu 20.04.6 LTS
Python version 3.8.10
AllenSDK version: the latest version
Additional context
After seeing the above error, I checked the manifest.json file and it didn't have sweeps_by_type, so I downloaded the model from LINK via Download model, checked the manifest.json of that file and it had sweeps_by_type. Then I overwrote it into the existing manifest.json, but I still got the error.
The error I was getting was the following, repeated over and over again.
/allensdk/ephys/ephys_features.py:1143: RuntimeWarning: Mean of empty slice.
new_thresh_frac = min_thresh / all_upstrokes.mean()
/python3.8/site-packages/numpy/core/_methods.py:188: RuntimeWarning: invalid value encountered in double_scalars
ret = ret.dtype.type(ret / rcount)
Describe the bug I want to simulate the model you provide in cell_type, but I keep getting a key error: sweeps_by_type is not present, and indeed it is not present in the manifest.json I downloaded.
To Reproduce I followed your documetation. Here
Download biophysical model
Run the simulation
Expected behavior I just want the model simulation you provided to work.
Actual Behavior
python3 -m allensdk.model.biophysical.runner manifest.json
When I run the above code, I get the following error.
Environment (please complete the following information):
Additional context After seeing the above error, I checked the manifest.json file and it didn't have sweeps_by_type, so I downloaded the model from LINK via Download model, checked the manifest.json of that file and it had sweeps_by_type. Then I overwrote it into the existing manifest.json, but I still got the error.
The error I was getting was the following, repeated over and over again.