handle model deploy when no metrics to compare #1289
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The autodeploy feature deploys the newly trained model only if the
f1
score is higher than the model that is currently deployed. However, there can be cases where we aren't able to compute thef1
score, such as when the test set only contains positive labels (results in divide by zero). This can happen if the training data is sorted by labels in Postgres andtest_sampling => 'first'
, or if its just a horribly unbalanced training set and some bad luck withtest_sampling => 'random'
.In either case, there's legitimate reasons that the f1 score does not exist. So, rather than crash we can do two things;