Metadata-Version: 2.1
Name: sagemaker-experiments-logger
Version: 0.1.1
Summary: PyTorch Lightning Experiment Logger
Home-page: https://github.com/tsenst/lightning-experiments-logger
Author: Tobias Senst
Author-email: tobias.senst@googlemail.com
License: Apache 2.0
Keywords: pytorch-lightning,AWS SageMaker,machine learning
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pytorch-lightning >=2.0.0
Requires-Dist: sagemaker >=2.190.0
Provides-Extra: dev
Requires-Dist: black ; extra == 'dev'
Requires-Dist: flake8 ; extra == 'dev'
Requires-Dist: isort ; extra == 'dev'
Requires-Dist: mypy ; extra == 'dev'
Requires-Dist: pylint ; extra == 'dev'
Requires-Dist: types-PyYAML ; extra == 'dev'
Provides-Extra: tests
Requires-Dist: moto ==4.2.5 ; extra == 'tests'
Requires-Dist: pytest ; extra == 'tests'
Requires-Dist: pytest-mock ; extra == 'tests'
Requires-Dist: pytest-cov ; extra == 'tests'

![Python Version](https://img.shields.io/badge/python-3.9%7C3.10%7C3.11-blue.svg)
[![PyPI Version](https://img.shields.io/pypi/v/sagemaker-experiments-logger)](https://pypi.org/project/sagemaker-experiments-logger/)
[![Documentation](https://github.com/tsenst/lightning-experiments-logger/actions/workflows/documentation.yaml/badge.svg)](https://tsenst.github.io/lightning-experiments-logger/index.html)
# SagemakerExperimentsLogger
SagemakerExperimentsLogger provides a simple way to log experimental data such as hyperparameter settings and evaluation metrics via [AWS SageMaker Experiments API](https://aws.amazon.com/blogs/aws/amazon-sagemaker-experiments-organize-track-and-compare-your-machine-learning-trainings/). It can be easily integration into the concept of [Pytorch Lightning Trainer class](https://lightning.ai/docs/pytorch/stable/common/trainer.html).

For detailed documentation, including the API reference, see [Read the Docs](https://tsenst.github.io/lightning-experiments-logger/index.html)

## Installation
You can install the latest (nightly) version with pip using ssh with

```bash
pip install sagemaker-experiments-logger
```

## Quickstart
The SageMaker Experiments logger can be easily applied by setup an own run context:
```Python
from pytorch_lightning import Trainer
from sagemaker.experiments.run import Run
from experiments_addon.logger import SagemakerExperimentsLogger

with Run(experiment_name="testExperiment", run_name="testRun1"):
    logger = SagemakerExperimentsLogger()
    trainer = Trainer(
        logger=logger,
        ...
    )
    ...
```
or by using an existing run context. For example in a SageMaker Training Step
```Python
from pytorch_lightning import Trainer
from experiments_addon.logger import SagemakerExperimentsLogger

logger = SagemakerExperimentsLogger(experiment_name="TestExp", run_name="TestRun")
trainer = Trainer(
logger=logger,
    ...
)
...
```

## Usage 

Try [Tutorial Notebook](https://github.com/tsenst/lightning-experiments-logger/blob/main/example/tutorial.ipynb) to learn more about the usage of the [SagemakerExperimentsLogger](https://tsenst.github.io/lightning-experiments-logger/api_logger.html) class. 

It is also worth to read the blog post: [Experiment Tracking With AWS SageMaker and PyTorch Lightning](https://medium.com/idealo-tech-blog/experiment-tracking-with-aws-sagemaker-and-pytorch-lightning-68b22fd4deee) 

## Contributing
I welcome all contributions!

To file a bug or request a feature, please file a GitHub issue. Pull requests are welcome.

## License
This library is licensed under the Apache 2.0 License.
