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

Morphology Validation Use Case not working for Fast Spiking Interneurons #391

Closed appukuttan-shailesh closed 5 years ago

appukuttan-shailesh commented 5 years ago

Expected behavior

UseCase is expected to handle following cell types

  1. D1-type Medium Spiny Neurons
  2. D2-type Medium Spiny Neurons
  3. Fast Spiking Interneurons

Actual Behavior (please include screenshot if possible)

Currently works fine for (1) and (2).... error when running for (3) neurite_Y_extent key error

Steps to reproduce the problem

Choose (3) as cell type and check output for soft constraints part of the Use Case

pedroernesto commented 5 years ago

I have the Python code to correct this issue, but it was not working on the Colllab, just locally. I am going to work on this in a few weeks.

alex4200 commented 5 years ago

@appukuttan-shailesh Is this ticket the same as ticket #386? Or what is the relationship?

Also, will this be fixed until the end of MS12 (end March) or only later?

appukuttan-shailesh commented 5 years ago

@alex4200 : As mentioned above, the UseCase is supposed to support multiple cell types (one of the options that a user chooses while running the UseCase). I have fixed the issues (as part of #386) such that it works for the first 2 cell types (D1 MSN, D2 MSN), but the problem with the third cell type (FS) is test implementation specific which needs to be resolved by the morpho_stats test creator (in this case @pedroernesto ). Therefore, it would be better for @pedroernesto to specify a deadline for this.

pedroernesto commented 5 years ago

Yes @alex4200, I will complete this before end of March

pedroernesto commented 5 years ago

Code completed. Issue almost done, need to test on the Collab next week.

pedroernesto commented 5 years ago

The problem with the third cell type (FSI) is solved. The source file for this use-case (BG_Morphology_Validations) runs now succesfully at: https://collab.humanbrainproject.eu/#/collab/8123/nav/78914

I have added the following functionalities to MorphoUnit:

alex4200 commented 5 years ago

@pedroernesto Is that notebook ready for testing? Is this the correct DEV notebook: /8123/usecases/BG_MorphoUnit_usecase.ipynb ?

pedroernesto commented 5 years ago

I think so, yes. The one on the BSP is not editable, just a copy on the user space. So I have been working on this one. Is it there another copy of the notebook on the Collab?

alex4200 commented 5 years ago

@pedroernesto I just tested the notebook located at /8123/usecases/BG_MorphoUnit_usecase.ipynb and I get an error in the second part:

Selection_664

My best guess is that you need a chance on how you create the morph_files:

model_collab_paths.append(model_instance["source"].split("http://collab.link")[1])

With that fix, the use case runs smoothly to the end.


However, when I run the use case with the following selections:

I get the following error:

Selection_665

Full error message:

AttributeErrorTraceback (most recent call last)
<ipython-input-34-7bce1e804a2f> in <module>()
      5                            model=morph_model, test_alias=test_alias, test_version="2.0",
      6                            storage_collab_id=collab_id, register_result=True,
----> 7                            client_obj=testLibrary, observation_path=obs_file_path)
      8 
      9 result_uuids.append(result_id)

/opt/conda/envs/python2/lib/python2.7/site-packages/hbp_validation_framework/utils.pyc in run_test(username, password, environment, model, test_instance_id, test_id, test_alias, test_version, storage_collab_id, register_result, client_obj, **params)
    362 def run_test(username="", password=None, environment="production", model="", test_instance_id="", test_id="", test_alias="", test_version="", storage_collab_id="", register_result=True, client_obj=None, **params):
    363     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)
--> 364     test_result_file = run_test_offline(model=model, test_config_file=test_config_file)
    365     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)
    366     return result_id, score

/opt/conda/envs/python2/lib/python2.7/site-packages/hbp_validation_framework/utils.pyc in run_test_offline(model, test_config_file)
    243     # Run the test
    244     t_start = datetime.utcnow()
--> 245     score = test.judge(model, deep_error=True)
    246     t_end = datetime.utcnow()
    247 

/opt/conda/envs/python2/lib/python2.7/site-packages/sciunit/tests.pyc in judge(self, model, skip_incapable, stop_on_error, deep_error)
    233 
    234         if deep_error:
--> 235             score = self._judge(model, skip_incapable=skip_incapable)
    236         else:
    237             try:

/opt/conda/envs/python2/lib/python2.7/site-packages/sciunit/tests.pyc in _judge(self, model, skip_incapable)
    176 
    177         # 2.
--> 178         prediction = self.generate_prediction(model)
    179         self.check_prediction(prediction)
    180         self.last_model = model

/opt/conda/envs/python2/lib/python2.7/site-packages/morphounit/tests/test_NeuroM_MorphStats.pyc in generate_prediction(self, model, verbose)
    268 
    269         # Creating the prediction file with morph_stats
--> 270         self.path_test_output = model.morph_stats_output
    271         self.morp_path = model.morph_path
    272 

/opt/conda/envs/python2/lib/python2.7/site-packages/sciunit/models/base.pyc in __getattr__(self, attr)
     96             except:
     97                 raise AttributeError("Model %s has no attribute %s"
---> 98                                      % (self, attr))
     99         return result
    100 

AttributeError: Model 052913-7DL40xNJZ-rep-ax-cor has no attribute morph_stats_output
pedroernesto commented 5 years ago

In principle, the second part of the test is currently handling only FS neurons, not MS neurons. In fact, there is a cell just at the beginning to check this. Above it says 'Part 2: Soft Constraints Validation [Currently only available for Fast Spiking Interneurons]' More experimental data is needed for MS neurons