diff --git a/.github/workflows/test_qlib_from_source.yml b/.github/workflows/test_qlib_from_source.yml index 73a934d93f..6b846c7911 100644 --- a/.github/workflows/test_qlib_from_source.yml +++ b/.github/workflows/test_qlib_from_source.yml @@ -45,6 +45,7 @@ jobs: run: | python -m pip install --upgrade cython python -m pip install -e .[dev] + pip install git+https://github.com/qianyun210603/arctic.git@master - name: Lint with Black run: | @@ -84,7 +85,7 @@ jobs: # We use sys.setrecursionlimit(2000) to make the recursion depth larger to ensure that pylint works properly (the default recursion depth is 1000). - name: Check Qlib with pylint run: | - pylint --disable=C0104,C0114,C0115,C0116,C0301,C0302,C0411,C0413,C1802,R0401,R0801,R0902,R0903,R0904,R0911,R0912,R0913,R0914,R0915,R1702,R1720,W0105,W0123,W0201,W0511,W0613,W1113,W1514,E0401,E1121,C0103,C0209,R0402,R1705,R1710,R1725,R1735,W0102,W0212,W0221,W0223,W0231,W0237,W0612,W0621,W0622,W0703,W1309,E1102,E1136 --const-rgx='[a-z_][a-z0-9_]{2,30}$' qlib --init-hook "import astroid; astroid.context.InferenceContext.max_inferred = 500; import sys; sys.setrecursionlimit(2000)" + pylint --disable=C0104,C0114,C0115,C0116,C0301,C0302,C0411,C0413,C1802,R0401,R0801,R0901,R0902,R0903,R0904,R0911,R0912,R0913,R0914,R0915,R1702,R1720,W0105,W0123,W0201,W0511,W0613,W1113,W1514,E0401,E1121,C0103,C0209,R0402,R1705,R1710,R1725,R1735,W0102,W0212,W0221,W0223,W0231,W0237,W0612,W0621,W0622,W0703,W1309,E1102,E1136 --const-rgx='[a-z_][a-z0-9_]{2,30}$' qlib --init-hook "import astroid; astroid.context.InferenceContext.max_inferred = 500; import sys; sys.setrecursionlimit(2000)" # The following flake8 error codes were ignored: # E501 line too long diff --git a/.github/workflows/test_qlib_from_source_slow.yml b/.github/workflows/test_qlib_from_source_slow.yml index 58b5a56f19..35e6f51386 100644 --- a/.github/workflows/test_qlib_from_source_slow.yml +++ b/.github/workflows/test_qlib_from_source_slow.yml @@ -32,6 +32,7 @@ jobs: python -m pip install --upgrade pip pip install --upgrade cython numpy pip install -e .[dev] + pip install git+https://github.com/qianyun210603/arctic.git@master - name: Downloads dependencies data run: | diff --git a/qlib/workflow/expm.py b/qlib/workflow/expm.py index 31df16d564..59365799df 100644 --- a/qlib/workflow/expm.py +++ b/qlib/workflow/expm.py @@ -430,7 +430,7 @@ def delete_exp(self, experiment_id=None, experiment_name=None): def list_experiments(self): # retrieve all the existing experiments - exps = self.client.list_experiments(view_type=ViewType.ACTIVE_ONLY) + exps = self.client.search_experiments(view_type=ViewType.ACTIVE_ONLY) experiments = dict() for exp in exps: experiment = MLflowExperiment(exp.experiment_id, exp.name, self.uri) diff --git a/qlib/workflow/recorder.py b/qlib/workflow/recorder.py index 45028368b8..9eb23e98dc 100644 --- a/qlib/workflow/recorder.py +++ b/qlib/workflow/recorder.py @@ -2,6 +2,7 @@ # Licensed under the MIT License. import os +import platform import pickle import shutil import subprocess @@ -317,7 +318,10 @@ def get_local_dir(self): This function will return the directory path of this recorder. """ if self.artifact_uri is not None: - local_dir_path = Path(self.artifact_uri.lstrip("file:")) / ".." + if platform.system() == "Windows": + local_dir_path = Path(self.artifact_uri.lstrip("file:").lstrip("/")) / ".." + else: + local_dir_path = Path(self.artifact_uri.lstrip("file:")) / ".." local_dir_path = str(local_dir_path.resolve()) if os.path.isdir(local_dir_path): return local_dir_path diff --git a/setup.py b/setup.py index 1063745493..144c27e322 100644 --- a/setup.py +++ b/setup.py @@ -44,8 +44,7 @@ def get_version(rel_path: str) -> str: # What packages are required for this module to be executed? # `estimator` may depend on other packages. In order to reduce dependencies, it is not written here. REQUIRED = [ - "numpy>=1.12.0, <1.25", - "pandas>=0.25.1", + "numpy>=1.23", "scipy>=1.0.0", "requests>=2.18.0", "sacred>=0.7.4", @@ -64,14 +63,13 @@ def get_version(rel_path: str) -> str: "pyyaml>=5.3.1", # To ensure stable operation of the experiment manager, we have limited the version of mlflow, # and we need to verify whether version 2.0 of mlflow can serve qlib properly. - "mlflow>=1.12.1, <=1.30.0", + "mlflow>=1.12.1", "tqdm", "loguru", - "arctic", "lightgbm>=3.3.0", "tornado", "joblib>=0.17.0", - "ruamel.yaml>=0.16.12", + "ruamel.yaml>=0.16.12,<0.18.0", "pymongo", # For task management "scikit-learn>=0.22", "dill", @@ -82,6 +80,7 @@ def get_version(rel_path: str) -> str: # Installing the latest version of protobuf for python versions below 3.8 will cause unit tests to fail. "protobuf<=3.20.1;python_version<='3.8'", "cryptography", + "pandas>=2.0.0", ] # Numpy include @@ -141,7 +140,7 @@ def get_version(rel_path: str) -> str: "wheel", "setuptools", "black", - "pylint", + "pylint==2.17.5", # Using the latest versions(0.981 and 0.982) of mypy, # the error "multiprocessing.Value()" is detected in the file "qlib/rl/utils/data_queue.py", # If this is fixed in a subsequent version of mypy, then we will revert to the latest version of mypy. @@ -183,12 +182,10 @@ def get_version(rel_path: str) -> str: # 'License :: OSI Approved :: MIT License', "Operating System :: POSIX :: Linux", "Operating System :: Microsoft :: Windows", - "Operating System :: MacOS", "License :: OSI Approved :: MIT License", "Development Status :: 3 - Alpha", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", ],