DEV.co
Open-Source Observability · microsoft

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.

Source: GitHub — github.com/microsoft/tensorwatch
3.5k
GitHub stars
360
Forks
Jupyter Notebook
Primary language
MIT
License (OSI-approved)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
Repositorymicrosoft/tensorwatch
Ownermicrosoft
Primary languageJupyter Notebook
LicenseMIT — OSI-approved
Stars3.5k
Forks360
Open issues54
Latest releaseUnknown
Last updated2026-03-30
Sourcehttps://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.

Quickstart

Get the tensorwatch source

Clone the repository and explore it locally.

terminalbash
git clone https://github.com/microsoft/tensorwatch.gitcd tensorwatch# follow the project's README for install & configuration

Need it deployed, integrated, or customized instead? DEV.co ships production installs.

Best use cases

Real-time ML training visualization in Jupyter

Monitor loss curves, metrics, and model weights during PyTorch/TensorFlow training sessions with live updates and minimal code overhead.

Interactive debugging of live training processes

Query running ML experiments with arbitrary Python expressions (Lazy Logging mode) to inspect hidden states, intermediate tensors, or diagnostic information without stopping training.

Comparative analysis of multiple experiment runs

Compose streams from different training runs or data sources into a single dashboard for side-by-side comparison of metrics, histograms, and custom plots.

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.

SignalAssessment
MaintenanceActive
DocumentationAdequate
License clarityClear
Deployment complexityLow
DEV.co fitGood
Assessment confidenceHigh
Security considerations

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.

Software development agency

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.co

Related 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?
No. TensorWatch is explicitly designed as a development and debugging tool, not for production, multi-tenant, or adversarial environments. The Lazy Logging feature uses eval() by design, which poses security risks in production.
How does TensorWatch handle data serialization over the network?
All ZMQ messages are serialized with pickle and HMAC-SHA256 signed. Incoming messages are verified before deserialization, and a RestrictedUnpickler allowlist blocks non-approved modules as defense-in-depth. Do not expose ports to untrusted networks.
What versions of PyTorch and TensorFlow are supported?
PyTorch 0.4–1.x is tested and supported. Most TensorFlow eager tensor features should work, but compatibility with newer versions (2.x, 3.x) or Python 3.12+ is unknown and should be tested in your environment.
Do I need Jupyter Notebook installed to use TensorWatch?
Yes. TensorWatch is designed to generate and visualize data in Jupyter Notebook. It is not suitable for headless, CLI-only, or non-notebook environments.

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.