update sdk with new adds#467
Open
luke-e-schaefer wants to merge 5 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Added
create_evaluation_v2()acceptsslice_id(restrict the evaluation to a slice's items) andexclusion_rules(drop items/annotations before metrics are computed) via the newMetadataExclusionRule,LabelExclusionRule, andBoxAreaExclusionRuletypes (or equivalent dicts). TheEvaluationV2resource exposesslice_id,exclusion_rules, andexclusion_stats.EvaluationV2FilterArgsgainsgt_area_range(filter by ground-truth box area, e.g. COCO small/medium/large bands) andslice_ids, applied by bothcharts()andexamples().name+allowed_label_matches+exclusion_rules) viaNucleusClient.list_evaluation_v2_presets(),create_evaluation_v2_preset(),update_evaluation_v2_preset(), anddelete_evaluation_v2_preset(), plus the newEvaluationV2Presetresource (withupdate()/delete()). Apply a preset directly when creating an evaluation:create_evaluation_v2(model_run_id, preset=preset)seeds the matches and rules (explicit arguments override the preset).create_evaluation_v2()acceptsonly_items_with_predictionsto restrict the evaluation to items that have at least one prediction.create_evaluations_v2_batch()creates one evaluation per(model_run_id, slice_id)pair with a shared configuration, running concurrently and returning aBatchEvaluationResultper job (capturing the created evaluation or the per-job error).EvaluationV2.cancel()stops a running evaluation;EvaluationV2.retry()re-runs a failed one, reusing its slice/matches/exclusion rules.Dataset.evaluation_label_schema()returns the dataset's ground-truth and prediction label vocabularies (gt_labels/prediction_labels) for building label matches and label exclusion rules.Changed
EvaluationV2.examples()now treatsmatch_typeas optional — omit it to return examples of all match types.Fixed
EvaluationV2.charts()issues aPOST(matching the backend route) instead of aGETwith a query string, which did not reach the server.Greptile Summary
This PR expands Evaluation V2 support in the Python SDK. The main changes are:
Confidence Score: 5/5
The SDK changes are merge-safe based on the reviewed API surface and tests.
The implementation is covered by targeted Evaluation V2 and preset tests, and no blocking correctness issues were identified.
What T-Rex did
Reviews (4): Last reviewed commit: "greptile" | Re-trigger Greptile