Skip to content

Instantly share code, notes, and snippets.

@cosmic-cortex
Created September 18, 2020 10:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cosmic-cortex/6be20d0476eb39955164bb267080bbb9 to your computer and use it in GitHub Desktop.
Save cosmic-cortex/6be20d0476eb39955164bb267080bbb9 to your computer and use it in GitHub Desktop.
MLFlow pseudocode example
import mlflow
with mlflow.start_run():
model = ... # define model here
mlflow.log_params(config) # log hyperparameter dictionary
for epoch_idx in range(num_epochs):
train_loss = train(model, data)
val_loss = validate(model, data)
mlflow.log_param("train_loss", train_loss) # log training loss
mlflow.log_param("val_loss", val_loss) # log validation loss
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment