Skip to main content

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

  1. install package

    pip install soco-device

  2. 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

soco_device-0.0.3-py3-none-any.whl (7.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page