Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from kubeflow:main #100

Merged
merged 6 commits into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ updates:
directories:
- "/"
- "/clients/ui/bff/"
- "/csi"
schedule:
interval: "weekly"
- package-ecosystem: "pip"
Expand All @@ -26,4 +27,4 @@ updates:
- package-ecosystem: "npm"
directory: "/clients/ui/frontend/"
schedule:
interval: "weekly"
interval: "weekly"
50 changes: 25 additions & 25 deletions clients/python/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ require (
github.com/containerd/log v0.1.0 // indirect
github.com/cpuguy83/dockercfg v0.3.1 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/docker/docker v27.1.0+incompatible
github.com/docker/docker v27.1.1+incompatible
github.com/docker/go-connections v0.5.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk=
github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
github.com/docker/docker v27.1.0+incompatible h1:rEHVQc4GZ0MIQKifQPHSFGV/dVgaZafgRf8fCPtDYBs=
github.com/docker/docker v27.1.0+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/docker v27.1.1+incompatible h1:hO/M4MtV36kzKldqnA37IWhebRA+LnqqcqDja6kVaKY=
github.com/docker/docker v27.1.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c=
github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc=
github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4=
Expand Down
6 changes: 6 additions & 0 deletions test/robot/MRkeywords.resource
Original file line number Diff line number Diff line change
Expand Up @@ -207,3 +207,9 @@ I get ArtifactsByModelVersionID
Fail Not Implemented
END
RETURN ${result}


I use util s3_uri_from
[Arguments] ${path} ${bucket} ${endpoint} ${region}
${result}= s3_uri_from path=${path} bucket=${bucket} endpoint=${endpoint} region=${region}
RETURN ${result}
7 changes: 7 additions & 0 deletions test/robot/ModelRegistry.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from model_registry.core import ModelRegistryAPIClient
from model_registry.types import ModelArtifact, ModelVersion, RegisteredModel
from robot.libraries.BuiltIn import BuiltIn
import model_registry.utils


def write_to_console(s):
Expand Down Expand Up @@ -33,6 +34,12 @@ async def upsert_model_artifact(
write_to_console(p)
return (await self.api.upsert_model_artifact(p, model_version_id)).id

def s3_uri_from(self, path, bucket, endpoint, region) -> str:
"""
Expose util to RobotFramework
"""
return model_registry.utils.s3_uri_from(path=path, bucket=bucket, endpoint=endpoint, region=region)


async def test():
demo_instance = ModelRegistry()
Expand Down
29 changes: 29 additions & 0 deletions test/robot/UserStory.robot
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,32 @@ As a MLOps engineer I would like to store an owner for the RegisteredModel
${r} Then I get RegisteredModelByID id=${rId}
And Should be equal ${r["description"]} Lorem ipsum dolor sit amet
And Should be equal ${r["owner"]} My owner

As a MLOps engineer I want to track a Model from an S3 bucket Data Connection
${data_connection_name} Set Variable aws-connection-my-data-connection
${s3_bucket} Set Variable my-bucket
${s3_path} Set Variable my-path
${s3_endpoint} Set Variable https://minio-api.acme.org
${s3_region} Set Variable us-east-1

Set To Dictionary ${registered_model} description=The Model name=${name}
Set To Dictionary ${model_version} description=The Version name=v1.0
${art_uri} I use util s3_uri_from path=${s3_path} bucket=${s3_bucket} endpoint=${s3_endpoint} region=${s3_region}
Set To Dictionary ${model_artifact} description=The Artifact uri=${art_uri} modelFormatName=onnx modelFormatVersion=1 storageKey=${data_connection_name} storagePath=${s3_path}
Log to console ${model_artifact}

${rId} Given I create a RegisteredModel payload=${registered_model}
${vId} And I create a child ModelVersion registeredModelID=${rId} payload=&{model_version}
${aId} And I create a child ModelArtifact modelversionId=${vId} payload=&{model_artifact}
${r} Then I get RegisteredModelByID id=${rId}
And Should be equal ${r["description"]} The Model
${r} Then I get ModelVersionByID id=${vId}
And Should be equal ${r["description"]} The Version
And Should be equal ${r["name"]} v1.0
${r} Then I get ModelArtifactByID id=${aId}
And Should be equal ${r["description"]} The Artifact
And Should be equal ${r["uri"]} s3://my-bucket/my-path?endpoint=https://minio-api.acme.org&defaultRegion=us-east-1
And Should be equal ${r["modelFormatName"]} onnx
And Should be equal ${r["modelFormatVersion"]} 1
And Should be equal ${r["storageKey"]} aws-connection-my-data-connection
And Should be equal ${r["storagePath"]} my-path
Loading