Skip to content

Commit c3938bb

Browse files
committed
Merge branch 'development' of https://github.com/MetaCell/netpyne-ui into feature/417
2 parents ca312ee + dff185b commit c3938bb

File tree

11 files changed

+6656
-272
lines changed

11 files changed

+6656
-272
lines changed

netpyne_ui/netpyne_geppetto.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
from shutil import copyfile
1515
from dacite import from_dict
1616
import base64
17+
import jsonpickle
1718

1819
import neuron
1920
import numpy as np
@@ -266,6 +267,7 @@ def simulateNetPyNEModelInGeppetto(self, args):
266267
"""
267268
allTrials = args.get('allTrials', True)
268269
use_prev_inst = args.get('usePrevInst', False)
270+
sim_id = args.get('simId', 0)
269271

270272
try:
271273
experiment = experiments.get_current()
@@ -289,17 +291,17 @@ def simulateNetPyNEModelInGeppetto(self, args):
289291
return self.simulate_single_model(experiment, use_prev_inst)
290292
except Exception:
291293
experiment.state = model.ExperimentState.ERROR
292-
message = "Unknown error during simulation of Experiment"
294+
message = ("Unknown error during simulation of Experiment. SimulationId %i" % sim_id)
293295
logging.exception(message)
294-
return utils.getJSONError("Unknown error during simulation of Experiment", sys.exc_info())
296+
return utils.getJSONError("Unknown error during simulation of Experiment", sys.exc_info(), { "sim_id": sim_id})
295297

296298
else:
297299
return self.simulate_single_model(use_prev_inst=use_prev_inst)
298300

299-
except Exception:
300-
message = "Error while simulating the NetPyNE model"
301+
except Exception as e :
302+
message = ("Error while simulating the NetPyNE model: %s. SimulationId %f" % (e, sim_id))
301303
logging.exception(message)
302-
return utils.getJSONError(message, sys.exc_info())
304+
return utils.getJSONError(message, sys.exc_info(), { "sim_id": sim_id})
303305

304306
def _prepare_simulation_files(self, experiment: model.Experiment = None, use_prev_inst: bool = False) -> str:
305307
"""Prepares template files and netpyne model files for a single simulation """
@@ -647,6 +649,8 @@ def instantiateNetPyNEModel(self):
647649
saveData = sim.allSimData if hasattr(sim, 'allSimData') and 'spkt' in sim.allSimData.keys() and len(
648650
sim.allSimData['spkt']) > 0 else False
649651

652+
#netcoded = jsonpickle.encode(self.netParams, unpicklable=False)
653+
#simcoded = jsonpickle.encode(self.simConfig, unpicklable=False)
650654
sim.create(self.netParams, self.simConfig)
651655
sim.net.defineCellShapes() # creates 3d pt for cells with stylized geometries
652656
sim.gatherData(gatherLFP=False)

tests/frontend/e2e/package-lock.json

Lines changed: 65 additions & 99 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)