Skip to content

Commit

Permalink
Update run_all_model
Browse files Browse the repository at this point in the history
  • Loading branch information
Derek-Wds committed Dec 2, 2020
1 parent 745b931 commit 91c3dfd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/run_all_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import functools
import statistics
import subprocess
from datetime import datetime
from pathlib import Path
from operator import xor
from pprint import pprint
Expand Down Expand Up @@ -45,8 +46,6 @@

GetData().qlib_data(target_dir=provider_uri, region=REG_CN)
qlib.init(provider_uri=provider_uri, region=REG_CN, exp_manager=exp_manager)
if os.path.isdir(exp_path):
shutil.rmtree(exp_path)

# decorator to check the arguments
def only_allow_defined_args(function_to_decorate):
Expand Down Expand Up @@ -291,7 +290,8 @@ def run(times=1, models=None, exclude=False):
sys.stderr.write(f"Here are some of the errors of the models...\n")
pprint(errors)
sys.stderr.write("\n")

# move results folder
shutil.move(exp_path, exp_path + f"_{datetime.now().strftime("%Y-%m-%d_%H:%M:%S")}")

if __name__ == "__main__":
fire.Fire(run) # run all the model

0 comments on commit 91c3dfd

Please sign in to comment.