Commit dbb203a
authored
build: improve packaging (#249)
PR to make to make packaging a little nicer, in line with how packaging
works in `unstructured`. In particular, support for extras is added.
This consists of:
- Adding the file `sg.in` for dependencies related to `supergradients`.
This file has been `pip-compile`d with output `sg.txt`.
- All dependencies have been `pip-compile`d.
- Adding the file `constraints.in` to add a `numpy` constraint that is
required for compliance with `supergradients`. Dependencies that precede
`sg.in` need to know about this to avoid conflicts. `constraints.in` is
added as a constraints file for all other dependency files.
- `make` targets are added for installing `supergradients` dependencies.
- CI is updated to install `supergradients` dependencies.
- `supergradients` extra is added to `setup.py` and `MANIFEST.in` so it
can be picked up by PyPi.
- To support the fact that the `supergradients` dependencies are not
guaranteed to be installed, the way imports are handled in the
`super_gradients.py` model file has been changed so imports are only
attempted in the model constructor, in a module-level global variable.
The constructor was used instead of doing the import in `initialize` due
to an error that occurred during import when initiated from
`initialize`.1 parent f11559b commit dbb203a
File tree
15 files changed
+417
-312
lines changed- requirements
- unstructured_inference
- models
15 files changed
+417
-312
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
1 | 5 | | |
2 | 6 | | |
3 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
49 | 53 | | |
50 | 54 | | |
51 | 55 | | |
| |||
56 | 60 | | |
57 | 61 | | |
58 | 62 | | |
| 63 | + | |
59 | 64 | | |
60 | 65 | | |
61 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
5 | | - | |
6 | | - | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
| |||
0 commit comments