<jupyter_start><jupyter_text>With actual hyper-parameters<jupyter_code>rootdir = '/Users/alexanderkell/Documents/PhD/Projects/17-ftt-power-reinforcement/data/ray_results_total'

df_list = []
for subdir, dirs, files in os.walk(rootdir):
    for file in files:
        path = os.path.join(subdir, file)
#         print(path)
        if "params.json" in path:
#             print(path)
            with open(path) as json_file:
                json_data = json.load(json_file)
            neuron_layers = json_data['critic_hiddens']
#             print(type(neuron_layers))
        if ".csv" in path:
#             print(path)    
            csv_file = pd.read_csv(path, index_col=None, header=0)
#         csv_file['neuron_params'] = neuron_layers
    csv_file['Hyperparameter set'] = "["+", ".join(str(x) for x in neuron_layers)+"]"
    df_list.append(csv_file)
#         print(csv_file.head())
        
total_frame = pd.concat(df_list, axis=0, ignore_index=True)
total_frame
sns.lineplot(data=total_frame[total_frame.timesteps_total>20000], x='timesteps_total', y='episode_reward_min', hue='Hyperparameter set')
sns.lineplot(data=total_frame[total_frame.timesteps_total>20000], x='timesteps_total', y='episode_reward_mean', hue='Hyperparameter set')
sns.lineplot(data=total_frame[total_frame.timesteps_total>20000], x='timesteps_total', y='episode_reward_max', hue='Hyperparameter set')
total_frame.to_csv("/Users/alexanderkell/Documents/PhD/Projects/17-ftt-power-reinforcement/data/outputs/hyperparameter_tuning_training_with_params.csv")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1305732484076433, 'fraction_numerical': 0.01337579617834395, 'mean_word_length': 4.3074324324324325, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '227998', 'license': 'BSD-2-Clause', 'n_tokens_mistral': 582, 'n_tokens_neox': 545, 'n_words': 74, 'path': 'notebooks/3.0-ajmk-visualising-tuning-results.ipynb', 'repo_name': 'alexanderkell/reinforcement-learning-investment-FTT-Power', 'size': '1570'}