Skip to content

feat: implement Metric.update() via PATCH /scorers/{id} #505

Open
thiagobomfin-galileo wants to merge 2 commits intomainfrom
feat/sc-52119-metric-update
Open

feat: implement Metric.update() via PATCH /scorers/{id} #505
thiagobomfin-galileo wants to merge 2 commits intomainfrom
feat/sc-52119-metric-update

Conversation

@thiagobomfin-galileo
Copy link
Contributor

@thiagobomfin-galileo thiagobomfin-galileo commented Mar 13, 2026

User description

Shortcut:

Implement Missing CRUD Operations in future Package

Description:

  • Implements Metric.update() in the future domain layer, replacing a NotImplementedError stub that
    incorrectly claimed the API didn't support scorer updates
  • Wires up the existing but unused update_scorers_scorer_id_patch endpoint (PATCH /scorers/{id}) with
    a partial-update pattern using UNSET-aware request bodies

Tests:

  • Unit Tests Added
  • E2E Test Added (if it's a user-facing feature, or fixing a bug)

Generated description

Below is a concise technical summary of the changes proposed in this PR:
Enable Metric.update to validate fields, send UNSET-aware payloads through update_scorers_scorer_id_patch, and refresh the metric instance after the partial PATCH call. Handle missing IDs, invalid arguments, and API failures by raising clear errors and updating the sync state so callers can distinguish success from retryable issues.

TopicDetails
Update tests Validate success, validation, and failure behaviors of Metric.update using LocalMetric, LlmMetric, and mocked API responses to exercise SyncState transitions.
Modified files (1)
  • tests/future/test_metric.py
Latest Contributors(2)
UserCommitDate
jweiler@galileo.aifeat-Make-code-validat...January 16, 2026
nachiket@galileo.aifeat-Metric-Future-Pac...October 31, 2025
Metric updates Implement Metric.update to validate input, build an UpdateScorerRequest with UNSET-aware fields, call update_scorers_scorer_id_patch, and refresh the metric state on success or failure.
Modified files (1)
  • src/galileo/__future__/metric.py
Latest Contributors(2)
UserCommitDate
jweiler@galileo.aifeat-Make-code-validat...January 16, 2026
vamaq@users.noreply.gi...feat-Improve-Model-obj...November 21, 2025
This pull request is reviewed by Baz. Review like a pro on (Baz).

@codecov
Copy link

codecov bot commented Mar 13, 2026

Codecov Report

❌ Patch coverage is 92.59259% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.18%. Comparing base (459457d) to head (b8b1d73).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
src/galileo/__future__/metric.py 92.59% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #505      +/-   ##
==========================================
+ Coverage   82.08%   82.18%   +0.10%     
==========================================
  Files          96       96              
  Lines        9297     9306       +9     
==========================================
+ Hits         7631     7648      +17     
+ Misses       1666     1658       -8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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 this pull request may close these issues.

1 participant