Current benchmarks. See also: 2023-10-18 Deepcell performance optimization notes and 2023-10-13 deepcell notes running on vertex ai
Time:
| Task | Local | Cloud |
|---|---|---|
| Preprocess | 53s | 43s |
| Predict | 928s | 193s |
| Postprocess | 275s | 264s |
Resources:
| Resource | Local | Cloud |
|---|---|---|
| CPU | 6-core | 16 vcpu |
| GPU | 0 | 1 T4 |
| RAM | 16 | 60 |
Start with the "notebook pipeline".
Run a Vertex AI "execution" with various machine sizes. (I can't see any other way to programmatically run a notebook on Vertex AI? I don't wanna set up & measure the permutations myself but maybe am overthinking it)
Record timing results.
- testest
- Assign tags as appropriate, maybe by benchmark setup: machine size (ram/cpu settings), input size (pixels? file MBs? yes?)
This notebook by Angelo Lab shows how to convert from some tiff files into deepcell input then run deepcell
- Separate code to convert from
imgtonumpy - then from
numpytotiffs
NOTE: We are working with deep cell in memory … so not sure we need indirection to/from image files (it is very useful for proof of work though)
Cloud Function local storage appears to be implemented in RAM, see docs
The function execution environment includes an in-memory file system [...] Use of the file system counts towards a function's memory usage.
Implications:
- we have to clean up downloaded files
- we can reuse (or have to reload) previously opened files
- file load aka networking is 💰 + ⏳
From docs (and our testing):
- v1 vs v2 differing limits
- default for both is 256 MB
- v1 max is ~ 8 GB
- v2 max is ~ 16 GB
- Also - max CPU is 4 and no GPUs are available. v2 creates a 'visible' container is published to GCP Artifact registry and can be modified and/or used in CloudRun with has the capability of more RAM and CPU, still no GPUs.
- Additionally, max associated disk for CloudFunctions is 100 MB compressed or 500 MB for uncompressed.