Deployments¶
Models are automatically deployed if their key metric (R2 for regression, F1 for classification) is improved over the currently deployed version during training. If you want to manage deploys manually, you can always change which model is currently responsible for making predictions.
API¶
pgml.deploy | |
---|---|
The default behavior allows any algorithm to qualify, but deployment candidates can be further restricted to a specific algorithm by passing the algorithm_name
.
Note
Deployed models are cached at the session level to improve prediction times. Active sessions will not see deploys until they reconnect.
Strategies¶
There are 3 different deployment strategies available
strategy | description |
---|---|
most_recent | The most recently trained model for this project |
best_score | The model that achieved the best key metric score |
rollback | The model that was previously deployed for this project |
Rolling back to a specific algorithm¶
Rolling back creates a new deploy for the model that was deployed before the current one. Multiple rollbacks in a row will effectively oscilate between the two most recently deployed models, making rollbacks a relatively safe operation.