Skip to content

Commit 7a2203f

Browse files
committed
update comments
1 parent 0236034 commit 7a2203f

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

qlib/data/dataset/handler.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,7 @@ def config(self, **kwargs):
125125

126126
def setup_data(self, enable_cache: bool = False):
127127
"""
128-
Set Up the data.
129-
In case of running intialization for multiple time, it will do nothing for the second time.
128+
Set Up the data in case of running intialization for multiple time
130129
131130
It is responsible for maintaining following variable
132131
1) self._data
@@ -431,7 +430,7 @@ def config(self, processor_kwargs: dict = None, **kwargs):
431430

432431
def setup_data(self, init_type: str = IT_FIT_SEQ, **kwargs):
433432
"""
434-
Set up the data of Qlib
433+
Set up the data in case of running intialization for multiple time
435434
436435
Parameters
437436
----------

qlib/data/dataset/processor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def is_for_infer(self) -> bool:
7575
def config(self, **kwargs):
7676
attr_list = {"fit_start_time", "fit_end_time"}
7777
for k, v in kwargs.items():
78-
if k in attr_list and getattr(self, k, None) is not None:
78+
if k in attr_list and hasattr(self, k):
7979
setattr(self, k, v)
8080

8181
for attr in attr_list:

0 commit comments

Comments
 (0)