Skip to content

Commit

Permalink
Change self.output_path to self.job_output_name
Browse files Browse the repository at this point in the history
  • Loading branch information
Cmurilochem committed Mar 29, 2024
1 parent 6a750fb commit 11f9155
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions n3fit/src/n3fit/hyper_optimization/mongofiletrials.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Hyperopt trial object for parallel hyperoptimization with MongoDB.
Data are fetched from MongoDB databases and stored in the form of json and tar.gz files within the nnfit folder.
"""

import json
import logging
import os
Expand Down Expand Up @@ -155,7 +156,7 @@ def __init__(
)
self.workers = []
self.log_files = []
self.output_path = replica_path.parts[-3]
self.job_output_name = replica_path.parts[-3]

self._store_trial = False
self._json_file = replica_path / "tries.json"
Expand Down Expand Up @@ -267,7 +268,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}_{self.output_path}.log"
mongo_workers_logfile = f"mongo-worker_{i+1}_{self.job_output_name}.log"
log_file = open(mongo_workers_logfile, 'w')
self.log_files.append(log_file)
# run mongo workers
Expand Down

0 comments on commit 11f9155

Please sign in to comment.