Skip to main content

A wandb and codecarbon wrapper that logs water and carbon consumption for your experiments on cloud.

Project description

A WandB Water & Carbon Metering Plug-in

A wandb and codecarbon wrapper that logs on cloud the water and carbon consumption of your experiments.

Installation

pip install wandc

Usage

Basic usage

from wandc.emissions_logger import log_emissions

@log_emissions()
def your_function_to_track(project_name='your project name'):
  # your code

For other useful parameters see codecarbon documentation here.

Tracking emissions of transformers trainer

from wandc.emissions_logger import log_emissions
from transformers import Trainer

class WandcTrainer(Trainer):
    @log_emissions()
    def train(
        self,
        ...,
        **kwargs,
    ):
        super().train(..., **kwargs)

trainer = WandcTrainer(...)
trainer.train()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wandc-0.0.2.tar.gz (6.9 kB view details)

Uploaded Source

File details

Details for the file wandc-0.0.2.tar.gz.

File metadata

  • Download URL: wandc-0.0.2.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.16

File hashes

Hashes for wandc-0.0.2.tar.gz
Algorithm Hash digest
SHA256 78fe1fbcc2e9f9e8ed8d31c85377397a93455ff71204c58edd931e52df977ae1
MD5 a0aa2241f8bb560382d1695e54ec80e6
BLAKE2b-256 e43cee67e7aa66f2793708ce819bf7316fe181d5864b52721e5ff0827786dc66

See more details on using hashes here.

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