huggingface / optimum-neuron

Easy, fast and very cheap training and inference on AWS Trainium and Inferentia chips.
Apache License 2.0
176 stars 53 forks source link

OpenSSL error during boto3 import #503

Closed dacorvo closed 3 months ago

dacorvo commented 4 months ago

System Info

AWS Inferentia2 host with the following AMI:

Deep Learning AMI Neuron (Ubuntu 22.04) 20240226

ami-09765a839c76c84f2 (64-bit (x86))

Reproduction (minimal, reproducible, runnable)

On a fresh optimum-neuron[neuronx] install, just importing any symbol from optimum.neuron leads to the following error:

AttributeError: module 'lib' has no attribute 'X509_V_FLAG_NOTIFY_POLICY'. Did you mean: 'X509_V_FLAG_EXPLICIT_POLICY'?

Expected behavior

There should not be any error. The fix is to update manually the pyopenssl package:

python -m pip install pyopenssl==24.0.0

dacorvo commented 3 months ago

Fixed in latest AMI.