Created
July 13, 2020 23:51
-
-
Save shashankprasanna/0680ce7438a943f3e1f7c52de7a865ec to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sagemaker.analytics import ExperimentAnalytics | |
experiment_name = training_experiment.experiment_name | |
trial_component_analytics = ExperimentAnalytics( | |
sagemaker_session=sagemaker_session, | |
experiment_name=experiment_name, | |
) | |
trial_comp_ds = trial_component_analytics.dataframe() | |
idx_jobs = ~trial_comp_ds['test_acc - Last'].isna() | |
trial_comp_ds_jobs = trial_comp_ds_sorted.loc[idx_jobs] | |
trial_comp_ds_jobs = trial_comp_ds_jobs.sort_values('test_acc - Last', ascending=False) | |
trial_comp_ds_jobs['col_names'] = trial_comp_ds_jobs['model'] + '-' + trial_comp_ds_sorted['optimizer'] | |
trial_comp_ds_jobs['col_names'] = trial_comp_ds_jobs[['col_names']].applymap(lambda x: x.replace('"', '')) | |
fig = plt.figure() | |
fig.set_size_inches([15, 10]) | |
trial_comp_ds_jobs.plot.bar('col_names', 'test_acc - Last',ax=plt.gca()) | |
trial_comp_ds_jobs[['TrialComponentName', 'test_acc - Last', 'model', 'batch-size', 'epochs', 'learning-rate', 'optimizer']] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment