conda-forge / mlflow-feedstock

A conda-smithy repository for mlflow.
BSD 3-Clause "New" or "Revised" License
1 stars 26 forks source link

ML-Flow & ML-Skinny installed togehter - Fails on resolution for conda #151

Closed rxm7706 closed 8 months ago

rxm7706 commented 11 months ago

Solution to issue cannot be found in the documentation.

Issue

I was not expecting that ML-FLOW skinny & ML-FLOW could not be installed together using conda.

My assumption was that most packages that inherited mlflow as a dependency; would move to changing their dependency to mlfow-skinny (similar to matplotlib vs matplotlib-base) to avoid package bloat.

Using PiP & Poetry I was able to install mlflow & mlflow-skinny in the same environment - using conda I received this error

Could not solve for environment specs The following packages are incompatible ├─ mlflow 2.8.1 would require │ └─ mlflow-skinny <0a0 ,

It probably comes down to how we have defined run constraints in the conda recipe

  run_constrained:
    - mlflow{{ mlflow_other }} <0a0

stack-trace

├─ mlflow-skinny is installable with the potential options
│  ├─ mlflow-skinny [1.22.0|1.23.0|...|2.8.1], which can be installed;
│  ├─ mlflow-skinny [1.14.0|1.14.1|...|1.20.2] would require
│  │  └─ python >=3.6,<3.7.0a0 , which can be installed;
│  ├─ mlflow-skinny [1.14.0|1.14.1|...|1.30.0] would require
│  │  └─ python >=3.7,<3.8.0a0 , which can be installed;
│  ├─ mlflow-skinny [1.14.0|1.14.1|...|2.8.1] would require
│  │  └─ python >=3.8,<3.9.0a0 , which can be installed;
│  ├─ mlflow-skinny [1.14.0|1.14.1|...|2.8.1] would require
│  │  └─ python >=3.9,<3.10.0a0 , which can be installed;
│  └─ mlflow-skinny [2.3.2|2.4.0|...|2.8.1] would require
│     └─ python >=3.11,<3.12.0a0 , which can be installed;
└─ mlflow >=2.8.1  is installable with the potential options
   ├─ mlflow 2.8.1 would require
   │  └─ mlflow-skinny <0a0 , which conflicts with any installable versions previously reported;
   ├─ mlflow 2.8.1 would require
   │  └─ python >=3.11,<3.12.0a0 , which can be installed;
   ├─ mlflow 2.8.1 would require
   │  └─ python >=3.8,<3.9.0a0 , which can be installed;
   └─ mlflow 2.8.1 would require
      └─ python >=3.9,<3.10.0a0 , which can be installed.

Installed packages

"mlflow>=2.8.1" "mlflow-skinny>=2.8.1"

Environment info

linux python 3.10
xhochy commented 11 months ago

Both have the same files. Should we make mlflow depend on mlflow-skinny im general?

rxm7706 commented 11 months ago

Both have the same files. Should we make mlflow depend on mlflow-skinny im general?

That's possible - I didn't think of that

I was thinking of trying

  run_constrained:
    - mlflow{{ mlflow_other }} <0a0

  run_constrained:
    - mlflow{{ mlflow_other }} == {version)

Looking at how source is organized ; your suggestion seems to be a cleaner approach. https://github.com/mlflow/mlflow/tree/master/requirements https://github.com/mlflow/mlflow/blob/master/setup.py

LMK which approach - you'd like me to try -- or if we should try both

xhochy commented 10 months ago

I would prefer the one where mlflow depends on mlflow-skinny. This doesn't match the pip based approach but is cleaner and something we can do in conda here which is probably not that simple with pip.

rxm7706 commented 10 months ago

@xhochy - thank you, understood, I can take a shot at it next week.