Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
you-n-g committed Jan 17, 2022
1 parent 6ed3d0a commit 2251402
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion qlib/data/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ class LocalFeatureProvider(FeatureProvider, ProviderBackendMixin):

def __init__(self, remote=False, backend={}):
super().__init__()
self.remote = kwargs.get("remote", False)
self.remote = remote
self.backend = backend

def feature(self, instrument, field, start_index, end_index, freq):
Expand Down
6 changes: 3 additions & 3 deletions qlib/data/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -1391,14 +1391,14 @@ def __str__(self):

def _load_internal(self, instrument, start_index, end_index, freq):
assert any(
[isinstance(self.feature_left, TExpression), self.feature_right, TExpression]
[isinstance(self.feature_left, Expression), self.feature_right, Expression]
), "at least one of two inputs is Expression instance"

if isinstance(self.feature_left, TExpression):
if isinstance(self.feature_left, Expression):
series_left = self.feature_left.load(instrument, start_index, end_index, freq)
else:
series_left = self.feature_left # numeric value
if isinstance(self.feature_right, TExpression):
if isinstance(self.feature_right, Expression):
series_right = self.feature_right.load(instrument, start_index, end_index, freq)
else:
series_right = self.feature_right
Expand Down

0 comments on commit 2251402

Please sign in to comment.