Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 13 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,34 +74,37 @@ prerequisite:

# Install the package in editable mode.
dependencies:
python -m pip install -e .
python -m pip install --no-cache-dir -e .

lightgbm:
python -m pip install lightgbm --prefer-binary
python -m pip install --no-cache-dir lightgbm --prefer-binary

rl:
python -m pip install -e .[rl]
python -m pip install --no-cache-dir -e .[rl]

develop:
python -m pip install -e .[dev]
python -m pip install --no-cache-dir -e .[dev]

lint:
python -m pip install -e .[lint]
python -m pip install --no-cache-dir -e .[lint]

docs:
python -m pip install -e .[docs]
python -m pip install --no-cache-dir -e .[docs]

package:
python -m pip install -e .[package]
python -m pip install --no-cache-dir -e .[package]

test:
python -m pip install -e .[test]
python -m pip install --no-cache-dir -e .[test]

analysis:
python -m pip install -e .[analysis]
python -m pip install --no-cache-dir -e .[analysis]

client:
python -m pip install --no-cache-dir -e .[client]

all:
python -m pip install -e .[pywinpty,dev,lint,docs,package,test,analysis,rl]
python -m pip install --no-cache-dir -e .[pywinpty,dev,lint,docs,package,test,analysis,rl]

install: prerequisite dependencies

Expand Down
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ analysis = [
"plotly",
"statsmodels",
]
client = [
"python-socketio<6",
"tables",
]

# In the process of releasing a new version, when checking the manylinux package with twine, an error is reported:
# InvalidDistribution: Invalid distribution metadata: unrecognized or malformed field 'license-file'
Expand Down
10 changes: 5 additions & 5 deletions qlib/data/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
# Licensed under the MIT License.


from __future__ import division
from __future__ import print_function
from __future__ import division, print_function

import json

import socketio

import qlib
from ..config import C

from ..log import get_module_logger
import pickle


class Client:
Expand Down Expand Up @@ -96,7 +96,7 @@ def request_callback(*args):
self.logger.debug("connected")
# The pickle is for passing some parameters with special type(such as
# pd.Timestamp)
request_content = {"head": head_info, "body": pickle.dumps(request_content, protocol=C.dump_protocol_version)}
request_content = {"head": head_info, "body": json.dumps(request_content, default=str)}
self.sio.on(request_type + "_response", request_callback)
self.logger.debug("try sending")
self.sio.emit(request_type + "_request", request_content)
Expand Down
Loading