Skip to content

Commit 189652d

Browse files
committed
Change experiments_by_{input,output}_file to use text files with experiment hashes instead of symlinks
1 parent 40b6383 commit 189652d

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

logrun/internals.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -298,20 +298,16 @@ def save_experiment(self) -> None:
298298

299299
output_file_repr = output_file.replace(os.sep, '%')
300300
shutil.copyfile(output_file, os.path.join(output_files_path, output_file_repr))
301-
os.symlink(experiment_path_targz,
302-
os.path.join(ensure_dir_exists(os.path.join(experiment_by_outfile_path,
303-
output_file_repr)),
304-
start_datetime.strftime('%Y-%m-%d-%H-%M-%S') + '.' + self.uuid))
301+
with open(os.path.join(experiment_by_outfile_path, output_file_repr), 'a') as file:
302+
print(self.uuid, file=file)
305303
with open(os.path.join(experiment_path, 'input_files.pickle'), 'wb') as file:
306304
pickle.dump({input_file: eval_checksum(input_file)
307305
for input_file in self.input_files},
308306
file)
309307
for input_file in self.input_files:
310308
input_file_repr = input_file.replace(os.sep, '%')
311-
os.symlink(experiment_path_targz,
312-
os.path.join(ensure_dir_exists(os.path.join(experiment_by_infile_path,
313-
input_file_repr)),
314-
start_datetime.strftime('%Y-%m-%d-%H-%M-%S') + '.' + self.uuid))
309+
with open(os.path.join(experiment_by_infile_path, input_file_repr), 'a') as file:
310+
print(self.uuid, file=file)
315311

316312
extra_keys_path = ensure_dir_exists(os.path.join(experiment_path, 'extra_keys'))
317313

0 commit comments

Comments
 (0)