promptflow icon indicating copy to clipboard operation
promptflow copied to clipboard

Upgrade to Python 3.10 o3 3.11

Open FriederikeBrezing opened this issue 2 years ago • 9 comments

We would like to upgrade our code base to Python 3.10 or 3.11. Some packages that we would like to use, like PyRit, require Python >= 3.10. Promptflow still recommends using 3.9.

Describe the solution you'd like Promptflow should fully support Python 3.10 or higher

FriederikeBrezing avatar May 08 '24 10:05 FriederikeBrezing

Hi @FriederikeBrezing , we publicly support python 3.10 and 3.11. Check here for current supported versions: image

D-W- avatar May 09 '24 03:05 D-W-

Hi, I had seen that but it also says that python 3.9 is recommended. What is the reason for that? Will it affect the performance if other versions of python are used?

Screenshot 2024-05-09 at 09 47 28

FriederikeBrezing avatar May 09 '24 08:05 FriederikeBrezing

This is a comment written before we supported Python 3.9. I will delete it to avoid confusion.

D-W- avatar May 10 '24 03:05 D-W-

The Docker file in the dev container is still based on the python:3.9 image. Can it be upgraded as well?

amichel avatar Oct 08 '24 20:10 amichel

@amichel same goes for the default version when building using pf flow build --source ./flows/standard --output dist --format docker

And the output Dockerfile contains RUN conda create -n promptflow-serve python=3.9.16 [..] by default Can this be altered? I would kindly ask @wangchao1230 to reopen

adam-lagoda avatar Jan 20 '25 14:01 adam-lagoda

@wangchao1230 Hey. Please open this issue again

pf flow build --source ./flows/standard --output dist --format docker

And the output Dockerfile contains RUN conda create -n promptflow-serve python=3.9.16 [..] by default

Please make its version configurable !!!

HakjunMIN avatar Jan 22 '25 06:01 HakjunMIN

python version in the deployed image is fixed in src/promptflow-devkit/promptflow/_sdk/data/docker/Dockerfile.jinja2 Would be great to make this configurable, or at least parsable from the python version from the active environment that is used for the build.

adam-lagoda avatar Jan 23 '25 08:01 adam-lagoda

I have added a separate issue to address this feature request https://github.com/microsoft/promptflow/issues/3937

adam-lagoda avatar Jan 23 '25 08:01 adam-lagoda

I also made a PR that solves the problem https://github.com/microsoft/promptflow/pull/3939

adam-lagoda avatar Jan 23 '25 12:01 adam-lagoda