File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 20
20
21
21
"""Mapping used to ensure correct pip install message is generated if a missing optional dependency is detected. This
22
22
dict is used to control two behaviours:
23
- 1. When we import objects from missing dependencies we check that any `ModuleNotFoundError` or `ImportError`
23
+
24
+ 1. When we import objects from missing dependencies we check that any `ModuleNotFoundError` or `ImportError`
24
25
corresponds to a missing optional dependency by checking the name of the missing dependency is in `ERROR_TYPES`. We
25
26
then map this name to the corresponding optional dependency bucket that will resolve the issue.
26
- 2. Some optional dependencies have multiple names such as `torch` and `pytorch`, instead of enforcing a single
27
+ 2. Some optional dependencies have multiple names such as `torch` and `pytorch`, instead of enforcing a single
27
28
naming convention across the whole code base we instead use `ERROR_TYPES` to capture both cases. This is done right
28
29
before the pip install message is issued as this is the most robust place to capture these differences.
29
30
"""
You can’t perform that action at this time.
0 commit comments