Closed russelljjarvis closed 7 years ago
@russelljjarvis
This is supposed to be taken care of automatically by the fact that (at least in scidash/dev
) all core types now inherit from sciunit.SciUnit
, which creates an unpicklable
attribute in its constructor. If this is working, then why do we also need a picklable
attribute as well? Shouldn't everything that is not unpicklable be picklable?
Sorry yes, it was supposed to read:
if not hasattr(score,'unpicklable'):
score.unpicklable = []
I must have been tired when writing it.
I can confirm that the lines:
class SciUnit(object):
"""Abstract base class for models, tests, and scores."""
def __init__(self):
self.unpicklable = [] # Attributes that cannot or should n
are still in sciunit, note that this seems to satisfy all of the tests in the suite besides class RheobaseTest(VmTest)
, which is the only test to contain score type of scores.RatioScore
. I am unsure why it fails for scores.RatioScore but not the other score types. Looking into this now.
I think if I add unpicklable = []
as an attribute to the SciUnit class, not just create it in the constructor, then any subclass instance should have that attribute even if somehow the constructor never got called. I think the constructor isn't getting called because you are somehow putting instances of tests into test suites with attributes that were not fully realized by the usual route.
Done in scidash/sciunit@e6f7009308da71086e2451c2c927d485d3b4c631. Check to see if this works for you know, @russelljjarvis.
I think this is fixed or obsolete with the new Backend implementation.
The file neuronunit/
__init__.py
fails with the stack trace:I am trying to conditionally make a list type of score.picklable but it seems to fail regardless:
I am using:
which does not seem to work.