-
-
Notifications
You must be signed in to change notification settings - Fork 91
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
fetch the data on the table to add csv download button #648
Conversation
I am a participant in last Saturday's development sprint. |
Codecov Report
@@ Coverage Diff @@
## main #648 +/- ##
==========================================
- Coverage 62.45% 62.04% -0.41%
==========================================
Files 35 35
Lines 2224 2266 +42
==========================================
+ Hits 1389 1406 +17
- Misses 835 860 +25
... and 2 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@RuTiO2le You don't have to be sorry 👍 Thank you for your contribution. @keisuke-umezawa Could you review this PR? |
@RuTiO2le |
To make it more visible, can you follow something like this ui? https://mui.com/x/react-data-grid/export/ |
trials = get_trials(storage, study_id) | ||
|
||
param_names = list(trials[0].params.keys()) | ||
union_user_attrs = list(trials[0].user_attrs) |
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.
https://github.com/optuna/optuna-dashboard/blob/main/optuna_dashboard/ts/components/TrialTable.tsx#L143
Starts with UserAttribute
@@ -447,6 +449,41 @@ def save_trial_note(study_id: int, trial_id: int) -> dict[str, Any]: | |||
note.save_note_with_version(storage, study_id, trial_id, req_note_ver, req_note_body) | |||
response.status = 204 # No content | |||
return {} | |||
|
|||
@app.get("/csv/<study_id:int>") | |||
def download_csv(study_id: int) -> BottleViewReturn: |
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.
To strictly follow the logic of this table (ref: https://github.com/optuna/optuna-dashboard/blob/main/optuna_dashboard/ts/components/TrialTable.tsx), it will be easy to use this class. https://github.com/optuna/optuna-dashboard/blob/main/optuna_dashboard/_cached_extra_study_property.py#L43
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.
To follow the original logic, there are some differences as follows:
- Displaying user_attrs instead of union_user_attrs
- Displaying params without considering union_search_space and intersection_search_space
@RuTiO2le |
I'm sorry I missed notifications. |
Contributor License Agreement
This repository (
optuna-dashboard
) and Goptuna share common code.This pull request may therefore be ported to Goptuna.
Make sure that you understand the consequences concerning licenses and check the box below if you accept the term before creating this pull request.
Reference Issues/PRs
What does this implement/fix? Explain your changes.