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: Set workers through env variable, improved defaults #15

Merged
merged 3 commits into from
Jul 15, 2024

Conversation

SiddhantSadangi
Copy link
Contributor

The number of workers can now be specified using the FASTMLX_ENV_VARIABLE.
If this is not set, and workers is not provided, it defaults to 2 or the number of CPU cores minus 4, whichever is higher.

⚠️Note: Haven't tested this locally as I don't have a Mac

@Blaizzy
Copy link
Collaborator

Blaizzy commented Jul 12, 2024

Hey @SiddhantSadangi

Thanks for the great PR! ❤️

fastmlx/fastmlx.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@Blaizzy Blaizzy left a comment

Choose a reason for hiding this comment

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

Thank you very much Siddhant!

LGTM, just a few nits. Once they are resolved and tests cleared we can merge :)

fastmlx/fastmlx.py Show resolved Hide resolved
fastmlx/fastmlx.py Outdated Show resolved Hide resolved
@Blaizzy
Copy link
Collaborator

Blaizzy commented Jul 15, 2024

Thanks!

I will merge as soon as the tests clear :)

Copy link
Collaborator

@Blaizzy Blaizzy left a comment

Choose a reason for hiding this comment

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

LGTM!

@Blaizzy Blaizzy merged commit 61b495e into arcee-ai:main Jul 15, 2024
1 check passed
@SiddhantSadangi SiddhantSadangi deleted the ss/num_workers branch July 15, 2024 11:57
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