cnr-ibf-pa / hbp-bsp-issues

Ticketing system for developers/testers and power users of the Brain Simulation Platform of the Human Brain Project
4 stars 0 forks source link

UnicodeDecodeError for use case BluePyOpt Optimized Model Validation #505

Closed alex4200 closed 4 years ago

alex4200 commented 4 years ago

Expected behavior

Use case runs without errors for model #9

Actual Behavior (please include screenshot if possible)

The cell running the test creates an error as follows:

Model = CA1_int_bAC_011127HP1_20190329115610: using (best cell) cell_seed3_0.hoc
Target stub axon length:60 um, equivalent length: 53.039289 
----------------------------------------------
Test name:  BluePyOpt_MultipleCurrentStepTest
Test type:  <class 'eFELunit.tests.test_MultipleCurrentStepTest.BluePyOpt_MultipleCurrentStepTest'>
----------------------------------------------
----------------------------------------------
Model name:  CA1_int_bAC_011127HP1_20190329115610
Model type:  <class 'eFELunit.utils.CellModel'>
----------------------------------------------
***** Using cache to retrieve relevant model data *****

---------------------------------------------------------------------------
UnicodeDecodeError                        Traceback (most recent call last)
<ipython-input-8-616c8122976d> in <module>()
      4 cell_model.model_version = "1.0"
      5 
----> 6 result_uuid, score = utils.run_test(username=HBP_USERNAME, model=cell_model, test_alias="bpo_efel", test_version="1.0", storage_collab_id=collab_id, register_result=True, client_obj=testLibrary, observation_dir=cell_model.base_path, plot_figure=True)
      7 
      8 print("The result(s) can be viewed in the HBP Validation Framework app. Direct link:")

/opt/conda/lib/python3.6/site-packages/hbp_validation_framework/utils.py in run_test(username, password, environment, model, test_instance_id, test_id, test_alias, test_version, storage_collab_id, register_result, client_obj, **params)
    437 
    438     test_config_file = prepare_run_test_offline(username=username, password=password, environment=environment, test_instance_id=test_instance_id, test_id=test_id, test_alias=test_alias, test_version=test_version, client_obj=client_obj, **params)
--> 439     test_result_file = run_test_offline(model=model, test_config_file=test_config_file)
    440     result_id, score = upload_test_result(username=username, password=password, environment=environment, test_result_file=test_result_file, storage_collab_id=storage_collab_id, register_result=register_result, client_obj=client_obj)
    441     return result_id, score

/opt/conda/lib/python3.6/site-packages/hbp_validation_framework/utils.py in run_test_offline(model, test_config_file)
    259     # Run the test
    260     t_start = datetime.utcnow()
--> 261     score = test.judge(model, deep_error=True)
    262     t_end = datetime.utcnow()
    263 

/opt/conda/lib/python3.6/site-packages/sciunit/tests.py in judge(self, model, skip_incapable, stop_on_error, deep_error)
    301 
    302         if deep_error:
--> 303             score = self._judge(model, skip_incapable=skip_incapable)
    304         else:
    305             try:

/opt/conda/lib/python3.6/site-packages/sciunit/tests.py in _judge(self, model, skip_incapable)
    244 
    245         # 2.
--> 246         prediction = self.generate_prediction(model)
    247         self.check_prediction(prediction)
    248         self.last_model = model

/opt/conda/lib/python3.6/site-packages/eFELunit/tests/test_MultipleCurrentStepTest.py in generate_prediction(self, model, verbose)
     63             print("***** Using cache to retrieve relevant model data *****")
     64             io = neo.io.get_io(cache_filename)
---> 65             self.recordings = io.read_block()
     66         else:
     67             print("Note: no cached data for this model specification!")

/opt/conda/lib/python3.6/site-packages/neo/io/pickleio.py in read_block(self, lazy)
     45         assert not lazy, 'Do not support lazy'
     46         with open(self.filename, "rb") as fp:
---> 47             block = pickle.load(fp)
     48         return block
     49 

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc0 in position 7: ordinal not in range(128)

Steps to reproduce the problem

Optional infrastructural data (user, platform, browser, environment, ...)

alex4200 commented 4 years ago

This problem only appears when you have already analyzed the model with an older version. Then the data gets stored in a different pickle format, not compatible wit the current on.

Should not be a problem for new users. Closing ticket