Log memory usage and auto choose device for machine learning model inference
Project description
soco-device
A package for logging, saving, and automatically choosing device during model inference stage.
Usage
-
install package
pip install soco-device
-
example usage
from soco_device.device_check import DeviceCheck
dc = DeviceCheck()
device_name = dc.get_device_by_model(model_name_or_path)
device = torch.device(device_name)
dc.log_start()
# inference model for one time here
dc.log_end()
dc.save(model_name_or_path)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for soco_device-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30ebb08ab9721661af5bd607d830f5ee44f99b1d30f122b27cea4eead63fc0fc |
|
MD5 | b5e11acea9229bbf0d78afaaf445a276 |
|
BLAKE2b-256 | edbe41067531dfad008f1625e7bb1ad50788e1ce056de9f58927a9a18b59f4d6 |