Skip to content

Commit

Permalink
Update(scripts): Increase API version of Model Registry (#52)
Browse files Browse the repository at this point in the history
* Update(openshift-ci/scripts): Increase API version of Model Registry

* Update(test/scripts): Increase API version of Model Registry
  • Loading branch information
rkubis authored Apr 23, 2024
1 parent 8b5da49 commit 33dc210
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion openshift-ci/scripts/oci-model-registry-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ check_route_status() {
fi

# Test if the route is live
local response=$(curl -s -o /dev/null -w "%{http_code}" "$route_url/api/model_registry/v1alpha2/registered_models")
local response=$(curl -s -o /dev/null -w "%{http_code}" "$route_url/api/model_registry/v1alpha3/registered_models")

# Check if the response status code is 200 OK or 404 Not Found
if [[ "$response" == "200" ]]; then
Expand Down
8 changes: 4 additions & 4 deletions test/scripts/rest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ post_model_registry_data() {
timestamp=$(date +"%Y%m%d%H%M%S")
rm_name="demo-$timestamp"

rm_id=$(make_post_extract_id "$MR_HOSTNAME/api/model_registry/v1alpha2/registered_models" '{
rm_id=$(make_post_extract_id "$MR_HOSTNAME/api/model_registry/v1alpha3/registered_models" '{
"description": "lorem ipsum registered model",
"name": "'"$rm_name"'"
}')
Expand All @@ -37,7 +37,7 @@ post_model_registry_data() {
echo -e "${GREEN}✔ Success:${NC} Registered Model ID: $rm_id"
fi

mv_id=$(make_post_extract_id "$MR_HOSTNAME/api/model_registry/v1alpha2/model_versions" '{
mv_id=$(make_post_extract_id "$MR_HOSTNAME/api/model_registry/v1alpha3/model_versions" '{
"description": "lorem ipsum model version",
"name": "v1",
"author": "John Doe",
Expand All @@ -52,7 +52,7 @@ post_model_registry_data() {
fi

RAW_ML_MODEL_URI='https://huggingface.co/tarilabs/mnist/resolve/v1.nb20231206162408/mnist.onnx'
ma_id=$(make_post_extract_id "$MR_HOSTNAME/api/model_registry/v1alpha2/model_versions/$mv_id/artifacts" '{
ma_id=$(make_post_extract_id "$MR_HOSTNAME/api/model_registry/v1alpha3/model_versions/$mv_id/artifacts" '{
"description": "lorem ipsum model artifact",
"uri": "'"$RAW_ML_MODEL_URI"'",
"name": "mnist",
Expand Down Expand Up @@ -103,7 +103,7 @@ EOF
# Function to test Inference Service
# TODO this will continue once we have MC PR merged from: https://github.com/opendatahub-io/odh-model-controller/pull/135
inference_service() {
iss_mr=$(curl -s -X 'GET' "$MR_HOSTNAME/api/model_registry/v1alpha2/inference_services" \
iss_mr=$(curl -s -X 'GET' "$MR_HOSTNAME/api/model_registry/v1alpha3/inference_services" \
-H 'accept: application/json')

if [ $? -ne 0 ]; then
Expand Down

0 comments on commit 33dc210

Please sign in to comment.