Skip to content

Commit

Permalink
Include runcard name to mongo workers log filenames
Browse files Browse the repository at this point in the history
  • Loading branch information
Cmurilochem committed Mar 29, 2024
1 parent 9be8b73 commit 6a750fb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion n3fit/src/n3fit/hyper_optimization/mongofiletrials.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ def __init__(
)
self.workers = []
self.log_files = []
self.output_path = replica_path.parts[-3]

self._store_trial = False
self._json_file = replica_path / "tries.json"
Expand Down Expand Up @@ -266,7 +267,7 @@ def start_mongo_workers(
# my_env["TF_GPU_ALLOCATOR"] = "cuda_malloc_async"

# create log files to redirect the mongo-workers output
mongo_workers_logfile = f"mongo-worker_{i+1}.log"
mongo_workers_logfile = f"mongo-worker_{i+1}_{self.output_path}.log"
log_file = open(mongo_workers_logfile, 'w')
self.log_files.append(log_file)
# run mongo workers
Expand Down

0 comments on commit 6a750fb

Please sign in to comment.