mlx icon indicating copy to clipboard operation
mlx copied to clipboard

pip install lastest commit

Open thegodone opened this issue 2 years ago • 1 comments

Can you tell me how to get pip install of the lastest commit ?

pip install --upgrade --no-cache-dir https://github.com/ml-explore/mlx/archive/refs/heads/master.zip

or

pip install git+https://github.com/ml-explore/mlx@[commit-sha]

thegodone avatar Dec 08 '23 07:12 thegodone

pip install --upgrade --no-cache-dir git+https://github.com/ml-explore/mlx@[commit-sha] seems like a good way to make sure you get everything right That said, this will build from source, so I recommend adding the option to make it multithreaded env CMAKE_BUILD_PARALLEL_LEVEL="" pip install --upgrade --no-cache-dir git+https://github.com/ml-explore/mlx@[commit-sha]

If you see yourself pulling in the latest commit often enough, I would clone the repo, build an editable install and then use build_ext command to continue building in place (it's what I do and find the easiest)

(recommend uninstalling mlx if you already have it in before this pip uninstall mlx)

git clone https://github.com/ml-explore/mlx
cd mlx
env CMAKE_BUILD_PARALLEL_LEVEL="" python -m pip install -e .
python setup.py build_ext -j8 --inplace

This builds and keeps the entire package, python and C++ libraries, all in python/mlx

And then every time you want to update, from the mlx dir

git pull -f 
python setup.py build_ext -j8 --inplace

And that's it!

jagrit06 avatar Dec 08 '23 18:12 jagrit06