conda-forge / tpot-feedstock

A conda-smithy repository for tpot.
BSD 3-Clause "New" or "Revised" License
3 stars 11 forks source link

tpot 0.12.1 doesn't work with python 3.12 #39

Closed petervanwylen closed 9 months ago

petervanwylen commented 9 months ago

Solution to issue cannot be found in the documentation.

Issue

tpot 0.12.1 doesn't work with python 3.12 because it attempts to import imp in base.py. Suggesting you change tpot_python in the recipe to specify 3.11 as the max python version currently supported.

Installed packages

python tpot numpy pandas

Environment info

n/a
bollwyvl commented 9 months ago

Probably no version of tpot ever has worked with python 3.12. So even if changed on the feedstock (on e.g. #38), it would take additional work to make something useful happen (a solver would just go walk back to the previous version).

If this support is important for you, it would likely be most useful to continue the conversation upstream on https://github.com/EpistasisLab/tpot/issues/1327

petervanwylen commented 9 months ago

I see you updated the recipe. Thank you! What this means is that someone typing "conda create -n automl tpot numpy pandas" at least will get a functional environment as it'll know to not install python 3.12 but to bump it down to 3.11.

bollwyvl commented 9 months ago

There is no guarantee of that, it might just pull an older tpot that doesn't have the pin.

petervanwylen commented 9 months ago

Ahh... I see it now. I didn't fully understand that the solver might go that direction instead.

On Mon, Feb 26, 2024 at 1:43 PM Nicholas Bollweg @.***> wrote:

There is no guarantee of that, it might just pull an older tpot that doesn't have the pin.

— Reply to this email directly, view it on GitHub https://github.com/conda-forge/tpot-feedstock/issues/39#issuecomment-1965120684, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYLTXVLDLJCR7XF5HEPAUZDYVTQV3AVCNFSM6AAAAABD2EYFBOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRVGEZDANRYGQ . You are receiving this because you authored the thread.Message ID: @.***>

-- Peter VanWylen Data & Technology Services and Consulting Founder, United InfoLytics LLC unitedinfolytics.com https://unitedinfolytics.com / 901-214-5317 https://unitedinfolytics.com

jakirkham commented 9 months ago

Could add a repodata patch for the old versions to add an upper bound

Admittedly some of them may need an even lower upper bound that just 3.12 (like if they don't work with 3.11 either for example)

Here is an example: https://github.com/conda-forge/conda-forge-repodata-patches-feedstock/pull/584

bollwyvl commented 9 months ago

Yep, on it. noarch: python was added 0.11.2, so nothing prior to that is affected by this incompatibility.

Here's the basic idea (still waiting for the diff):

# uses now-removed `imp` module, see:
# - https://github.com/conda-forge/tpot-feedstock/issues/39
# - https://github.com/EpistasisLab/tpot/issues/1327
if:
  name: tpot
  version_lt: 0.12.2
  version_ge: 0.11.2
  timestamp_lt: 1708983815000
then:
  - tighten_depends:
      name: python
      upper_bound: 3.12
bollwyvl commented 9 months ago

Got this up, but had some local issues vs anaconda.org: https://github.com/conda-forge/conda-forge-repodata-patches-feedstock/pull/673