append_experiments(previous_experiments, input_combinations)
Appends new experiments to previous experiments.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
previous_experiments |
dict
|
Dictionary of trials and their hyperparameters. |
required |
input_combinations |
list
|
List of input hyperparameter combinations. |
required |
Returns:
Name | Type | Description |
---|---|---|
dict |
Updated dictionary of trials and their hyperparameters. |
Source code in wt_ml/tuning/wfo_tuning.py
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
|
get_trial_combinations(param_options)
Creates a cartesian product of all hyperparameter combinations based on input options.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
param_options |
dict
|
Tuning options for hyperparamters. |
required |
Returns:
Name | Type | Description |
---|---|---|
list |
List of hyperparameters combinations. |
Source code in wt_ml/tuning/wfo_tuning.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
|
run_wfo(dataset_kwargs, hyperparameters, trial, run_dir, min_val_date=None, max_val_date=None, net_types=None, epochs=int(2 ** 10), parallel=1, val_freq=Frequency.quarter)
Runs wfo for a single trial.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dataset_kwargs |
dict[str, Any]
|
Dataset related kwargs. |
required |
encodings |
dict[str, Any]
|
Encodings. |
required |
hyperparameters |
dict[tuple[str, ...], Any]
|
Updated hyperparameters for the trial. |
required |
trial |
str
|
Trial name. |
required |
run_dir |
str | Path
|
Trial directory. |
required |
min_val_date |
str | None
|
Minimum validation week to include in periods. Defaults to None. |
None
|
max_val_date |
str | None
|
Maximum validaiton week to include in periods. Defaults to None. |
None
|
net_types |
list[type[EconomicNetwork]] | None
|
Networks. Defaults to None. |
None
|
epochs |
int
|
Epochs. Defaults to int(2**10). |
int(2 ** 10)
|
parallel |
int
|
Number of parallel jobs for wfo periods train and predict. Defaults to 1. |
1
|
val_freq |
Frequencies
|
Validation period frequency. Defaults to "quarter". |
quarter
|
Raises:
Type | Description |
---|---|
RuntimeError
|
Raises if an exception occurs during wfo run or saving. |
Source code in wt_ml/tuning/wfo_tuning.py
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 |
|