machine-learning-exchange / mlx

Machine Learning eXchange (MLX). Data and AI Assets Catalog and Execution Engine
https://ml-exchange.org/
Apache License 2.0
204 stars 54 forks source link

Add API endpoints for asset versioning #289

Open ckadner opened 2 years ago

ckadner commented 2 years ago

In order to enable versioning of the assets in the MLX catalog, we need to add additional API endpoints. This follows closely the approach taken, and API endpoints available for pipeline versions in KFP.

Existing API Endpoints (i.e. for components)

https://ml-exchange.org/apis/v1alpha1/ui/#/ComponentService

/components
  GET
  POST
/components/{id}
  GET
  DELETE
/components/{id}/download
  GET
/components/{id}/generate_code
  GET
/components/{id}/run
  POST
/components/{id}/templates
  GET
/components/upload
  POST
/components/upload_from_url
  POST
/components/{id}/upload:  ## update existing, currently overrides previous version, will be removed
  POST
/components/featured
  POST
/components/publish_approved
  POST

New API Endpoints (i.e. component_versions)

/component_versions
  GET
  POST
/component_versions/{version_id}
  GET
  DELETE
/component_versions/{version_id}/templates
  GET
/components/{component_id}/default_version/{version_id}
  POST
/components/upload_version
  POST

The properties of the new "version" Swagger object (i.e. apiComponentVersion)

- id
- name
- description
- created_at
- tag              # semantic tag, like Docker image tags 
- code_source_url  # GitHub URL including the commit hash corresponding to version in MLX
- ...              # remaining asset-specific properties

Additional properties added to existing Swagger objects (i.e. apiComponent)

- default_version
- code_source_url  # GitHub URL including the commit hash corresponding to version in MLX
ckadner commented 2 years ago

@Tomcli @animeshsingh