Update scripts

This commit is contained in:
D-X-Y 2021-03-30 12:41:26 +00:00
parent 756218974f
commit 28a6c57f6e
2 changed files with 27 additions and 6 deletions

View File

@ -210,5 +210,23 @@ if __name__ == "__main__":
args.save_dir,
args.gpu,
)
else:
print("-")
elif len(args.alg) > 1:
assert args.shared_dataset, "Must allow share dataset"
configs = [
update_gpu(update_market(alg2configs[name], args.market), args.gpu)
for name in args.alg
]
qlib.init(**configs[0].get("qlib_init"))
dataset_config = configs[0].get("task").get("dataset")
dataset = init_instance_by_config(dataset_config)
pprint(dataset_config)
pprint(dataset)
for alg_name, config in zip(args.alg, configs):
for irun in range(args.times):
run_exp(
config.get("task"),
dataset,
alg_name,
"recorder-{:02d}-{:02d}".format(irun, args.times),
"{:}-{:}".format(args.save_dir, args.market),
)

View File

@ -22,8 +22,11 @@ depths="1 2 3 4 5 6"
for channel in ${channels}
do
for depth in ${depths}
do
python exps/trading/baselines.py --alg TSF-${depth}x${channel}-drop${drop} --gpu ${gpu} --market ${market}
done
python exps/trading/baselines.py --alg TSF-1x${channel}-drop${drop} \
TSF-2x${channel}-drop${drop} \
TSF-3x${channel}-drop${drop} \
TSF-4x${channel}-drop${drop} \
TSF-5x${channel}-drop${drop} \
TSF-6x${channel}-drop${drop} \
--gpu ${gpu} --market ${market} --shared_dataset True
done