Skip to content

Training is missing metrics property in response object #428

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
digitalchild opened this issue May 6, 2025 · 1 comment · May be fixed by #429
Open

Training is missing metrics property in response object #428

digitalchild opened this issue May 6, 2025 · 1 comment · May be fixed by #429

Comments

@digitalchild
Copy link

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.

@digitalchild digitalchild linked a pull request May 6, 2025 that will close this issue
@Ivan-developer0
Copy link

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:

  1. Update to the latest version of replicate-python once the PR is merged and released:
    pip install --upgrade replicate

  2. 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 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants