-
Notifications
You must be signed in to change notification settings - Fork 180
MacOS Support: tests + devShell + mujoco #745
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
Merged
Merged
Changes from all commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
fc447fb
Merge pull request #697 - Release v0.0.5
spomichter 8fcbfa2
provide alternative organization
jeff-hykin a38b6f6
clean up mistakes
jeff-hykin bbc5416
get lcm working on macos, needed 25.05 for old MacOS
jeff-hykin 0f99eb7
fix pytest command in flake
jeff-hykin b9d1155
fix SharedMemory on MacOS
jeff-hykin 69ca925
modify check_multicast, and check_buffers for MacOS (could use improv…
jeff-hykin 4d5b07e
disable most of the multicast and check_buffer tests for macos (could…
jeff-hykin 32749e8
switch back to unstable
jeff-hykin 57bb639
grab changes from MacOS PR
jeff-hykin e1a74b5
clean up
jeff-hykin ffe8f1b
revert some
jeff-hykin a39b93c
Merge branch 'mujoco-process' into jeff_macos
jeff-hykin 58a4200
patch lcm service to get running on macOS
jeff-hykin 0c1af71
flake update
jeff-hykin 7cb5e22
fix lcm macos
jeff-hykin 29e0800
use mjpython so works on macos
jeff-hykin bbba92f
on mujoco fail, show stderr
jeff-hykin 633c1e5
standardize platform checks
jeff-hykin ef10293
make ruff happy
jeff-hykin c4ac2db
revert
jeff-hykin ce48207
revert more
jeff-hykin 927e7d9
clean up opened file descriptors
jeff-hykin 469b6c4
fix Cuda warning on macos, default to CoreMLExecutionProvider before …
jeff-hykin fde904e
-
jeff-hykin 766aeb3
have pytorch take advantage of MacOS Metal
jeff-hykin 5e80f7a
automate nix develop init
jeff-hykin 6de81c4
-
jeff-hykin 7fcb09f
-
jeff-hykin 83d0046
fix gpu check mistake
jeff-hykin cf1fd15
fix tests
jeff-hykin c027554
add example command
jeff-hykin 5d56bb6
add saftey check
jeff-hykin cf2c844
-
jeff-hykin bd86cb0
allow for 224.0.0/4
paul-nechifor d86feb7
always use shm for large things
paul-nechifor f497f3e
Merge branch 'dev' of https://github.com/dimensionalOS/dimos
jeff-hykin f020c05
Merge branch 'dev' into jeff_macos-testing
paul-nechifor 43e37aa
dry
paul-nechifor 993d98a
CI code cleanup
paul-nechifor 3e4d8d0
Update dimos/agents/memory/chroma_impl.py
paul-nechifor b7fc9a9
types
paul-nechifor 970a31d
fix tests
paul-nechifor de5f0a6
fix "device not defined"
jeff-hykin a6edb70
cleanup logic
jeff-hykin 0e6142f
Merge branch 'main' into jeff_macos
jeff-hykin 98ab619
Merge branch 'jeff_macos-testing' of https://github.com/dimensionalOS…
jeff-hykin db39aaa
Merge branch 'dev' into jeff_macos
paul-nechifor efb1db9
disable bitsandbytes on macos
paul-nechifor aadebfa
Merge remote-tracking branch 'upstream/dev' into jeff_macos
jeff-hykin 040a706
fixup readme
jeff-hykin f1862e8
update xome to support --ignore-environment
jeff-hykin 73b9887
fix macos old version check on linux
jeff-hykin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -51,7 +51,15 @@ def __init__( | |
| "Install it with: pip install open-clip-torch" | ||
| ) | ||
|
|
||
| self.device = device or ("cuda" if torch.cuda.is_available() else "cpu") | ||
| # Use GPU if available, otherwise fall back to CPU | ||
| if torch.cuda.is_available(): | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mdaiter Apple metal support |
||
| self.device = "cuda" | ||
| # MacOS Metal performance shaders | ||
| elif torch.backends.mps.is_available() and torch.backends.mps.is_built(): | ||
| self.device = "mps" | ||
| else: | ||
| self.device = "cpu" | ||
|
|
||
| self.normalize = normalize | ||
|
|
||
| # Load model | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,7 +23,15 @@ def __init__( | |
| dtype: torch.dtype = torch.bfloat16, | ||
| ) -> None: | ||
| self._model_name = model_name | ||
| self._device = device or ("cuda" if torch.cuda.is_available() else "cpu") | ||
| # Use GPU if available, otherwise fall back to CPU | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jeff-hykin Has moondream been tested on metal |
||
| if torch.cuda.is_available(): | ||
| self._device = "cuda" | ||
| # MacOS Metal performance shaders | ||
| elif torch.backends.mps.is_available() and torch.backends.mps.is_built(): | ||
| self._device = "mps" | ||
| else: | ||
| self._device = "cpu" | ||
|
|
||
| self._dtype = dtype | ||
|
|
||
| @cached_property | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(just making ruff happy)