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

Get parameters and results of all the trials #132

Closed
riyadparvez opened this issue Jul 31, 2019 · 8 comments
Closed

Get parameters and results of all the trials #132

riyadparvez opened this issue Jul 31, 2019 · 8 comments
Assignees
Labels
enhancement New feature or request fixready Fix has landed on master.

Comments

@riyadparvez
Copy link

AxClient class has get_best_parameters() method. I don't see any methods in AxClient class that returns all the trials with their parameters and evaluation results. Is there any plans to add such API?

@dongyaoli
Copy link

AxClient class has get_best_parameters() method. I don't see any methods in AxClient class that returns all the trials with their parameters and evaluation results. Is there any plans to add such API?

I think you can get the full results using the experiment object inside the client

ax = AxClient()
result = ax.experiment.fetch_data()

@riyadparvez
Copy link
Author

This is what I see if I do print(result.df)

  arm_name metric_name      mean  sem  trial_index
0      0_0   hartmann6 -0.016126  0.0            0
1      0_0      l2norm  1.384382  0.0            0
2      1_0   hartmann6 -0.114288  0.0            1
3      1_0      l2norm  0.663507  0.0            1
4      2_0   hartmann6 -0.009832  0.0            2
5      2_0      l2norm  1.874537  0.0            2

Still no easy way to get the parameters and the metrics.

@lena-kashtelyan
Copy link
Contributor

@riyadparvez, in the short run you can get trials as ax_client.experiment.trials, and you can get parameters from each one of the trials as trial.arm.parameters. Will add this functionality to the service API, too, but that should get you unblocked for now.

@lena-kashtelyan lena-kashtelyan added the enhancement New feature or request label Aug 1, 2019
@lena-kashtelyan lena-kashtelyan self-assigned this Aug 1, 2019
@riyadparvez
Copy link
Author

@lena-kashtelyan thanks, it worked.

Is it also possible to expose which trial yielded the best results?

@lena-kashtelyan
Copy link
Contributor

Hello again, @riyadparvez –– currently get_best_parameters outputs a tuple of parameterization and metric values; you can use the former as a workaround for now, to find which trial output the results.

get_best_parameters is still somewhat under development; thank you for the good idea of adding the trial index to its output!

facebook-github-bot pushed a commit that referenced this issue Sep 19, 2019
Summary: Piggybacking off of `exp_to_df` that Jacob added to solve #132

Reviewed By: stevemandala

Differential Revision: D17463749

fbshipit-source-id: b1c7c1735c1c9fd85e35af24f13878915790eff6
@lena-kashtelyan
Copy link
Contributor

This is now on master! You can do ax_client.get_trials_data_frame() : )

@lena-kashtelyan lena-kashtelyan added the fixready Fix has landed on master. label Sep 24, 2019
@lena-kashtelyan
Copy link
Contributor

This functionality is now available in the latest stable version, 0.1.6!

@riyadparvez
Copy link
Author

Thanks a lot! Will give it a try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fixready Fix has landed on master.
Projects
None yet
Development

No branches or pull requests

3 participants