tensorwatch
TensorWatch is a Microsoft Research debugging and visualization tool for machine learning that runs in Jupyter Notebook to display real-time training metrics and model analysis. It supports PyTorch, TensorFlow eager tensors, and custom visualizations, with a unique 'Lazy Logging' mode for querying live training processes.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | microsoft/tensorwatch |
| Owner | microsoft |
| Primary language | Jupyter Notebook |
| License | MIT — OSI-approved |
| Stars | 3.5k |
| Forks | 360 |
| Open issues | 54 |
| Latest release | Unknown |
| Last updated | 2026-03-30 |
| Source | https://github.com/microsoft/tensorwatch |
What tensorwatch is
TensorWatch implements a stream-based architecture where data sources (files, sockets, ZMQ) are decoupled from visualizers through a composable data flow graph. Core features include real-time metric logging, arbitrary Python expression evaluation on live processes via ZMQ, multiple chart types, and custom widget support via Python class extension.
Get the tensorwatch source
Clone the repository and explore it locally.
git clone https://github.com/microsoft/tensorwatch.gitcd tensorwatch# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- Requires Python 3.x with PyTorch 0.4–1.x (or TensorFlow eager tensors); graphviz must be manually installed on some platforms for network diagram generation.
- HMAC key management is critical for multi-process setups: set ZmqWrapper._hmac_key or TENSORWATCH_HMAC_KEY environment variable before initialize() to enable cross-process authentication.
- Lazy Logging mode (eval() on expressions) is a powerful but inherently risky feature; document and enforce the policy that Watcher ports must never be exposed to untrusted networks.
- Stream-based architecture allows complex data flow graphs; design your monitoring pipeline carefully to avoid circular dependencies or excessive memory overhead in long-running training sessions.
- File-based persistence uses pickle; only load .log or .pkl files created by your own processes or from fully trusted sources, as RestrictedUnpickler is defense-in-depth only.
When to avoid it — and what to weigh
- Production deployment in multi-tenant or adversarial environments — TensorWatch explicitly disables usage in production and multi-tenant settings. Lazy Logging uses eval() on client-supplied expressions; while HMAC-signed and localhost-bound by default, any authenticated local process can execute arbitrary Python in the Watcher process.
- Strict security-first requirements for untrusted data — Pickle deserialization is used for all ZMQ messages and file streams. Despite RestrictedUnpickler allowlisting, crafted payloads could execute code if HMAC keys are leaked or files come from untrusted sources.
- Non-Jupyter or headless-only workflows — TensorWatch is fundamentally tied to Jupyter Notebook for visualization; it is not designed for headless servers, CLI-only environments, or non-notebook frontends.
- Mission-critical performance monitoring — TensorWatch is a development tool, not a production monitoring system. It is not designed for SLA-critical metrics, multi-node aggregation, or enterprise observability pipelines.
License & commercial use
MIT License (permissive open-source). Allows commercial use, modification, and distribution with attribution and liability disclaimer.
MIT is a permissive OSI-approved license that does permit commercial use. However, TensorWatch is explicitly marked as a development/debugging tool not designed for production. Commercial deployment should be treated as experimental; Microsoft Research does not provide commercial support or SLA guarantees. Review liability and support expectations internally before committing to production deployment.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Adequate |
| License clarity | Clear |
| Deployment complexity | Low |
| DEV.co fit | Good |
| Assessment confidence | High |
TensorWatch has by-design security considerations clearly documented: (1) Lazy Logging uses eval() on client expressions over ZMQ—HMAC-SHA256 signed and localhost-bound by default, but any authenticated local process can execute arbitrary Python; (2) Pickle deserialization on all ZMQ messages and files—HMAC verification pre-filters malicious ZMQ, and RestrictedUnpickler allowlists permitted modules, but crafted pickle files are a vector if loaded from untrusted sources; (3) YAML deserialization in bundled hiddenlayer uses yaml.SafeLoader by default. Do not expose ZMQ ports to untrusted networks, do not override YAML loaders, keep HMAC keys secret in multi-process setups, and treat TensorWatch data files as you would executable scripts. Not suitable for production, multi-tenant, or adversarial environments.
Alternatives to consider
Weights & Biases (W&B)
Production-grade ML experiment tracking with cloud backend, team collaboration, and SLA support. More suitable for production monitoring and enterprise use cases.
MLflow
Open-source ML lifecycle platform with experiment tracking, model registry, and REST API. Better suited for multi-user, reproducible workflow and non-Jupyter environments.
TensorBoard
TensorFlow native visualization tool for real-time training metrics and graph inspection. Tightly integrated with PyTorch (via tensorboard plugin) and TensorFlow; more mature ecosystem.
Build on tensorwatch with DEV.co software developers
Our expert engineers can help you evaluate TensorWatch's fit for your training pipeline, configure secure multi-process setups, and build custom visualizations. Contact us for a technical assessment.
Talk to DEV.coRelated open-source tools
Surfaced by semantic similarity across the DEV.co open-source index.
Related on DEV.co
Explore the category and the services that help you build with it.
tensorwatch FAQ
Can I use TensorWatch in a production system?
How does TensorWatch handle data serialization over the network?
What versions of PyTorch and TensorFlow are supported?
Do I need Jupyter Notebook installed to use TensorWatch?
Work with a software development agency
Adopting tensorwatch is usually one piece of a larger software development effort. As a software development agency, DEV.co provides software development services and web development expertise — pairing senior software developers and web developers with your team to design, build, and operate open-source observability software in production.
Ready to integrate TensorWatch into your ML workflow?
Our expert engineers can help you evaluate TensorWatch's fit for your training pipeline, configure secure multi-process setups, and build custom visualizations. Contact us for a technical assessment.