Skip to main content

atlogger

Python decorator to log artifacts with mlflow, wandb

Inspired by the talks with colleagues, frustrating nights and the python logging documentation I am attempting to develop a module to streamline the proper logging for model training and comparisons

How to use

export WANDB_API_KEY="wandb_key"
# main.py
from atlogger import ATLOGGER, WandbHandler

ATLOGGER.addHandler(
    WandbHandler(
      project="your_project_name",
      config={"config":True},
      level="DEBUG"
      )
  )
# lossFunc.py
from atlogger import log

@log
loss(x1,x2):
  return abs(x1 - x2)

@log("euclidean distance")
calc_distance(x1,x2):
  return sqrt(x1**2 - x2**2)

Principles

Ideally this project will have the following principles:

  • Non-intrusive:
    • Snippets used for logging shouldn't be in the middle of the code. Anyone should be able to import code from one project to another without having to go through and delete or change lines throughout the functions.
  • Modular:
    • Added visualizations should be easy to add and be defined on their own and reused anywhere needed.
  • Explicit:
    • Logging shall not happen under the hood. you should be able to define and easily recognize when information is being logged but also have sensible defaults as not to loose important information that is constantly ignored (i.e. logging hardware load during ML models training)
  • Adaptable:
    • I want to be able to use this tool for logging diverse kinds of code and easily change between them:
      1. Ml training
      2. Compression algorithms
      3. async algorithms

Known bugs

  • if you use the decorator as @log instead of @log()the function will be passed as the variable "names" for some reason
  • Curently not accepting multiple outputs from functions
  • Creating the wandbhandler with config file for some reason does not get to this part of the loginwandb: Currently logged in as: <usr> to https://api.wandb.ai. Use `wandb login --relogin` to force relogin

Release files for atlogger 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for atlogger 0.0.2
File Size Uploaded
atlogger-0.0.2.tar.gz 5.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for atlogger 0.0.2
File Interpreter ABI Platform
atlogger-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 12.1 kB

Release files / atlogger-0.0.2.tar.gz

Download URL atlogger-0.0.2.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
1d5a9b16a61f11d5416b55fe5a26c75466ceba96c14ee13ae02c0750523d0cdb
BLAKE2b-256 checksum
How to use checksums
ee97c12999658d19acdec8ad173c0d37196c19d3e76ceabf7be3a4768b071328
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 24, 2026.

Transparency log

Release files / atlogger-0.0.2-py3-none-any.whl

Download URL atlogger-0.0.2-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c3858f0c317d2e39ddfaf3c998919cffa101eae73b086963095f9556a6434bb0
BLAKE2b-256 checksum
How to use checksums
e2e7ac6aba6ab03898be5ff9ebd375facc5f5a1c4c7cb803f43eaa70bb82c262
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 24, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page