-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Short doc describing `nos profile`. Also includes funcionality to override catalog path from env with `NOS_PROFILE_CATALOG_PATH_OVERRIDE` (for use with `nos profile list`). ## Checks - [ ] `make lint`: I've run `make lint` to lint the changes in this PR. - [ ] `make test`: I've made sure the tests (`make test-cpu` or `make test`) are passing. - Additional tests: - [ ] Benchmark tests (when contributing new models) - [ ] GPU/HW tests
- Loading branch information
1 parent
8701de3
commit 901b83d
Showing
3 changed files
with
59 additions
and
6 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
## ⏱️ Profiling Models | ||
|
||
`nos profile` supports model benchmarking across a number of axes including iterations per second, | ||
memory footprint and utilization on CPU/GPU. | ||
Currently, the nos profiler itself runs natively in the execution environment (i.e. outside | ||
the NOS server), so you'll need to install both the `server` and `test` dependencies alongside | ||
your existing NOS installation. | ||
|
||
```bash | ||
pip install torch-nos[server,test] | ||
``` | ||
|
||
## NOS Profile Commands | ||
|
||
### all | ||
Profile all models | ||
|
||
If you have the time, you can construct a profiling catalog on your machine in its entirety with: | ||
```bash | ||
nos profile all | ||
``` | ||
### rebuild-catalog | ||
Generate a fresh catalog with | ||
```bash | ||
nos profile rebuild-catalog | ||
``` | ||
### model | ||
You can also profile specific models with | ||
```bash | ||
nos profile model -m openai/clip-vit-large-patch14 | ||
``` | ||
### method | ||
Or an entire method type with | ||
```bash | ||
nos profile method -m encode_image | ||
``` | ||
to benchmark e.g. all image embedding models. | ||
|
||
### list | ||
Dump the nos profiling catalog with `nos profile list` | ||
|
||
![NOS Profile List](../assets/nos_catalog_t4_complete.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters