1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-19 02:14:33 +08:00

Update run_all_model and format

This commit is contained in:
Jactus
2020-11-26 13:49:51 +08:00
parent 5102566aad
commit 2a17062421
3 changed files with 2 additions and 18 deletions

View File

@@ -8,7 +8,7 @@
Users can follow the ``workflow_by_code_tft.py`` to run the benchmark. Users can follow the ``workflow_by_code_tft.py`` to run the benchmark.
### Notes ### Notes
1. Please be **aware** that this script can only support `Python 3.5 - 3.8`, and `Cuda 10.0 or 10.1`. 1. Please be **aware** that this script can only support `Python 3.5 - 3.8`.
2. Please remember to install `cudatoolkit==10.1` and `cudnn==7.6` on your machine. 2. If the CUDA version on your machine is not 10.0, please remember to run the following commands `conda install anaconda cudatoolkit=10.0` and `conda install cudnn` on your machine.
3. The model must run in GPU, or an error will be raised. 3. The model must run in GPU, or an error will be raised.
4. New datasets should be registered in ``data_formatters``, for detail please visit the source. 4. New datasets should be registered in ``data_formatters``, for detail please visit the source.

View File

@@ -162,20 +162,6 @@ class ExtendedEnvBuilder(venv.EnvBuilder):
self.install_script(context, "pip", url) self.install_script(context, "pip", url)
# function to check cuda version on the machine, this case is for the model TFT
def check_cuda(folders):
path = "/usr/local/cuda/version.txt" # TODO: FIX ME, this will not work on other os systems.
exclude_tft = True
if os.path.exists(path):
with open(path, "r") as f:
if "10.1" in str(f.read()) or "10.0" in str(f.read()):
exclude_tft = False
if exclude_tft and "TFT" in folders:
sys.stderr.write("Compatible CUDA version not found! Removing TFT from the workflow...\n")
del folders["TFT"]
return folders
# function to calculate the mean and std of a list in the results dictionary # function to calculate the mean and std of a list in the results dictionary
def cal_mean_std(results) -> dict: def cal_mean_std(results) -> dict:
mean_std = dict() mean_std = dict()
@@ -205,7 +191,6 @@ def get_all_folders(models, exclude) -> dict:
if add: if add:
path = Path("benchmarks") / f.name path = Path("benchmarks") / f.name
folders[f.name] = str(path.resolve()) folders[f.name] = str(path.resolve())
folders = check_cuda(folders)
return folders return folders

View File

@@ -38,7 +38,6 @@ class LSTM(Model):
the GPU ID(s) used for training the GPU ID(s) used for training
""" """
def __init__( def __init__(
self, self,
d_feat=6, d_feat=6,