Skip to content

Commit

Permalink
get base path programmatically
Browse files Browse the repository at this point in the history
  • Loading branch information
enarjord committed Sep 8, 2024
1 parent 6695235 commit 3af9f05
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/tools/extract_best_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,8 @@ def process_single(file_location, verbose=False):
coins = [s.replace("USDT", "") for s in best_d["backtest"]["symbols"]]
print_(file_location)
full_path = file_location.replace("_all_results.txt", "") + ".json"
full_path = make_get_filepath(
full_path.replace("optimize_results/", "optimize_results_analysis/")
)
base_path = os.path.split(full_path)[0]
full_path = make_get_filepath(full_path.replace(base_path, base_path + "_analysis/"))
dump_config(format_config(best_d), full_path)
return best_d

Expand Down

0 comments on commit 3af9f05

Please sign in to comment.