-
Notifications
You must be signed in to change notification settings - Fork 25
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
Fix #1263: Transform lake data into prediction signals #1297
Fix #1263: Transform lake data into prediction signals #1297
Conversation
pdr_backend/sim/sim_engine.py
Outdated
addr | ||
for addr, feed in contracts.items() | ||
if feed.symbol | ||
== f"{self.predict_feed.pair.base_str}/{self.predict_feed.pair.quote_str}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can use self.predict_feed.pair.pair_str
instead of f"{self.predict_feed.pair.base_str}/{self.predict_feed.pair.quote_str}"
pdr_backend/sim/sim_engine.py
Outdated
slot, | ||
CASE | ||
WHEN roundSumStakes = 0.0 THEN NULL | ||
WHEN roundSumStakesUp = 0.0 THEN NULL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for this case when roundSumStakesUp = 0.0
the value shouldn't be NULL
because maybe all the predictoors have staked down. It should be NULL
only if roundSumStakes = 0.0
pdr_backend/sim/sim_engine.py
Outdated
@@ -271,6 +291,51 @@ def save_state(self, i: int, N: int): | |||
return True, False | |||
|
|||
@enforce_types | |||
def _get_prediction_dataset( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you rename this and the test to _get_predictions_signals_data
? This way is more specific
598bb41
into
issue-1257-use-chain-prediction-in-trading-sim
* Fix 1262: Get prediction data for sim (PR #1265) * added new field to ppss for type of prediction source * add network param to sim cli and make fetch work * verify there is enough data in database and write test * Fix #1263: Transform lake data into prediction signals (#1297) * change ppss config to better fit the 2 prediction sources * get feed contract address from duckDB (#1311) * Fix #1316: Update readme with chain data predictions signals inside trading (#1320) * Fix #1313: mock GQLDataFactory for the sim engine (#1315) * Stop tracking lake_data/ folder
…#1341) * Fix 1262: Get prediction data for sim (PR #1265) * added new field to ppss for type of prediction source * add network param to sim cli and make fetch work * verify there is enough data in database and write test --------- Co-authored-by: Mustafa Tuncay <[email protected]> * Fix #1263: Transform lake data into prediction signals (#1297) * issue-1263: sim_engine changes * issue-1263: part 2 * test fixes * removed unnecessary console logs * fix model var imps plot on chain data * fix mypy and pylint * issue-1263: fixes * issue-1263: tests will be fixed at the epic branch * change ppss config to better fit the 2 predictions * add try catch around gql update and fix pylint --------- Co-authored-by: Norbert <[email protected]> * get feed contract address from duckDB (#1311) * Fix #1316: Update readme with chain data predictions signals inside trading (#1320) * update readmes * Fix #1313: mock GQLDataFactory for the sim engine (#1315) * Stop tracking lake_data/ folder * clear_test_db is added to test_get_predictions_signals_data, removed console logs --------- Co-authored-by: Norbert <[email protected]> * review fixes * review fixes * fixes * moved ppss validation to ppss class * use parameter names when calling sim test dict function * removed print * fix failint test in trader agent system * Default to mainnet and revert changes * Revert values * remove redundant code and move functions * update tests * SimEngineChainPredictions class * better name * revert * use dev * format * more improvements * remove check and verify * remove test * verify_use_chain_data_in_syms_dependencies * move tests * verify_use_chain_data_in_syms_dependencies * formatting * make use_own_model optional * remove param * remove * move import * remove unused import * revert changes * remove unused * revert * empty_fig * update imports * linter * Use dict * update test * linter * mypy * remove def * fix insert to table db function is depricated * move under _init_loop_attributes * shorter error * rename to prob up * improvements to readme * mypy * separate source of predictions --------- Co-authored-by: Norbert <[email protected]> Co-authored-by: Mustafa Tuncay <[email protected]> Co-authored-by: Norbert <[email protected]>
Fixes #1263
Changes proposed in this PR: