-
Notifications
You must be signed in to change notification settings - Fork 5
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
Conversation
tarilabs
commented
Feb 18, 2025
- cli option for ModelCarD
- refactor E2E test based on local testing, now checking we can 'pin' this in GHA with this PR
cc @Crazyglue |
8b8ad1c
to
565f977
Compare
Signed-off-by: tarilabs <[email protected]>
565f977
to
9c2c96d
Compare
There was a problem hiding this 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
.github/workflows/e2e.yaml
Outdated
- 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 |
There was a problem hiding this comment.
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
# 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 |
There was a problem hiding this comment.
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?
Signed-off-by: tarilabs <[email protected]>