def _get_experiment(experiment_dir_path): meta = read_yaml(experiment_dir_path, FileStore.META_DATA_FILE_NAME) return Experiment.from_dictionary(meta)
def get_run_info(run_dir): meta = read_yaml(run_dir, FileStore.META_DATA_FILE_NAME) return RunInfo.from_dictionary(meta)
def _get_run_info_from_dir(self, run_dir): meta = read_yaml(run_dir, FileStore.META_DATA_FILE_NAME) run_info = _read_persisted_run_info_dict(meta) return run_info
def __init__(self, root, file_name, edit_func): self._root = root self._file_name = file_name self._edit_func = edit_func self._original = read_yaml(root, file_name)
def _load_project(project_dir): return Project(file_utils.read_yaml(project_dir, "MLproject"))
def _load_project(work_dir, uri): return Project(_expand_uri(uri), file_utils.read_yaml(work_dir, "MLproject"))
def test_yaml_read_and_write(self): yaml_file = random_file("yaml") data = {"a": random_int(), "B": random_int()} file_utils.write_yaml(self.test_folder, yaml_file, data) read_data = file_utils.read_yaml(self.test_folder, yaml_file) self.assertEqual(data, read_data)