google/temporian

Scalene supports Python 3.11 and Python 3.12

Closed this issue · 15 comments

[Scalene author here.] Scalene has supported Python 3.11 and 3.12 for some time, so the below line can now be uncommented, though I'd use a more recent version (the current version today is 1.5.33.1).

# scalene = "^1.5.20" # FIXME: scalene doesn't support Python 3.11

That's great news, thanks for the heads up!

We disabled it some months ago so I'll need to check if what we wrote still works - else I'll work on updating it, we got some useful insights from it.

Would love to hear more!

Actually - if someone wants to work on this, by all means do, should be an easy first issue :)

The command to run time profiling with scalene is bazel run -c opt --config=linux //benchmark:profile_time (documented here), and it runs this script.

@ianspektor interested but want to know approximate timeline to push the fix for this?

Hey @tanaysd!

No timeline, this is not an actual part of the library but an internal integration for time and memory profiling, which has been disabled for months for lack of support of py3.11, but would be great to put it back up, was useful for narrowing down where to optimize certain ops.

perfect, picking it up then!

Thank you! Let me know if you need any help or additional info.

gonna need additional time to get this PR in because of a packed week on my side, planning to get it done by end of this week (1.29 - 2.3)

@ianspektor when you have moment, could you take a look at my privileges? I create a feature branch and was going to push it to create a PR but I received the following message
image

Hi @tanaysd!

You can't push to the repo directly but you can create a fork and create a PR from it. More info here

Let me know if you need anything else. I'll be helping Ian with the support of some of these tickets, feel free to tag me.
You can also find me on our discord

@javiber that makes sense, I think we should update the contributing guide to reflect this pattern.

That's a good point @tanaysd, will update it shortly. Thanks!

[Scalene author here.] Scalene has supported Python 3.11 and 3.12 for some time, so the below line can now be uncommented, though I'd use a more recent version (the current version today is 1.5.33.1).

# scalene = "^1.5.20" # FIXME: scalene doesn't support Python 3.11

Hi @emeryberger while adding scalene back, I am getting the following message -- any inputs?

The current project's supported Python range (>=3.8,<3.12) is not compatible with some of the required packages Python requirement:
  - scalene requires Python >=3.8,!=3.11.0, so it will not be satisfied for Python 3.11.0

Because no versions of scalene match >1.5.34,<2.0.0
 and scalene (1.5.34) requires Python >=3.8,!=3.11.0, scalene is forbidden.
So, because temporian depends on scalene (^1.5.34), version solving failed.

  • Check your dependencies Python requirement: The Python requirement can be specified via the `python` or `markers` properties
    
    For scalene, a possible solution would be to set the `python` property to ">=3.8,<3.11.0 || >3.11.0,<3.12"

    https://python-poetry.org/docs/dependency-specification/#python-restricted-dependencies,
    https://python-poetry.org/docs/dependency-specification/#using-environment-markers

Version 3.11.0 had a bug that interfered with Scalene, which is why it is excluded as a dependency.