Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add LRU eviction with 1gb memory limit for PandasData #392

Merged
merged 15 commits into from
Mar 12, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Merged upstream and resolved conflict.
  • Loading branch information
Jim White committed Mar 11, 2024
commit 957b69cbf384ec35550d39aa7643b0155c9bfb73
2 changes: 1 addition & 1 deletion lumibot/strategies/strategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -1856,7 +1856,7 @@ def get_last_price(self, asset, quote=None, exchange=None, should_use_last_close

# Check if the asset is valid
if asset is None or (isinstance(asset, Asset) and not asset.is_valid()):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

category Critical Errors priority 7

The change in the condition to check the asset's validity is good as it uses isinstance() for type checking, which is more Pythonic. However, ensure that the Asset class has an is_valid() method implemented. If the method is not implemented, this change could lead to a runtime error when calling asset.is_valid().

logging.error(
self.logger.error(
f"Asset in get_last_price() must be a valid asset. Got {asset} of type {type(asset)}. You may be missing some of the required parameters for the asset type (eg. strike price for options, expiry for options/futures, etc)."
)
return None
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.