Skip to main content

A collection of usefull hydra callbacks for hydra configuration

Project description

Hydra Callbacks

style framework

A collection of usefulls callbacks for the https://hydra.cc/ configuration framework.

Installation

pip install git+https://github.com/paquiteau/hydra-callbacks

Usage

In your hydra root config file add the following:

hydra: 
  # ... 
  callbacks: 
    git_info:
      _target_: hydra_callbacks.GitInfo 
      clean: true
    latest_link:
      _target_: hydra_callbacks.LatestRunLink

Available Callbacks

Name Action Author
GitInfo Check status of Repository paquiteau
LatestRunLink Get a link to the latest run paquiteau
MultiRunGatherer Gather results json file in a single table paquiteau
RuntimePerformance Get Execution time for each run paquiteau

And more to come !

Also Available

  • PerfLogger : A simple to use performance logger
  
from hydra_callbacks import PerfLogger 
import logging

log = logging.getLogger(__name__)
def main_app(cfg):
    with PerfLogger(log, "step1"):
        sleep(1)

    with PerfLogger(log, "step2"):
        sleep(2)
    log.info(PerfLogger.recap())

You too, have cool Callbacks, or idea for one ?

Open a PR or an issue !

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

hydra-callbacks-0.1.1.tar.gz (10.9 kB view hashes)

Uploaded Source

Built Distribution

hydra_callbacks-0.1.1-py3-none-any.whl (6.4 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