mirror of
https://github.com/wassname/ray.git
synced 2026-09-12 12:51:15 +08:00
[tune] Tune experiment analysis improvements (#10645)
Co-authored-by: Richard Liaw <rliaw@berkeley.edu>
This commit is contained in:
co-authored by
Richard Liaw
parent
d9c68fca5c
commit
d7c7aba99c
@@ -18,7 +18,7 @@ Here are some example operations for obtaining a summary of your experiment:
|
||||
.. code-block:: python
|
||||
|
||||
# Get a dataframe for the last reported results of all of the trials
|
||||
df = analysis.dataframe()
|
||||
df = analysis.results_df
|
||||
|
||||
# Get a dataframe for the max accuracy seen for each trial
|
||||
df = analysis.dataframe(metric="mean_accuracy", mode="max")
|
||||
|
||||
@@ -219,16 +219,24 @@ Analysis
|
||||
|
||||
analysis = tune.run(trainable, search_alg=algo, stop={"training_iteration": 20})
|
||||
|
||||
# Get the best hyperparameters
|
||||
best_hyperparameters = analysis.get_best_config()
|
||||
best_trial = analysis.best_trial # Get best trial
|
||||
best_config = analysis.best_config # Get best trial's hyperparameters
|
||||
best_logdir = analysis.best_logdir # Get best trial's logdir
|
||||
best_checkpoint = analysis.best_checkpoint # Get best trial's best checkpoint
|
||||
best_result = analysis.best_result # Get best trial's last results
|
||||
best_result_df = analysis.best_result_df # Get best result as pandas dataframe
|
||||
|
||||
This object can also retrieve all training runs as dataframes, allowing you to do ad-hoc data analysis over your results.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
# Get a dataframe for the max score seen for each trial
|
||||
# Get a dataframe with the last results for each trial
|
||||
df_results = analysis.results_df
|
||||
|
||||
# Get a dataframe of results for a specific score or mode
|
||||
df = analysis.dataframe(metric="score", mode="max")
|
||||
|
||||
|
||||
What's Next?
|
||||
-------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user