fingerprinted now should work correctly
This commit is contained in:
@@ -39,10 +39,15 @@ class Config(ConfigParser, ABC):
|
||||
h = hashlib.md5()
|
||||
params = deepcopy(self.as_dict)
|
||||
del params['model']['type']
|
||||
del params['model']['secondary_type']
|
||||
del params['data']['worker']
|
||||
del params['main']
|
||||
h.update(str(params).encode())
|
||||
del params['project']
|
||||
# Flatten the dict of dicts
|
||||
for section in list(params.keys()):
|
||||
params.update({f'{section}_{key}': val for key, val in params[section].items()})
|
||||
del params[section]
|
||||
_, vals = zip(*sorted(params.items(), key=lambda tup: tup[0]))
|
||||
h.update(str(vals).encode())
|
||||
fingerprint = h.hexdigest()
|
||||
return fingerprint
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ from pytorch_lightning.loggers.base import LightningLoggerBase
|
||||
from pytorch_lightning.loggers.neptune import NeptuneLogger
|
||||
from pytorch_lightning.loggers.test_tube import TestTubeLogger
|
||||
|
||||
from utils.config import Config
|
||||
from .config import Config
|
||||
|
||||
|
||||
class Logger(LightningLoggerBase, ABC):
|
||||
|
||||
@@ -23,3 +23,5 @@ def run_n_in_parallel(f, n, processes=0, **kwargs):
|
||||
p.join()
|
||||
|
||||
return results
|
||||
|
||||
raise NotImplementedError()
|
||||
|
||||
Reference in New Issue
Block a user