Training is missing metrics property in response object
The Training resource object is missing the metrics property, so it is not set when getting a response from the API. If you do a raw curl or get request to the endpoint, the metrics are included.
Prediction has metrics and is working as it should.
Hi @digitalchild 👋
Thanks for spotting this!
You're absolutely right — the Training object was missing the metrics property in the replicate-python client, even though it's returned by the raw API.
This issue has now been addressed in the PR #429, which adds the missing metrics field to the Training model.
To fix this on your end:
-
Update to the latest version of
replicate-pythononce the PR is merged and released:
pip install --upgrade replicate -
After the update, you'll be able to access training metrics directly like this:
training.metrics["accuracy"](or whichever metric your training returns)
Let me know if you need help accessing the metrics after the update!
Thanks again for your contribution 🙌