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

Upgrade torch to 1.13.1 and check the cluster version before uploading a NLP model. #522

Merged
merged 10 commits into from
May 19, 2023

Conversation

davidkyle
Copy link
Member

@davidkyle davidkyle commented Mar 31, 2023

In the 8.7 release of Elasticsearch PyTorch is upgraded to version 1.13.1 (elastic/ml-cpp#2430). The change means the same version of PyTorch is used when tracing the model in Eland as evaluating it in Elasticsearch.

Some models traced in version 1.13 of PyTorch cannot be evaluated in version 1.9 or earlier. Because of this Eland will now not upload a model to a pre 8.7 Elasticsearch.

transformers compatibility is updated to include the latest release. PyTorch 1.13 is compatible with Python 3.10, the docs are updated to reflect this.

Closes #481

@davidkyle davidkyle added the topic:NLP Issue or PR about NLP model support and eland_import_hub_model label Mar 31, 2023
@davidkyle
Copy link
Member Author

CI is failing because version 8.7 of the elasticsearch python client is not released yet

@davidkyle
Copy link
Member Author

CI is failing because version 8.7 of the elasticsearch python client is not released yet

I've reverted back to version 8.3. Version 8.7 is recommended but not necessary

@JonathanHourany
Copy link

JonathanHourany commented May 2, 2023

Hello! Just wanted to check in on this branch. I was toying around with eland earlier and found myself in a little bit of a dependency struggle so I'm glad to see the bumps to torch and Python 3.10. Any thoughts on when this might get merged to master and released?

@davidkyle
Copy link
Member Author

Hi @JonathanHourany this change will be in the next release: version 8.8. Please watch the PR as I will try to get it merged soon.

If you are using Eland to install models in Elasticsearch but having problems with dependencies I recommend using the Docker image. I tend to use the Docker image to simplify my setup. It is easy to get started, see the instructions in the README: https://github.com/elastic/eland#docker

Copy link
Contributor

@sethmlarson sethmlarson left a comment

Choose a reason for hiding this comment

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

Looks good, I only had two small comments:

requirements-dev.txt Outdated Show resolved Hide resolved
tests/ml/pytorch/test_pytorch_model_upload_pytest.py Outdated Show resolved Hide resolved
Copy link
Member

@joshdevins joshdevins left a comment

Choose a reason for hiding this comment

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

LGTM. I only did a visual pass, I didn't run anything.

@JonathanHourany
Copy link

Hi @JonathanHourany this change will be in the next release: version 8.8. Please watch the PR as I will try to get it merged soon.

That's great to hear @davidkyle , thanks for the update!

@davidkyle davidkyle merged commit 36bbbe0 into elastic:main May 19, 2023
@davidkyle davidkyle deleted the check-version branch May 19, 2023 15:29
davidkyle added a commit to davidkyle/eland that referenced this pull request May 22, 2023
…g a NLP model. (elastic#522)

PyTorch models traced in version 1.13 of PyTorch cannot be evaluated in 
version 1.9 or earlier. With this upgrade Eland becomes incompatible with
pre 8.7 Elasticsearch and will refuse to upload a model to the cluster. 
In this scenario either upgrade Elasticsearch or use an earlier version of Eland.
picandocodigo pushed a commit that referenced this pull request Jul 11, 2023
…g a NLP model. (#522)

PyTorch models traced in version 1.13 of PyTorch cannot be evaluated in 
version 1.9 or earlier. With this upgrade Eland becomes incompatible with
pre 8.7 Elasticsearch and will refuse to upload a model to the cluster. 
In this scenario either upgrade Elasticsearch or use an earlier version of Eland.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

Detect incompatible PyTorch versions by the Elasticsearch
4 participants