Installation
Install NeMo Lens using pip, with optional telemetry support depending on your development requirements.
Basic Install
This command pulls in only opentelemetry-api, the no-op implementation. Instrumented code runs correctly but no spans or metrics are exported. Useful for library authors who want to instrument code without forcing downstream users to install the SDK.
Install with OTel SDK and OTLP Exporters
Adds opentelemetry-sdk and the OTLP exporters (opentelemetry-exporter-otlp-proto-grpc, opentelemetry-exporter-otlp-proto-http). Required on any rank that actually exports telemetry.
Install Framework Contrib Extras
Each adds the relevant OTel instrumentation package. See Contrib Helpers for details.
Install for Development
The dev dependency group includes the SDK, pytest, pytest-cov, pre-commit, and Ruff. See Developer Guide.
Python Support
nemo-lens requires Python ≥ 3.12. It uses the PEP 695 type statement (e.g., in src/nemo/lens/strategies.py), which was introduced in Python 3.12, along with other modern typing features.
Packaging Notes
nemo.lens is a PEP 420 namespace package, so it coexists peacefully with NeMo Framework’s nemo.* packages. The src/nemo/__init__.py file contains only an explanatory comment (no code), so it does not shadow other nemo.* packages on the path.