experiments
experiments copied to clipboard
keep job_name and output log directory names consistent
I'm not sure the best way to do this, but it would be nice to be able to easily keep the name of the job and the name of the directory it is writing logs to consistent. Ideally in some standard directory structure like: .../experiment_name/job_name
. I have a solution now, but it requires sticking more logic in the script itself, and it would be nice to not replicate this in every script. Perhaps this issue belongs somewhere else.
My current solution, for reference is to decide where to log in the script itself using:
os.path.join(
'/output',
os.environ.get('EXPERIMENT_NAME', 'manual'),
os.environ.get('JOB_NAME', datetime.datetime.now().strftime("%Y-%m-%d-%H-%M-%S-%f")),
)