-
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 #1384: Improve Predictoors Table #1398
Conversation
@kdetry @KatunaNorbert @idiom-bytes @trentmc Improvements I see:
For us it is an extra JOIN, but for the user it might be a huge time-saver since they don't have to paste in filters all the time. Let me know what you guys think. Maybe it's a bad idea, maybe it's not doable now, but I'd like to discuss it and have an issue if it looks useful to you. |
Gm @calina-c , you're absolutely right, people mostly want to see their accounts, or compare their accounts to global. And in fact, @KatunaNorbert and I were talking about it yesterday:) And, we discussed a simple way to do it: specify via ppss.yaml. My specific suggestion: have a new section in predictoor_ss called "my_addresses" where you can optionally list your addresses. That's it. Then this can get picked up by Predictoor Dashboard or anywhere else.
Appendix: The Predictoor Dashboard prototype slides had this feature too: |
I like it when multiple people have the same idea, this means it's something of a high value. We can prioritise it, add it to v0.2 and start working on it right away. Looks like we have a clear description on how to implement it:
|
Yes, and specifically, put it inside the predictoor_ss section. Because it's really for people running predictoors. This also allows us to leverage all the predictoor_ss infra. |
Created the issue: |
I found it inconvenient to fetch all payouts and calculate the table stats with Python because of reloading a huge data on memory. Instead, I implemented an SQL logic to improve performance and reduce performance costs. |
|
||
result = get_user_payouts_stats_from_db(ppss.lake_ss.lake_dir) | ||
|
||
print("result--->", result) |
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.
remove print or use logger if needed
@@ -142,13 +145,49 @@ def update_predictoors_table_on_search( | |||
predictoors_data, "user", search_value, selected_predictoors | |||
) | |||
|
|||
if user_payout_stats: | |||
# Her bir data elemanı için, eşleşen user_payout_stat bulunur ve güncellenir. | |||
# Eşleşme yoksa, orijinal data elemanı korunur. |
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.
I think we should translate this to english 😄
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.
Sorry my fault :D
"avg_accuracy": round(data["avg_accuracy"], 2), | ||
"avg_stake": round(data["avg_stake"], 2), | ||
"user": data["user"], | ||
} |
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.
can we save this values directly on the predictoor_data state inside get_input_data_from_db
so we don't have to filter and select them on each predictoor table action?
GROUP BY | ||
"user" | ||
""", | ||
) |
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.
good job with the query, the data comes in very fast!
I'm wondering if we can unite this query with the get predictoors one and have a get predictoors data query containing all the data we need, should be straight forward.
Could you also make make the column containing the tables wider? It should be wide enough to have all the columns visible |
|
||
|
||
@enforce_types | ||
def process_user_payout_stats( |
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.
Looks much cleaner now, but we should add a better name to this function: "get_predictoors_data_from_payouts" or something similar
I see, so it should be fixed in the metrics calculation then |
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.
LGTM! Thanks for also fixing the metrics issue
* Fix #1376: Change callbacks to not store payout data (#1378) * Fix #1375: Add Buttons and Sorting (#1379) * Fix #1373: Separate some concerns in pdr-dashboard. (#1390) * Fix #1374: Display metrics over multiple feeds and predictoors (#1377) * Fix #1400: Fix selections in feed and predictoor list (#1401) * Fix #1385: Add switch to display selected predictoors feeds only (#1395) * Fix #1402: Allow address config for predictoor dashboard. (#1403) * Fix #1404: Allow date period selection (#1405) * Fix #1384: Improve predictoors table by adding accuracy, stake and profit (#1398) * Fix #1409: Add predictoor and feed startup data instead of loading on a dash component (#1411) * Fix #1412: Update dashboard readme with new instructions (#1414) * Fix #1413: Update and split dash_duo tests (#1417)
Fixes #1384
Changes on this PR: