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

Feat/uv #81

Closed
wants to merge 3 commits into from
Closed

Feat/uv #81

wants to merge 3 commits into from

Conversation

S1ro1
Copy link
Collaborator

@S1ro1 S1ro1 commented Dec 26, 2024

Description

Moves the whole project to use uv instead of vanilla pip, it makes development process easier with a price of small changes to heroku deploy (adding a preprocessing buildpack as heroku doesn't natively support uv yet)

Also moves the whole configuration to pyproject.toml, enabling development dependencies and also configuring ruff in one place.

All updates are reflected in the readme.

Checklist

Before submitting this PR, ensure the following steps have been completed:

  • Run the slash command /verifyruns on your own server.
    • Run the cluster bot on your server:
      python discord-bot.py
    • Start training runs with the slash command /verifyruns.
    • Verify that the bot eventually responds with:
      ✅ All runs completed successfully!
      
      (It may take a few minutes for all runs to finish. In particular, the GitHub
      runs may take a little longer. The Modal run is typically quick.)
      For more information on running a cluster bot on your own server, see
      README.md.

@S1ro1 S1ro1 requested a review from msaroufim December 26, 2024 23:00
@S1ro1 S1ro1 self-assigned this Dec 26, 2024
@@ -0,0 +1,1024 @@
version = 1
Copy link
Member

@msaroufim msaroufim Dec 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't think we need to check this file in

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure on this one to be fair, as heroku doesn't support uv by default, we need a preprocessor to generate requirements.txt from uv.lock here

I remember from when I used poetry, having .lock in VCS was the correct practice when producing an executable, not a library.

@@ -1 +0,0 @@
python-3.13.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC this was needed for heroku not for the package

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned in the previous reply, this gets generated via the buildpack on heroku side.

@msaroufim
Copy link
Member

SHould also update the procfile cause that's what heroku will run

@S1ro1
Copy link
Collaborator Author

S1ro1 commented Dec 26, 2024

heroku/heroku-buildpack-python#1616 states that uv has no full support for uv, so basically what this does is just uses uv for the development, heroku would still use the default python worker. We can also stick with the current way in favor of having easier deploy and not having uv for personal development @msaroufim .

Another thing to be possibly done, is to create a custom heroku dependencies which install uv for us, but not really in favour of that.

@msaroufim
Copy link
Member

Yeah unfortunately without heroku having better support for uv I feel like this PR adds more complexity for some benefit and I don't feel like it's super worth it yet

@S1ro1
Copy link
Collaborator Author

S1ro1 commented Dec 27, 2024

Absolutely, in that case I'm closing it for now. Will stay with pip as is

@S1ro1 S1ro1 closed this Dec 27, 2024
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.

2 participants