Commit Graph

25 Commits

Author SHA1 Message Date
Jon Burdo ec49073cff
feat: add metric history bulk fetch endpoint (#1535)
This adds a new endpoint to fetch metric history items for multiple
experiment runs at once:

  GET /experiment_runs/metric_history

Without arguments this fetches metric history for every experiment run.

To fetch metric history for a specific set of experiment runs, the
`filterQuery` param can be used with `experimentRunId IN (1,2,3)`:

  GET /experiment_runs/metric_history?filterQuery=experimentRunId+IN+(1,2,3)

AI-assisted: Claude Code 1.0.63 (claude-sonnet-4@20250514)

Signed-off-by: Jon Burdo <jon@jonburdo.com>
2025-09-05 06:11:12 +00:00
Alessio Pragliola 266023f9dc
feat: mlmd removal from codebase (#1267)
* feat: remove most of MLMD references

Signed-off-by: Alessio Pragliola <seth.pro@gmail.com>

* fix: post rebase

Signed-off-by: Alessio Pragliola <seth.pro@gmail.com>

* fix: add function from mlmd deleted file

Signed-off-by: Alessio Pragliola <seth.pro@gmail.com>

* chore: removed pending mlmd references

Signed-off-by: Alessio Pragliola <seth.pro@gmail.com>

* fix: remove unused function

Signed-off-by: Alessio Pragliola <seth.pro@gmail.com>

* chore: remove unused files

Signed-off-by: Alessio Pragliola <seth.pro@gmail.com>

---------

Signed-off-by: Alessio Pragliola <seth.pro@gmail.com>
2025-08-13 13:31:14 +00:00
Dhiraj Bokde 655a9d5eee
Add support for Experiment tracking in Model Registry, fixes #1224 (#1318)
* feat: initial version of experiments and runs API

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* feat: experiments and runs initial implementation (wip)

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: fixed failing unit tests for experiments and runs

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: added experiment and experimentrun tests

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* feat: added DataSet, Metric, and Parameter types

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* feat: added implementatio of DataSet, Metric, and Param, including service tests

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: replace int properties for timestamps with string because mlmd type properties only support int32, not int64

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* feat: add support for artifactType query param to filter artifact types in artifact queries

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: add metrics history endpoint and metric history storage for experiment run metrics

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: fix artifactType query param type in generated service

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: fix go lint error in unit test

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: filter out metric history from artifacts endpoints

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: fix metric history name to use last update time to avoid name conflicts

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* feat: add filterQuery param on all context types to search by properties and custom properties

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* feat: initial version of experiment tracking implemented on embedmd, rebased on main

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* feat: add support for filterQuery parameter for all ListResponse endpoints for embedmd datastore

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: add support for stepIds query parameter in embedmd datastore

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* feat: refactor embedmd db service to use generic repository implementation to reduce code duplication

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: add support for artifactType query parameter for embedmd datastore

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: use mysql 8.3 in unit tests

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: refactor name mapping and default name handling in embedmd datastore

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* feat: support updating metrics and parameters by name, fix ignoring metric history when retrieving all artifacts for runs and versions

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: add missing generated openapi python client files for PR github action check

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: fix failing shared db tests

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: add support for metric and parameter description, add missing type property migraiton

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* chore: update files from main

Signed-off-by: Alessio Pragliola <seth.pro@gmail.com>

* fix: added missing godoc comments in pkg/api/api.go

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: replace ambiguous ArtifactListReponse return type from GetExperimentRunMetricHistory with MetricListResponse

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: fixed incorrect artifactType in dataset response, added tests to verify all artifact types

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* feat: add validation for endTimeSinceEpoch property on experiment run updates

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* Replace value type validation map with a switch in query_translator.go

Co-authored-by: Paul Boyd <paul@camelot.email>
Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: add service e2e tests for filterQuery, fix name query param handling, fix DB tests that didn't use parent id prefix

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* chore: code cleanup, replace interface{} with any, added vetting for internal/db/filter

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* chore: added flag vF for fixed string grep exclude

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: copied orderby and parameters back to registry and catalog to have different values

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: fixed mlmd query translator handling of escaped backslashes

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* chore: add test to verify parseCustomPropertyField won't panic with a property name ending in dot

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: sync generated python client code

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: readiness probe tests and new types

Signed-off-by: Alessio Pragliola <seth.pro@gmail.com>

* chore: refactor readiness_test

Signed-off-by: Alessio Pragliola <seth.pro@gmail.com>

* fix: ensure parentResourceId is used to filter resource lookup by params, add unit tests for duplicate child resource lookups

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: throw an error if a metric value is missing, add test to validate

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: fix http status error code for invalid ids

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: more id validation, fixed filterQuery passing to DB layer

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: fix failing unit test

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: validate experiment id when listing runs

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: fix failing validation test after fixing http status codes

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: avoid duplicate key errors if externalid is set in metric when creating metric history entries

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: add fuzzer tests for experiment runs and new artifact types

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* chore: code cleanup and format fuzzer tests

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: log error in fuzzer test

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

* fix: handle null artifact names correctly on create

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>

---------

Signed-off-by: Dhiraj Bokde <dhirajsb@users.noreply.github.com>
Signed-off-by: Alessio Pragliola <seth.pro@gmail.com>
Signed-off-by: Alessio Pragliola <83355398+Al-Pragliola@users.noreply.github.com>
Co-authored-by: Alessio Pragliola <seth.pro@gmail.com>
Co-authored-by: Alessio Pragliola <83355398+Al-Pragliola@users.noreply.github.com>
Co-authored-by: Paul Boyd <paul@camelot.email>
2025-08-12 09:26:11 +00:00
Adysen Rothman 83890bf1b0
remove todo 401 (#1007)
Signed-off-by: Adysen Rothman <85646824+adysenrothman@users.noreply.github.com>
2025-04-22 14:03:30 +00:00
Alessio Pragliola 8a39ad5396
fix: patch requests to artifact endpoint make mr panic (#718)
* fix: patch requests to artifact endpoint make mr panic

Signed-off-by: Alessio Pragliola <seth.pro@gmail.com>

* chore: remove commented code

Signed-off-by: Alessio Pragliola <seth.pro@gmail.com>

---------

Signed-off-by: Alessio Pragliola <seth.pro@gmail.com>
2025-01-20 19:29:52 +00:00
Isabella Basso 0d77878a53
OAS: add generic artifacts routes (#406)
* OAS: add generic artifacts routes

Signed-off-by: Isabella do Amaral <idoamara@redhat.com>

* OAS: make discriminator explicit as model prop

Signed-off-by: Isabella do Amaral <idoamara@redhat.com>

* update existing artifact with custom helper

Signed-off-by: Isabella do Amaral <idoamara@redhat.com>

---------

Signed-off-by: Isabella do Amaral <idoamara@redhat.com>
2024-09-25 15:04:34 +00:00
Isabella Basso e5422f7f5b
enable standalone artifacts (#376)
* core: enable standalone artifacts

Fixes: #231
Signed-off-by: Isabella do Amaral <idoamara@redhat.com>

* core: improve tests

Signed-off-by: Alessio Pragliola <seth.pro@gmail.com>
Co-authored-by: Alessio Pragliola <seth.pro@gmail.com>
Signed-off-by: Isabella do Amaral <idoamara@redhat.com>

* py: update core bindings to match core API

Signed-off-by: Isabella do Amaral <idoamara@redhat.com>

* oapi: override readOnly id in response models

This is a workaround to allow upserting models using
a `POST` request to `/model_versions/{id}/artifacts`.

Signed-off-by: Isabella do Amaral <idoamara@redhat.com>

* docs: update go lib docs

Signed-off-by: Isabella do Amaral <idoamara@redhat.com>

* api: fix upsert MV artifact response status

Signed-off-by: Isabella do Amaral <idoamara@redhat.com>

* docs: apply suggestion

Signed-off-by: Isabella do Amaral <idoamara@redhat.com>

---------

Signed-off-by: Isabella do Amaral <idoamara@redhat.com>
Signed-off-by: Alessio Pragliola <seth.pro@gmail.com>
Co-authored-by: Alessio Pragliola <seth.pro@gmail.com>
2024-09-18 14:57:27 +00:00
Isabella Basso bdbc3eed8b
wrap default openapi error handler (#235)
Signed-off-by: Isabella do Amaral <idoamara@redhat.com>
2024-08-05 07:53:38 +00:00
Isabella Basso 90ae8f4f84
REST: Fix PATCH method (#151)
* update goverter to 1.4.1

As that fixed a nil assignment override[1][2] which prevented us from
emulating copy constructors[3].
The update also allows us to use generics.

[1]: https://github.com/jmattheis/goverter/issues/146#issuecomment-2161457915
[2]: https://github.com/jmattheis/goverter/issues/97
[3]: https://github.com/jmattheis/goverter/issues/147

Signed-off-by: Isabella Basso do Amaral <idoamara@redhat.com>
Signed-off-by: Isabella do Amaral <idoamara@redhat.com>

* simplify converter utils using generics

Signed-off-by: Isabella do Amaral <idoamara@redhat.com>

* server: update existing objects on PATCH

Signed-off-by: Isabella do Amaral <idoamara@redhat.com>

---------

Signed-off-by: Isabella Basso do Amaral <idoamara@redhat.com>
Signed-off-by: Isabella do Amaral <idoamara@redhat.com>
2024-06-26 06:33:46 +00:00
Isabella Basso a32b1c9818
Handle errors gracefully on routes (#93)
* fix error handling on GetServingEnvs

Signed-off-by: Isabella Basso do Amaral <idoamara@redhat.com>

* use semantic error const on BuildListOption

Signed-off-by: Isabella Basso do Amaral <idoamara@redhat.com>

* use http status code enum

Signed-off-by: Isabella Basso do Amaral <idoamara@redhat.com>

* simplify status code conversion on routes

Signed-off-by: Isabella Basso do Amaral <idoamara@redhat.com>

---------

Signed-off-by: Isabella Basso do Amaral <idoamara@redhat.com>
2024-05-16 17:08:44 +00:00
Isabella Basso ab5ffa9d81
Handle REST status codes (#74)
* core: handle 400 and 404

Signed-off-by: Isabella do Amaral <idoamara@redhat.com>

* handle conversion errors as 400

Signed-off-by: Isabella do Amaral <idoamara@redhat.com>

---------

Signed-off-by: Isabella do Amaral <idoamara@redhat.com>
2024-05-02 07:39:50 +00:00
Matteo Mortari 2245b4b0dc
fix: query param might be empty string value (#49)
...handle gin-generated code by openapi-codegen internally,
so to make propert string ptr semantic as expected by core lib,
as a query param might not even be passed during requests

Signed-off-by: Matteo Mortari <matteo.mortari@gmail.com>
2024-03-25 15:32:18 +00:00
Isabella Basso 962c78df14
OAS: fix minor issues and bump version (#29)
* OAS: fixup ID -> Id in parameter names

... to preserve camelCase.

Signed-off-by: Isabella Basso do Amaral <idoamara@redhat.com>

* fix REST api to use ModelVersionUpdate in PATCH method

Signed-off-by: Matteo Mortari <matteo.mortari@gmail.com>

* bump OAS version to v1alpha3

Signed-off-by: Isabella Basso do Amaral <idoamara@redhat.com>

---------

Signed-off-by: Isabella Basso do Amaral <idoamara@redhat.com>
Signed-off-by: Matteo Mortari <matteo.mortari@gmail.com>
Co-authored-by: Matteo Mortari <matteo.mortari@gmail.com>
2024-03-13 10:09:18 +00:00
Andrea Lamparelli edefcc49f7
kubeflow: fix go module and odh. debranding (#15)
* kubeflow: change go module name and references

Signed-off-by: Andrea Lamparelli <a.lamparelli95@gmail.com>

* kubeflow: rename odh. into kfmr.

Signed-off-by: tarilabs <matteo.mortari@gmail.com>

* kubeflow: py: pyproject description

Signed-off-by: tarilabs <matteo.mortari@gmail.com>

* kubeflow: nit picks in text documents

Signed-off-by: tarilabs <matteo.mortari@gmail.com>

---------

Signed-off-by: Andrea Lamparelli <a.lamparelli95@gmail.com>
Signed-off-by: tarilabs <matteo.mortari@gmail.com>
Co-authored-by: tarilabs <matteo.mortari@gmail.com>
2024-02-22 10:54:22 +00:00
Andrea Lamparelli 4060a213cb
Add parentResourceID param for FindInferenceService (#311) 2024-02-15 14:22:39 +01:00
Isabella Basso do Amaral 70eefeb1c6 add DocArtifact type
Closes: #263

Signed-off-by: Isabella Basso do Amaral <idoamara@redhat.com>
2024-02-09 12:51:07 -03:00
Andrea Lamparelli eaaae5966c
Fix rest params order (#245) 2023-12-15 16:36:40 +01:00
Andrea Lamparelli da45646a96
Enhance go api for serving (#219) 2023-12-01 09:22:43 +01:00
Andrea Lamparelli 4932968fff
Make core models importable (#149) 2023-11-14 17:39:52 +01:00
Matteo Mortari 9d9d48fd33
Create BuildListOption for REST query params (#139)
* Create BuildListOption for REST query params

* Implement code review feedback

* Dockerfile: copy pkg source folder

---------

Co-authored-by: Andrea Lamparelli <a.lamparelli95@gmail.com>
2023-11-14 09:39:09 +01:00
Andrea Lamparelli 1a7a4138d8
Make model registry core importable as library (#140) 2023-11-14 08:51:53 +01:00
Andrea Lamparelli 7218dd9d01
Implement Model Serving API in the GO Core layer (#128)
* extend core api to serving-related operations

* add goverter for serving

* Implement ServingEnvironment in core and tests

* Implement InferenceService in core layer

* Bugfix: misc

* WIP Test InferenceService

* Complete testing for InferenceService

* Implement basic ServeModel and WIP tests

* Complete ServeModel tests

* Implement remaining API and cover with tests

* Wire REST api to CORE api calls

---------

Co-authored-by: tarilabs <matteo.mortari@gmail.com>
2023-11-09 10:48:05 +01:00
Matteo Mortari c0d00e5733
Implement REST API Server for Model Registry (#108)
* WIP working manually

* Increase REST wirings and cover with Robot

* Align to a309537 Improve core layer testing #85

* Implement opeanpi models converter

* Treat coreApi as interface

* Align to ModelArtifact comment, not resolved yet

* Automate type_asserts generation with gen/openapi-server

* Add Robot for Data Layer mapping

implementing REST(Go)<->gRPC

* Add check for artifactType

* Wire REST FindXXX to core GetXXXByParams

* Wire REST GetXXXYYY to core API methods

* Wire REST UpdateXXX to core UpsertXXX methods

* Use localhost for Robot file

* Align to goverter changes

* rebase goverter implementation

* Update cmd/proxy.go

Co-authored-by: Andrea Lamparelli <a.lamparelli95@gmail.com>

---------

Co-authored-by: Andrea Lamparelli <a.lamparelli95@gmail.com>
2023-11-07 10:55:48 +01:00
Dhiraj Bokde 89af156717
Fix MetadataValue to use named property value types, add registeredModelID query param (#75)
* Fix MetadataValue to use named property value types

* Add registeredModelID query parameter for ModelVersion search

* Wire OpenAPI Metadata changes in core mapper

---------

Co-authored-by: tarilabs <matteo.mortari@gmail.com>
2023-10-20 10:35:10 +02:00
Dhiraj Bokde 659ec4e776
Refactor model registry openapi definition. (#66)
* Refactor openapi definition

* Add name query parameter for model_version url, fix Artifact oneOf definition

* Added sortOrder query param

* Fix allOf composites for BaseArtifactUpdate and ModelArtifactUpdate

* Add model-serving metadata resources, openapi-generator-cli, and generated model, server, and proxy cmd

* Fix allOf types for InferenceServiceCreate and InferenceServiceUpdate
2023-10-18 09:15:17 -07:00