Skip to content

Commit e767e40

Browse files
authored
docs: Fix installation suggestion for optional deps (#560)
1 parent f30a835 commit e767e40

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ changelog does not include internal changes that do not affect the user.
106106
### Changed
107107

108108
- **BREAKING**: Changed the dependencies of `CAGrad` and `NashMTL` to be optional when installing
109-
TorchJD. Users of these aggregators will have to use `pip install torchjd[cagrad]`, `pip install
110-
torchjd[nash_mtl]` or `pip install torchjd[full]` to install TorchJD alongside those dependencies.
111-
This should make TorchJD more lightweight.
109+
TorchJD. Users of these aggregators will have to use `pip install "torchjd[cagrad]"`, `pip install
110+
"torchjd[nash_mtl]"` or `pip install "torchjd[full]"` to install TorchJD alongside those
111+
dependencies. This should make TorchJD more lightweight.
112112
- **BREAKING**: Made the aggregator modules and the `autojac` package protected. The aggregators
113113
must now always be imported via their package (e.g.
114114
`from torchjd.aggregation.upgrad import UPGrad` must be changed to

docs/source/installation.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ Note that `torchjd` requires Python 3.10, 3.11, 3.12, 3.13 or 3.14 and `torch>=2
1010
Some aggregators (CAGrad and Nash-MTL) have additional dependencies that are not included by default
1111
when installing `torchjd`. To install them, you can use:
1212
```
13-
pip install torchjd[cagrad]
13+
pip install "torchjd[cagrad]"
1414
```
1515
```
16-
pip install torchjd[nash_mtl]
16+
pip install "torchjd[nash_mtl]"
1717
```
1818

1919
To install `torchjd` with all of its optional dependencies, you can also use:
2020
```
21-
pip install torchjd[full]
21+
pip install "torchjd[full]"
2222
```

src/torchjd/aggregation/_cagrad.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class CAGrad(GramianWeightedAggregator):
3131
This aggregator is not installed by default. When not installed, trying to import it should
3232
result in the following error:
3333
``ImportError: cannot import name 'CAGrad' from 'torchjd.aggregation'``.
34-
To install it, use ``pip install torchjd[cagrad]``.
34+
To install it, use ``pip install "torchjd[cagrad]"``.
3535
"""
3636

3737
def __init__(self, c: float, norm_eps: float = 0.0001):

src/torchjd/aggregation/_nash_mtl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class NashMTL(WeightedAggregator):
5959
This aggregator is not installed by default. When not installed, trying to import it should
6060
result in the following error:
6161
``ImportError: cannot import name 'NashMTL' from 'torchjd.aggregation'``.
62-
To install it, use ``pip install torchjd[nash_mtl]``.
62+
To install it, use ``pip install "torchjd[nash_mtl]"``.
6363
6464
.. warning::
6565
This implementation was adapted from the `official implementation

0 commit comments

Comments
 (0)