Description
The max_epochs
parameter specifies the maximum number of epochs to train your model. An epoch is defined as the process of completing a specific number of training steps. At the end of each epoch, Kumo evaluates the model on the validation set to track its performance.
Kumo organizes the training and evaluation process using max_epochs
alongside other key parameters, including num_experiments
, max_steps_per_epoch
, max_val_steps
, and max_test_steps
.
Below is the pseudo code that demonstrates how Kumo manages the training and evaluation process:
for experiment in range(num_experiments):
model = create_new_model()
for epoch in range(max_epochs):
# Training
for training_step in range(max_steps_per_epoch):
batch = sample_mini_batch(batch_size, "train")
pred = model(batch)
loss = compute_loss(pred, batch)
train_metrics = compute_metrics(pred, batch)
loss.backward()
optimizer.step()
# Validation
for validation_step in range(max_val_steps):
batch = sample_mini_batch(batch_size, "val")
pred = model(batch)
val_metrics = compute_metrics(pred, batch)
if should_early_stop:
break
# Testing
for test_step in range(max_test_steps):
batch = sample_mini_batch(batch_size, "test")
pred = best_model(batch)
test_metrics = compute_metrics(pred, batch)
Supported Task Types
- All
Default Values
run_mode | Default Value |
---|---|
FAST | 8 |
NORMAL | 12 |
BEST | 16 |
Updated 11 days ago