Skip to content

Resolves #1519 #1539

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Resolves #1519 #1539

wants to merge 3 commits into from

Conversation

krammnic
Copy link

@krammnic krammnic commented May 6, 2025

torchtune now can be an optional dependency. In most of the cases, the import was just moved to a specific function or class. In the case of the openai_api.py, the better solution was to just remove the unused import and Message type hint, because it is not a real reason to have an import of an optional library in the class.

Copy link

pytorch-bot bot commented May 6, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/torchchat/1539

Note: Links to docs will display an error until the docs builds have been completed.

❌ 4 New Failures, 2 Cancelled Jobs

As of commit 8b9d9df with merge base 0299a37 (image):

NEW FAILURES - The following jobs have failed:

CANCELLED JOBS - The following jobs were cancelled. Please retry:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label May 6, 2025
@krammnic
Copy link
Author

krammnic commented May 6, 2025

Oops, it seems to me that there are some problems with linting... I've ran it according to the CONTRIBUTING.md but it seems to me that there are some wrong instructions. Furthermore, I don't see CI linting job.

@Jack-Khuu
Copy link
Contributor

Thanks for the PR, just kicked off the CI

hmm we'll take a gander at the linter (not blocking this pr on lint)

@Jack-Khuu
Copy link
Contributor

Thanks for the initial pass
I think we'll need to be a tad more aggressive with pushing the imports deeper into conditionals to avoid hitting the torchtune import calls prematurely

(lint changes are also looking good)

@Jack-Khuu
Copy link
Contributor

You can ignore the failing et/executorch CI, that's a separate issue

@krammnic
Copy link
Author

krammnic commented May 6, 2025

Thanks for the initial pass I think we'll need to be a tad more aggressive with pushing the imports deeper into conditionals to avoid hitting the torchtune import calls prematurely

(lint changes are also looking good)

Thanks for the review! Sure, let's put them deeper then.

@krammnic
Copy link
Author

krammnic commented May 7, 2025

@Jack-Khuu Hey! Fixed according to your comments. Moved imports deeper in cases when it was reasonable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants