Skip to content

feat(experiments): Update metadata shape and add filter support#653

Merged
shanaiabuggy merged 2 commits into
mainfrom
sbuggy/ase-457
Jul 14, 2026
Merged

feat(experiments): Update metadata shape and add filter support#653
shanaiabuggy merged 2 commits into
mainfrom
sbuggy/ase-457

Conversation

@shanaiabuggy

@shanaiabuggy shanaiabuggy commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Updates Experiment.metadata and ExperimentGroup.metadata type to be dict[str, str] and adds filter support.

Summary by CodeRabbit

  • New Features

    • Added metadata key/value filtering for experiment and experiment-group listings.
    • Documented rollup metric range filter examples for experiment searches.
  • Improvements

    • Standardized experiment metadata values as strings across requests, responses, and stored records.
    • Preserved compatibility with existing metadata by converting legacy non-string values during deserialization.
  • Tests

    • Added coverage for metadata filtering and legacy metadata conversion.

Signed-off-by: shanaiabuggy <59746633+shanaiabuggy@users.noreply.github.com>
@shanaiabuggy shanaiabuggy requested review from a team as code owners July 13, 2026 17:33
@github-actions github-actions Bot added the feat label Jul 13, 2026
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 48d3051f-c4b5-48d4-99e7-02b3a155b9f4

📥 Commits

Reviewing files that changed from the base of the PR and between 275c8cd and b38c155.

⛔ Files ignored due to path filters (17)
  • sdk/python/nemo-platform/.nmpcontext/openapi.yaml is excluded by !sdk/**
  • sdk/python/nemo-platform/src/nemo_platform/resources/experiment_groups/experiment_groups.py is excluded by !sdk/**
  • sdk/python/nemo-platform/src/nemo_platform/resources/experiments/experiments.py is excluded by !sdk/**
  • sdk/python/nemo-platform/src/nemo_platform/types/experiment_groups/experiment_group_create_params.py is excluded by !sdk/**
  • sdk/python/nemo-platform/src/nemo_platform/types/experiment_groups/experiment_group_filter_param.py is excluded by !sdk/**
  • sdk/python/nemo-platform/src/nemo_platform/types/experiment_groups/experiment_group_list_params.py is excluded by !sdk/**
  • sdk/python/nemo-platform/src/nemo_platform/types/experiment_groups/experiment_group_response.py is excluded by !sdk/**
  • sdk/python/nemo-platform/src/nemo_platform/types/experiment_groups/experiment_group_update_params.py is excluded by !sdk/**
  • sdk/python/nemo-platform/src/nemo_platform/types/experiments/experiment_create_params.py is excluded by !sdk/**
  • sdk/python/nemo-platform/src/nemo_platform/types/experiments/experiment_filter_param.py is excluded by !sdk/**
  • sdk/python/nemo-platform/src/nemo_platform/types/experiments/experiment_list_params.py is excluded by !sdk/**
  • sdk/python/nemo-platform/src/nemo_platform/types/experiments/experiment_response.py is excluded by !sdk/**
  • sdk/python/nemo-platform/src/nemo_platform/types/experiments/experiment_update_params.py is excluded by !sdk/**
  • sdk/python/nemo-platform/src/nemo_platform/types/intake/ingest/atif_trajectory_param.py is excluded by !sdk/**
  • sdk/python/nemo-platform/tests/api_resources/intake/ingest/test_atif.py is excluded by !sdk/**
  • sdk/python/nemo-platform/tests/api_resources/test_experiment_groups.py is excluded by !sdk/**
  • sdk/python/nemo-platform/tests/api_resources/test_experiments.py is excluded by !sdk/**
📒 Files selected for processing (8)
  • openapi/ga/individual/platform.openapi.yaml
  • openapi/ga/openapi.yaml
  • openapi/openapi.yaml
  • services/intake/src/nmp/intake/api/v2/experiments/endpoints.py
  • services/intake/src/nmp/intake/api/v2/experiments/schemas.py
  • services/intake/src/nmp/intake/entities/experiments.py
  • services/intake/tests/test_experiment_default_sort.py
  • services/intake/tests/test_experiment_optimization_fields.py

📝 Walkthrough

Walkthrough

Experiment and experiment-group metadata now uses string-valued schemas, supports metadata key/value list filters, preserves legacy deserialization through coercion, and adds coverage for filtering and metadata conversion.

Changes

Experiment Metadata Filtering

Layer / File(s) Summary
API filtering contracts and documentation
openapi/.../platform.openapi.yaml, openapi/ga/openapi.yaml, openapi/openapi.yaml, services/intake/.../experiments/endpoints.py
OpenAPI schemas and list endpoint descriptions document metadata filters and constrain metadata values to strings.
Typed metadata schemas and coercion
services/intake/.../experiments/schemas.py, services/intake/.../entities/experiments.py
Request, response, filter, and entity models use string-valued metadata; legacy non-string values are JSON-stringified during validation.
Metadata coercion and filtering tests
services/intake/tests/test_experiment_default_sort.py, services/intake/tests/test_experiment_optimization_fields.py
Tests cover legacy metadata conversion and metadata filtering for experiments and experiment groups.

Suggested reviewers: briannewsom, jashg, mckornfield, benmccown, aray12

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 11.11% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Title accurately summarizes the main change: metadata type tightening and new filter support for experiments.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sbuggy/ase-457

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor
Suite Lines Covered Line Rate Branch Rate
Unit Tests 23845/31009 76.9% 61.7%
Integration Tests 13817/29658 46.6% 19.6%

Signed-off-by: shanaiabuggy <59746633+shanaiabuggy@users.noreply.github.com>
Comment thread services/intake/src/nmp/intake/entities/experiments.py
@shanaiabuggy shanaiabuggy added this pull request to the merge queue Jul 14, 2026
Merged via the queue into main with commit 316cb62 Jul 14, 2026
55 checks passed
@shanaiabuggy shanaiabuggy deleted the sbuggy/ase-457 branch July 14, 2026 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants