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

core: cli modelcard option, E2E test refactor #15

Merged
merged 2 commits into from
Feb 19, 2025

Conversation

tarilabs
Copy link
Member

  • cli option for ModelCarD
  • refactor E2E test based on local testing, now checking we can 'pin' this in GHA with this PR

@tarilabs tarilabs requested a review from jaideepr97 February 18, 2025 12:58
@tarilabs
Copy link
Member Author

cc @Crazyglue

@tarilabs tarilabs force-pushed the tarilabs-20250218-modelcardannotations branch from 8b8ad1c to 565f977 Compare February 18, 2025 13:02
@tarilabs tarilabs force-pushed the tarilabs-20250218-modelcardannotations branch from 565f977 to 9c2c96d Compare February 18, 2025 13:03
Copy link
Contributor

@Crazyglue Crazyglue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, one small suggestion, nothing critical

Comment on lines 47 to 60
- name: Run OLOT tutorial of README, and load image in KinD for amd64
run: |
IMAGE_DIR=download
OCI_REGISTRY_SOURCE=quay.io/mmortari/hello-world-wait:latest
OCI_REGISTRY_DESTINATION=localhost:5001/nstestorg/modelcar
rm -rf $IMAGE_DIR
skopeo copy --multi-arch all docker://${OCI_REGISTRY_SOURCE} oci:${IMAGE_DIR}:latest
poetry run olot $IMAGE_DIR tests/data/sample-model/model.joblib --modelcard tests/data/sample-model/README.md
# copy modelcar from oci-layout to the local docker registry
skopeo copy --tls-verify=false --multi-arch all oci:${IMAGE_DIR}:latest docker://${OCI_REGISTRY_DESTINATION}
# make sure the annotation is present
digest=$(skopeo inspect --tls-verify=false --raw docker://localhost:5001/nstestorg/modelcar | jq -r '.manifests[] | select(.platform.architecture == "amd64") | .digest')
skopeo inspect --tls-verify=false docker://${OCI_REGISTRY_DESTINATION}@$digest --raw | jq -e '.layers | last | has("annotations")'
# tag amd64 as modelcar:v1 and load image in KinD cluster
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great!!

README.md Outdated
Comment on lines 27 to 28
# Appends to the image found in `download` the files `model.joblib` and as ModelCarD the `README.md`
poetry run olot $IMAGE_DIR tests/data/sample-model/model.joblib --modelcard tests/data/sample-model/README.md
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps to improve clarity, it might make sense to move the --modelcard ... snippet to before the "rest args". this is to ensure differentiation between a named-parameter vs the list of files that can be passed into olot

ie: poetry run olot $IMAGE_DIR --modelcard tests/data/sample-model/README.md tests/data/sample-model/model.joblib

wdyt?

@jaideepr97 jaideepr97 merged commit 9b034a6 into main Feb 19, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants