<jupyter_start><jupyter_text>Overview 1. Through the following 4 steps, manage and visualize experiments using the example below. 2. The same workflow can be applied to any machine learning project  Step 1 -<jupyter_code># 0. Create a simple training validation loop
from torch import nn
from torch import optim

def trainval(exp_dict, savedir_base):
    x = nn.Parameter(torch.zeros(10))
    f = lambda x: torch.norm(x - torch.randn(10))
    
    if exp_dict['opt'] == 'adam':
        opt = optim.Adam(x)
        
        
    score_list = []
    for e in range(10):
        score
        print()<jupyter_output><empty_output><jupyter_text>Step 2 -<jupyter_code># 1. Define a possibly large Experiment Group
import pprint
exp_list = []
for opt_name in ['adam', 'sgd', 'adagrad']:
    exp_list += [{'opt':opt_name}]
pprint.pprint(exp_list)<jupyter_output>[{'opt': 'adam'}, {'opt': 'sgd'}, {'opt': 'adagrad'}]<jupyter_text>Step 3 -<jupyter_code>savedir_base = 'results/'
for exp_dict in exp_list:
    trainval(exp_dict, savedir_base)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1271186440677966, 'fraction_numerical': 0.013182674199623353, 'mean_word_length': 4.160194174757281, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, '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': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '83579', 'license': 'Apache-2.0', 'n_tokens_mistral': 388, 'n_tokens_neox': 367, 'n_words': 102, 'path': 'getting_started.ipynb', 'repo_name': 'jqueguiner/haven', 'size': '1062'}