# Load the data from a tuning result directory
RESULTS_DIR = "/path/to/tune/results/"
df = load_results_to_df(RESULTS_DIR)
# Format the results a bit
to_show = {
'Learning rate': lambda x: x['lr'],
'L2 ratio': lambda x: x['l2'],
'Decay rate': lambda x: x['dr'],
'MAE (eV/atom)': lambda x: x['MAE'],
'Time (min)': lambda x: x['time_total_s']/60}
for k, v in to_show.items():
df[k] = v(df)
df = df[to_show.keys()]
dimensions = [generate_plotly_dim_dict(df, field) for field in df]
# Visualize the tunning result
data = [go.Parcoords(
line = dict(color = df['MAE (eV/atom)'], showscale = True),
tickfont = dict(size=12), labelfont = dict(size=12),
rangefont = dict(size=12), dimensions=dimensions)]
plotly.offline.iplot(data)