Any recommendations for python dependencies that don’t work with
flytekit
dependencies? I’m trying to use
coremltools
in a pipeline task, but with
flytekit==1.10.2
and
coremltools==5.2.0
, which are the most up to date, supposedly compatible versions for these, using
pip-compile
, I’m getting an error when I import
coremltools
TypeError: Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
1. Downgrade the protobuf package to 3.20.x or lower.
2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
However, It doesn’t look like I can lower the
protobuf
version due to
flytekit
dependencies, and the other option doesn’t seem to be working, but I’m seeing if I can get it to work.
Is this something I should submit a ticket for, to try to allow for better compatibility? Usually we use
coremltools==6.2.0
or greater, which doesn’t work at all, but would be great to have compatibility for