-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Fix develop/editable install mode #3074
Changes from 2 commits
9cb2d64
42f3e19
f169998
4eca66e
ca3f6c2
ea61648
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,7 +32,7 @@ The versions with CPU support can be installed through the provided :code:`setup | |
|
||
.. code-block:: bash | ||
|
||
pip install -e .[dev,test] | ||
pip install .[dev,test] | ||
|
||
You can find all other non-Python packages that need to be installed on your system for Horovod to build | ||
in the `Dockerfile.test.cpu <https://github.com/horovod/horovod/blob/master/Dockerfile.test.cpu>`__ and | ||
|
@@ -46,26 +46,34 @@ First, uninstall any existing version of Horovod. Be sure to do this *outside* | |
|
||
.. code-block:: bash | ||
|
||
$ cd $HOME | ||
$ pip uninstall -y horovod | ||
$ cd - | ||
|
||
From *inside* the Horovod root directory, remove any previous build artifacts and then install Horovod: | ||
From *inside* the Horovod root directory, remove any previous build artifacts and then install Horovod in dev mode: | ||
|
||
.. code-block:: bash | ||
|
||
$ rm -rf build/ dist/ | ||
$ HOROVOD_WITH_PYTORCH=1 HOROVOD_WITH_TENSORFLOW=1 python setup.py install | ||
$ HOROVOD_WITH_PYTORCH=1 HOROVOD_WITH_TENSORFLOW=1 pip install -v -e . | ||
|
||
Set ``HOROVOD_WITHOUT_[FRAMEWORK]=1`` to disable building Horovod plugins for that framework. | ||
This is useful when you’re testing a feature of one framework in particular and wish to save time. | ||
Set ``HOROVOD_WITH_[FRAMEWORK]=1`` to generate an error if the Horovod plugin for that framework failed to build. | ||
Set ``HOROVOD_GPU_OPERATIONS=NCCL`` to run on GPUs with NCCL. | ||
|
||
For a debug build with checked assertions etc. replace the invocation of setup.py by: | ||
In dev mode, you can edit the Horovod source directly in the repo folder. For Python code, the changes will take effect | ||
immediately. For **C++/CUDA code**, the ``... pip install -v -e .`` command needs to be invoked again to perform an incremental build. | ||
|
||
For a debug build with debug symbols, checked assertions etc., use the extra flags below: | ||
maxhgerlach marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
EnricoMi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
.. code-block:: bash | ||
|
||
$ HOROVOD_WITH_PYTORCH=1 HOROVOD_WITH_TENSORFLOW=1 python setup.py build_ext --debug install | ||
$ HOROVOD_WITH_PYTORCH=1 HOROVOD_WITH_TENSORFLOW=1 pip install --global-option build_ext --global-option --debug -v -e . | ||
maxhgerlach marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
To uninstall Horovod installed in dev mode, run the below command from the Horovod root directory: | ||
|
||
.. code-block:: bash | ||
|
||
$ python setup.py develop -u | ||
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. How does this relate to 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. @EnricoMi this uninstall method is when you install the package in dev mode The part about running
So when installing in dev mode, it checks for dev and test dependencies? 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. I misread your comment in the changes, 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. The 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.
|
||
|
||
Testing | ||
------- | ||
|
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.
I wouldn't reference any env var other than
HOROVOD_WITH[OUT]_[FRAMEWORK]
andHOROVOD_DEBUG
here, because there are so many. Rather than mentioning theHOROVOD_GPU_OPERATIONS
env var here, what about adding a link to https://github.com/horovod/horovod/blob/master/docs/install.rst#environment-variables?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.
I can do that.