diff --git a/dacapo/experiments/starts/start.py b/dacapo/experiments/starts/start.py index 6f4dd50ae..0e9e8f7e4 100644 --- a/dacapo/experiments/starts/start.py +++ b/dacapo/experiments/starts/start.py @@ -185,8 +185,13 @@ def __init__(self, start_config): Start class with specified config to run the initialization of weights for a model associated with a specific criterion. """ - self.run = start_config.run - self.criterion = start_config.criterion + # Old version return a dict, new version return an object, this line is to support both + if isinstance(start_config, dict): + self.run = start_config["run"] + self.criterion = start_config["criterion"] + else: + self.run = start_config.run + self.criterion = start_config.criterion self.channels = None diff --git a/dacapo/store/converter.py b/dacapo/store/converter.py index bffa526db..62bb2f4df 100644 --- a/dacapo/store/converter.py +++ b/dacapo/store/converter.py @@ -117,10 +117,15 @@ def __typed_structure(self, obj_data, cls, cls_fn): to determine the class. This is useful for reconstructing a concrete class from unstructured data. """ - - cls = cls_fn(obj_data["__type__"]) - structure_fn = make_dict_structure_fn(cls, self) - return structure_fn(obj_data, cls) + try: + cls = cls_fn(obj_data["__type__"]) + structure_fn = make_dict_structure_fn(cls, self) + return structure_fn(obj_data, cls) + except: + print( + f"Could not structure object of type {obj_data}. will try unstructured data. attr __type__ can be missing because of old version of the data." + ) + return obj_data # The global converter object, to be used by stores to convert objects into