Skip to content

All compute_work to run with Python 3.12#2237

Merged
ObadaS merged 2 commits intocodalab:packages_upgradesfrom
cjh1:feature/upstream/worker-python-3-12
Mar 9, 2026
Merged

All compute_work to run with Python 3.12#2237
ObadaS merged 2 commits intocodalab:packages_upgradesfrom
cjh1:feature/upstream/worker-python-3-12

Conversation

@cjh1
Copy link
Contributor

@cjh1 cjh1 commented Mar 6, 2026

Fix use of loop in gather(...) to allow with Python 3.12.

Checklist

  • Code review by me
  • Hand tested by me
  • I'm proud of my work
  • Code review by reviewer
  • Hand tested by reviewer
  • Ready to merge

@Didayolo
Copy link
Member

Didayolo commented Mar 6, 2026

Post-it: to be merged into #2223

@Didayolo Didayolo self-assigned this Mar 6, 2026
Didayolo added a commit that referenced this pull request Mar 7, 2026
@Didayolo
Copy link
Member

Didayolo commented Mar 7, 2026

Changes added to #2223

Commit: a92fc2d

Thank you for your contribution.

@Didayolo Didayolo closed this Mar 7, 2026
@ObadaS
Copy link
Collaborator

ObadaS commented Mar 7, 2026

Hello,
I had the same problem when I upgraded the python version in #2200 but I fixed it like this : https://github.com/codalab/codabench/pull/2200/changes#diff-4445d9d2e4988a27d815ccde4804def3d361ceba5104a1ef8c094495bdb06c0bR1201

Is your way of fixing it better ? In my limited testing, the compute worker worked fine, but I haven't done a long test to make sure that not explicitly closing the loop doesn't cause any problems

@cjh1
Copy link
Contributor Author

cjh1 commented Mar 9, 2026

Hello, I had the same problem when I upgraded the python version in #2200 but I fixed it like this : https://github.com/codalab/codabench/pull/2200/changes#diff-4445d9d2e4988a27d815ccde4804def3d361ceba5104a1ef8c094495bdb06c0bR1201

Is your way of fixing it better ? In my limited testing, the compute worker worked fine, but I haven't done a long test to make sure that not explicitly closing the loop doesn't cause any problems

I think the intent of the original code was to ensure that each gather operation was performed in a new event loop. I assume this was because of issues with running async code inside a worker. Your change does doesn't this, it now doesn't use the new event loop, it uses what was already set, as its no longer pass into gather. My change set the new evetn loop. The close is just to ensure cleanup, the original code had a potential resource leak by not cleaning up the event loop each time.

@ObadaS
Copy link
Collaborator

ObadaS commented Mar 9, 2026

Thank you for the explanation. I am going to merge your PR into #2200 since this PR also bumps the Python version of the compute worker.
We appreciate your contribution

@ObadaS ObadaS reopened this Mar 9, 2026
@ObadaS ObadaS changed the base branch from develop to packages_upgrades March 9, 2026 13:06
@ObadaS ObadaS merged commit 0b6c12b into codalab:packages_upgrades Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants