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

ollama-pvc e2e test #416

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open

Conversation

kwsorensen
Copy link
Contributor

Adding support for ollama PVC, specifically an e2e test for #392 to verify that it works.

@kwsorensen kwsorensen closed this Feb 17, 2025
@kwsorensen kwsorensen reopened this Feb 18, 2025
Copy link
Contributor

@nstogner nstogner left a comment

Choose a reason for hiding this comment

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

Thanks for submitting, this is a jump-in-the-deep-end issue! Added some comments.

@@ -38,3 +38,5 @@ for i in {1..10}; do
-H "Content-Type: application/json" \
-d '{"model": "opt-125m-cpu", "prompt": "Who was the first president of the United States?", "max_tokens": 40}'
done

helm uninstall kubeai-models # cleans up above model helm chart on success
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 probably an oversight from before, we should be doing a kubectl delete models --all in the wrapper after each test case.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We will want to remove the helm installation, not just the models, maybe in the wrapper?

Copy link
Contributor

Choose a reason for hiding this comment

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

That should happen (I wonder if it is not removing the CRDs, or not executing):

cleanup() {
    echo "Running test framework cleanup..."
    if [ $skaffold_pid != 9999999999999999 ]; then
        kill $skaffold_pid
        wait $skaffold_pid
    fi
    skaffold delete -f $REPO_DIR/skaffold.yaml
}

@kwsorensen kwsorensen requested a review from nstogner February 27, 2025 01:43

// check to see if the pvc model has a query string, set model to query string, path to host

if scheme == "pvc" {
Copy link
Contributor

Choose a reason for hiding this comment

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

I would remove the scheme == "pvc" check. I dont think it is needed, and it might cause confusion as to why the model param is not getting parsed in the future if we support scheme == "pv" or something else.

return modelURL{}, fmt.Errorf("invalid model URL: %s", urlStr)
}
scheme, ref := matches[1], matches[2]
name, path, _ := strings.Cut(ref, "/")
modelParam := ""
Copy link
Contributor

Choose a reason for hiding this comment

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

var modelParam string is more idiomatic

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.

2 participants