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

Make model upload compatible with serverless clusters #698

Merged
merged 1 commit into from
Jun 7, 2024

Conversation

davidkyle
Copy link
Member

As reported in #696 serverless clusters always return version 8.11.0 which makes the model upload script think that it does not support the upgraded version of PyTorch. The fix is to check for build_flavor == serverless

Closes #696

@davidkyle davidkyle added enhancement New feature or request topic:NLP Issue or PR about NLP model support and eland_import_hub_model labels Jun 6, 2024
Copy link
Member

@pquentin pquentin left a comment

Choose a reason for hiding this comment

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

Thanks! LGTM. It works well.

Comment on lines +200 to +203
if (
"build_flavor" in es_info["version"]
and es_info["version"]["build_flavor"] == "serverless"
):
Copy link
Member

Choose a reason for hiding this comment

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

It's OK to assume build_flavor is set, it was here in the 7.x days too: https://www.elastic.co/guide/en/elasticsearch/reference/7.17/targz.html#_checking_that_elasticsearch_is_running

Suggested change
if (
"build_flavor" in es_info["version"]
and es_info["version"]["build_flavor"] == "serverless"
):
if es_info["version"]["build_flavor"] == "serverless":

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh it failed running against a locally built and run Elasticsearch maybe it's not in dev builds. I'd prefer to keep this to be safe

@davidkyle davidkyle merged commit 632074c into elastic:main Jun 7, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request topic:NLP Issue or PR about NLP model support and eland_import_hub_model
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Eland should be Serverless aware when throwing incompatible ES version errors
2 participants