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

[SETUP-BUG] How to specify python_version when in log_model i am using pip_requirements? #10304

Open
dinjazelena opened this issue Nov 6, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@dinjazelena
Copy link

System information

DBR 13.3 LTS ML

Code to reproduce issue

reqs = {"scikit-learn==1.0.2", "pandas==1.5.2"}
mlflow.pyfunc.log_model(artifact_path="artifacts", python_model=TestWrap(), registered_model_name="wrapperForENV7", await_registration_for=0, pip_requirements=reqs)
model = mlflow.pyfunc.spark_udf(spark, model_uri="models:/wrapperForENV7/latest", env_manager="virtualenv", result_type="double")

# So this one works and gives me this:

2023/11/06 18:42:03 INFO mlflow.pyfunc: This UDF will use virtualenv to recreate the model's software environment for inference. This may take extra time during execution.
2023/11/06 18:42:03 INFO mlflow.models.flavor_backend_registry: Selected backend for flavor 'python_function'
2023/11/06 18:42:03 INFO mlflow.utils.virtualenv: Installing python 3.10.12 if it does not exist
2023/11/06 18:42:03 INFO mlflow.utils.virtualenv: Creating a new environment in /local_disk0/.ephemeral_nfs/repl_tmp_data/ReplId-5a181-004b6-6844f-f/mlflow/envs/virtualenv_envs/mlflow-2b3c092ae9a19d62d8311bd12fd4451d8c54ff5b with /local_disk0/.ephemeral_nfs/repl_tmp_data/ReplId-5a181-004b6-6844f-f/mlflow/envs/pyenv_root/versions/3.10.12/bin/python
2023/11/06 18:42:04 INFO mlflow.utils.virtualenv: Installing dependencies
2023/11/06 18:42:49 INFO mlflow.utils.environment: === Running command '['bash', '-c', 'source /local_disk0/.ephemeral_nfs/repl_tmp_data/ReplId-5a181-004b6-6844f-f/mlflow/envs/virtualenv_envs/mlflow-2b3c092ae9a19d62d8311bd12fd4451d8c54ff5b/bin/activate && python -c ""']'

Describe the problem

How can i specify python_version within requirements.txt so pyenv can install it? Or how is it even possible to specify python_version at all if its not conda.yaml? Since i am using virutalenv as env manager? How to pass there python_version?

Other info / logs

No response

@dinjazelena dinjazelena added the bug Something isn't working label Nov 6, 2023
Copy link

@mlflow/mlflow-team Please assign a maintainer and start triaging this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant