diff --git a/docs/FAQ/FAQ.rst b/docs/FAQ/FAQ.rst index ba6f77b47..df910e564 100644 --- a/docs/FAQ/FAQ.rst +++ b/docs/FAQ/FAQ.rst @@ -70,3 +70,31 @@ If the issue is not resolved, use ``keys *`` to find if multiple keys exist. If Also, feel free to post a new issue in our GitHub repository. We always check each issue carefully and try our best to solve them. + +3. ModuleNotFoundError: No module named 'qlib.data._libs.rolling' +------------------------------------------------------------------------------------------------------------------------------------ + +.. code-block:: python + + #### Do not import qlib package in the repository directory in case of importing qlib from . without compiling ##### + Traceback (most recent call last): + File "", line 1, in + File "qlib/qlib/__init__.py", line 19, in init + from .data.cache import H + File "qlib/qlib/data/__init__.py", line 8, in + from .data import ( + File "qlib/qlib/data/data.py", line 20, in + from .cache import H + File "qlib/qlib/data/cache.py", line 36, in + from .ops import Operators + File "qlib/qlib/data/ops.py", line 19, in + from ._libs.rolling import rolling_slope, rolling_rsquare, rolling_resi + ModuleNotFoundError: No module named 'qlib.data._libs.rolling' + +- If the error occurs when importing ``qlib`` package with ``PyCharm`` IDE, users can execute the following command in the project root folder to compile Cython files and generate executable files: + + .. code-block:: bash + + python setup.py build_ext --inplace + +- If the error occurs when importing ``qlib`` package with command ``python`` , users need to change the running directory to ensure that the script does not run in the project directory. \ No newline at end of file diff --git a/qlib/data/ops.py b/qlib/data/ops.py index 940c24002..94f3ff5b8 100644 --- a/qlib/data/ops.py +++ b/qlib/data/ops.py @@ -1182,7 +1182,7 @@ class Slope(Rolling): Returns ---------- Expression - a feature instance with regression slope of given window + a feature instance with linear regression slope of given window """ def __init__(self, feature, N): @@ -1210,7 +1210,7 @@ class Rsquare(Rolling): Returns ---------- Expression - a feature instance with regression r-value square of given window + a feature instance with linear regression r-value square of given window """ def __init__(self, feature, N):