system
System
¶
A class which tracks state information while the fe.Estimator is running.
This class is intentionally not @traceable.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
network |
BaseNetwork
|
The network instance being used by the current fe.Estimator. |
required |
pipeline |
Pipeline
|
The pipeline instance being used by the current fe.Estimator. |
required |
traces |
List[Union[Trace, Scheduler[Trace]]]
|
The traces provided to the current fe.Estimator. |
required |
mode |
Optional[str]
|
The current execution mode (or None for warmup). |
None
|
num_devices |
int
|
How many GPUs are available for training. |
torch.cuda.device_count()
|
log_steps |
Optional[int]
|
Log every n steps (0 to disable train logging, None to disable all logging). |
None
|
total_epochs |
int
|
How many epochs training is expected to run for. |
0
|
max_train_steps_per_epoch |
Optional[int]
|
Whether training epochs will be cut short after N steps (or use None if they will run to completion) |
None
|
system_config |
Optional[List[FeSummaryTable]]
|
A description of the initialization parameters defining the associated estimator. |
None
|
Attributes:
Name | Type | Description |
---|---|---|
mode |
What is the current execution mode of the estimator ('train', 'eval', 'test'), None if warmup. |
|
exp_id |
int
|
A unique identifier for current training experiment. |
global_step |
Optional[int]
|
How many training steps have elapsed. |
num_devices |
How many GPUs are available for training. |
|
log_steps |
Log every n steps (0 to disable train logging, None to disable all logging). |
|
total_epochs |
How many epochs training is expected to run for. |
|
epoch_idx |
Optional[int]
|
The current epoch index for the training (starting from 1). |
batch_idx |
The current batch index within an epoch (starting from 1). |
|
stop_training |
A flag to signal that training should abort. |
|
network |
A reference to the network being used. |
|
pipeline |
A reference to the pipeline being used. |
|
traces |
The traces being used. |
|
max_train_steps_per_epoch |
Training will complete after n steps even if loader is not yet exhausted. |
|
max_eval_steps_per_epoch |
Evaluation will complete after n steps even if loader is not yet exhausted. |
|
summary |
An object to write experiment results to. |
|
experiment_time |
A timestamp indicating when this model was trained. |
Source code in fastestimator\fastestimator\summary\system.py
39 40 41 42 43 44 45 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 72 73 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 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 |
|
load_state
¶
Load training state.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
load_dir |
str
|
The directory from which to reload the state. |
required |
Raises:
Type | Description |
---|---|
FileNotFoundError
|
If necessary files can not be found. |
Source code in fastestimator\fastestimator\summary\system.py
reset
¶
Reset the current System
for a new round of training, including a new Summary
object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
summary_name |
Optional[str]
|
The name of the experiment. The |
None
|
system_config |
Optional[str]
|
A description of the initialization parameters defining the associated estimator. |
None
|
Source code in fastestimator\fastestimator\summary\system.py
reset_for_test
¶
Partially reset the current System
object for a new round of testing.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
summary_name |
Optional[str]
|
The name of the experiment. If not provided, the system will re-use the previous summary name. |
None
|
Source code in fastestimator\fastestimator\summary\system.py
save_state
¶
Load training state.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
save_dir |
str
|
The directory into which to save the state |
required |
Source code in fastestimator\fastestimator\summary\system.py
update_batch_idx
¶
update_global_step
¶
write_summary
¶
Write an entry into the Summary
object (iff the experiment was named).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
key |
str
|
The key to write into the summary object. |
required |
value |
Any
|
The value to write into the summary object. |
required |