Metadata-Version: 2.4
Name: torchtel
Version: 0.0.2
Summary: 	OpenTelemetry auto instrumentation for pytorch
Author-email: Lucca Bertoncini <luccab@meta.com>, Billy Campoli <bcampoli@meta.com>
License: MIT License
        
        Copyright (c) 2020 Facebook
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/facebookresearch/torchtel
Project-URL: Issues, https://github.com/facebookresearch/torchtel/issues
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: torch
Requires-Dist: opentelemetry-api
Requires-Dist: opentelemetry-instrumentation>=0.56b0
Requires-Dist: clusterscope>=0.0.9
Requires-Dist: opentelemetry-exporter-otlp>=1.35.0
Requires-Dist: opentelemetry-sdk>=1.35.0
Provides-Extra: dev
Requires-Dist: flake8>=7.3.0; extra == "dev"
Requires-Dist: mypy>=1.16.1; extra == "dev"
Requires-Dist: pre-commit>=4.2.0; extra == "dev"
Requires-Dist: black; extra == "dev"
Requires-Dist: ufmt; extra == "dev"
Requires-Dist: usort; extra == "dev"
Requires-Dist: build>=1.2.2.post1; extra == "dev"
Requires-Dist: twine>=6.1.0; extra == "dev"
Requires-Dist: mypy>=1.17.0; extra == "dev"
Dynamic: license-file

# torchtel

torchtel provides OpenTelemetry auto instrumentation for pytorch

## Requirements

- Python 3.10 or higher
- PyTorch
- OpenTelemetry API
- OpenTelemetry Instrumentation ≥0.56b0

## Install from pypi

```bash
$ pip install torchtel
```

## Usage

### Instrument PyTorch

To instrument PyTorch, you need to import the `PyTorchInstrumentor` class, call the `instrument()` method, and register your model, see below:

```python
from torchtel import PyTorchInstrumentor

# create your PyTorch model
model = ...

# Registed the model for PyTorch Instrumentation
instrumentor = PyTorchInstrumentor().instrument(model=model)

# Run the model
...

# Uninstrument PyTorch
instrumentor.uninstrument()
```

Check out the [model example](./examples/model.py) to see OpenTelemetry autoinstrumentation in action.

## Observability

To visualize traces and metrics collected by TorchTel, see our [complete observability setup guide](./OBSERVABILITY.md) with Docker Compose configurations for Jaeger, Prometheus, and Grafana.

## Contributing

Read our contributing guide to learn about our development process, how to propose bugfixes and feature requests, and how to build your changes.

### [Code of Conduct](https://code.fb.com/codeofconduct)

Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Please read [the full text](https://code.fb.com/codeofconduct) so that you can understand what actions will and will not be tolerated.

## Mantainers

clusterscope is actively maintained by [Lucca Bertoncini](https://github.com/luccabb), and [Billy Campoli](https://github.com/tooji).

### License

clusterscope is licensed under the [MIT](./LICENSE) license.
