def __init__(self): self._path = Archive.check_for_home_directory(self)
def delete_settings(self, run_id): if self.validate_run(run_id): return Archive.delete_settings(run_id)
def delete_output(self, run_id): if self.validate_run(run_id): return Archive.delete_output(run_id)
def get_settings(self, run_id): if self.validate_run(run_id): return Archive.get_settings(run_id)
def get_output(self, run_id): if self.validate_run(run_id): return Archive.get_output(run_id)
def test_get_version(test_file): data = Archive.get_version(Archive, 'test', '1', test_file[:-53]) assert data == ['test']
def delete_model(self, model): if self.validate_model(model): return Archive.delete_model(model, self._path)
def delete_run(self, run_id): if self.validate_run(run_id): return Archive.delete_run(Archive, run_id, self._path)
def delete_experiment(self, model, version, experiment): if self.validate_model(model) and self.validate_version( version) and self.validate_experiment(experiment): return Archive.delete_experiment(model, version, experiment, self._path)
def get_version(self, model, version): if self.validate_model(model) and self.validate_version(version): versions = Archive.get_version(Archive, model, version, self._path) return versions
def get_model(self, model): if self.validate_model(model): mdl = Archive.get_model(Archive, model, self._path) return mdl
def get_experiment(self, model, version, experiment): if self.validate_model(model) and self.validate_version( version) and self.validate_experiment(experiment): exp = Archive.get_experiment(Archive, model, version, experiment, self._path) return exp
def test_get_run(test_file): data = Archive.get_run('12345678', test_file[:-53]) assert data == [[['loss', 255]]]
def test_get_experiment(test_file): data = Archive.get_experiment(Archive, 'test', '1', 'test', test_file[:-53]) assert data == ['12345678']
def get_run(self, run_id): if self.validate_run(run_id): run = Archive.get_run(run_id, self._path) return self.structure_metrics(run)
def delete_version(self, model, version): if self.validate_model(model) and self.validate_version(version): return Archive.delete_version(model, version, self._path)
def get_all_models(self): models = Archive.get_all_models(Archive, self._path) return models
def test_get_model(test_file): data = Archive.get_model(Archive, 'test', test_file[:-53]) assert data == ['1']