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

Issue #749 - Use streamlit to display graphs in sim plotter #793

Merged
merged 32 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
4ac985f
First draft/initial commit.
calina-c Mar 14, 2024
1bf99e2
Add streamlit in setup.py.
calina-c Mar 14, 2024
79c25d7
Merge branch 'main' into streamlit-sim
calina-c Mar 14, 2024
f125719
Fix some linter issues.
calina-c Mar 14, 2024
899d85e
Fix mypy issues.
calina-c Mar 14, 2024
e7fc7d8
Add UX shortcut for streamlit.
calina-c Mar 15, 2024
e86f319
Merge branch 'main' into streamlit-sim
calina-c Mar 15, 2024
7065213
Fix entrpoint conditions.
calina-c Mar 18, 2024
408ab26
Merge branch 'main' into streamlit-sim
calina-c Mar 18, 2024
e7588eb
Merge branch 'main' into streamlit-sim
calina-c Mar 18, 2024
834819b
Convert first line chart.
calina-c Mar 19, 2024
7fa506c
Convert trader profit vs time figure.
calina-c Mar 19, 2024
9ae219e
Convert accuracy plot.
calina-c Mar 19, 2024
04d425b
Grid adjustments.
calina-c Mar 20, 2024
27dbeaf
Merge branch 'main' into streamlit-sim
calina-c Mar 20, 2024
24e51cd
Finish converting scatter plots.
calina-c Mar 20, 2024
ff88e76
Convert precision vs recall chart.
calina-c Mar 20, 2024
663e692
Fix previous merge conflict resolution.
calina-c Mar 20, 2024
cde3f9d
Convert varimps chart.
calina-c Mar 21, 2024
fbd5ab0
Convert contour response.
calina-c Mar 22, 2024
deac2b3
Replace single var plot.
calina-c Mar 25, 2024
2cc991a
Remove former figures from plotters.
calina-c Mar 25, 2024
5ec449a
Linter fixes.
calina-c Mar 25, 2024
950b026
Merge branch 'main' into streamlit-sim
calina-c Mar 25, 2024
0ab6cc8
Fix tests.
calina-c Mar 25, 2024
4967164
Prototype for P/C streamlit plotting.
calina-c Mar 26, 2024
7d2a279
Fixes and corner cases for streamlit sim display.
calina-c Mar 27, 2024
058aaa5
Merge branch 'main' into streamlit-sim
calina-c Mar 27, 2024
e055aef
Linter fixes after merge and P/C architecture fix.
calina-c Mar 27, 2024
312c2c5
Add scaffolding for multisim id.
calina-c Mar 27, 2024
3414c81
Add empty sim state folder to git.
calina-c Mar 27, 2024
7bbb512
Add instructions to readme.
calina-c Mar 27, 2024
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,9 @@ csvs/
parquet_data/
pdr_predictions.parquet

# sim state
sim_state/*.pkl

# pdr_backend accuracy output
pdr_backend/accuracy/output/*.json

Expand Down
3 changes: 2 additions & 1 deletion READMEs/trader.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ What it does:
- Build a model
- Predict
- Trade
- Plot profit versus time, more
- Log to console and `logs/out_<time>.txt`

"Predict" actions are _two-sided_: it does one "up" prediction tx, and one "down" tx, with more stake to the higher-confidence direction. Two-sided is more profitable than one-sided prediction.
Expand All @@ -86,6 +85,8 @@ To see simulation CLI options: `pdr sim -h`.

Simulation uses Python [logging](https://docs.python.org/3/howto/logging.html) framework. Configure it via [`logging.yaml`](../logging.yaml). [Here's](https://medium.com/@cyberdud3/a-step-by-step-guide-to-configuring-python-logging-with-yaml-files-914baea5a0e5) a tutorial on yaml settings.

Plot profit versus time, more: use `streamlit run sim_plots.py` to display real-time plots of the simulation while it is running. After the final iteration, the app settles into an overview of the final state.

## Run Trader Bot on Sapphire Testnet

Predictoor contracts run on [Oasis Sapphire](https://docs.oasis.io/dapp/sapphire/) testnet and mainnet. Sapphire is a privacy-preserving EVM-compatible L1 chain.
Expand Down
5 changes: 4 additions & 1 deletion mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ ignore_missing_imports = True
[mypy-pdr_backend.predictoor.examples.*]
ignore_missing_imports = True

[mypy-plotly.*]
ignore_missing_imports = True

[mypy-polars.*]
ignore_missing_imports = True

Expand Down Expand Up @@ -72,4 +75,4 @@ ignore_missing_imports = True
ignore_missing_imports = True

[mypy-solcx.*]
ignore_missing_imports = True
ignore_missing_imports = True
Loading
Loading