Skip to content

Commit

Permalink
update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
bxdd committed Mar 30, 2021
1 parent 8b6b7dc commit 8facd69
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions qlib/data/dataset/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,7 @@ def config(self, **kwargs):

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

def setup_data(self, init_type: str = IT_FIT_SEQ, **kwargs):
"""
Set up the data of Qlib
Set up the data in case of running intialization for multiple time
Parameters
----------
Expand Down
2 changes: 1 addition & 1 deletion qlib/data/dataset/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def is_for_infer(self) -> bool:
def config(self, **kwargs):
attr_list = {"fit_start_time", "fit_end_time"}
for k, v in kwargs.items():
if k in attr_list and getattr(self, k, None) is not None:
if k in attr_list and hasattr(self, k):
setattr(self, k, v)

for attr in attr_list:
Expand Down

0 comments on commit 8facd69

Please sign in to comment.