Skip to content

Commit

Permalink
feat: added utility function for getting results path
Browse files Browse the repository at this point in the history
  • Loading branch information
panahiparham committed Oct 23, 2024
1 parent 002417f commit ed08c84
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions ml_experiment/_utils/path.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import os

def get_experiment_name():
import __main__
return __main__.__file__.split('/')[-2]

def get_results_path(base_path: str) -> str:
return os.path.join(
base_path,
'results',
get_experiment_name(),
)

0 comments on commit ed08c84

Please sign in to comment.