{ "info": { "author": "Shital Shah", "author_email": "shitals@microsoft.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# Welcome to TensorWatch\n\nTensorWatch is a debugging and visualization tool designed for deep learning and reinforcement learning from Microsoft Research. It works in Jupyter Notebook to show real-time visualizations of your machine learning training and perform several other key visualizations of your models and data. \n\nTensorWatch is designed to be flexible and extensible so you can even build your own custom visualizations, UIs, and dashboards. Besides traditional what-you-see-is-what-you-log approach, it also has a unique capability to execute arbitrary queries against your live ML training process, return a stream as a result of the query and view this stream using your choice of a visualizer (we call this [Lazy Logging Mode](#lazy-logging-mode])).\n\nTensorWatch is under heavy development with a goal of providing a platform for debugging machine learning in one easy to use, extensible, and hackable package.\n\n\"TensorWatch\n\n## How to Get It\n\n```\npip install tensorwatch\n```\n\nTensorWatch supports Python 3.x and is tested with PyTorch 0.4-1.x. Most features should also work with TensorFlow eager tensors.\n\n## How to Use It\n\n### Quick Start\n\nHere's simple code that logs an integer and its square as a tuple every second to TensorWatch:\n```\nimport tensorwatch as tw\nimport time\n\n# streams will be stored in test.log file\nw = tw.Watcher(filename='test.log')\n\n# create a stream for logging\ns = w.create_stream(name='metric1')\n\n# generate Jupyter Notebook to view real-time streams\nw.make_notebook()\n\nfor i in range(1000):\n # write x,y pair we want to log\n s.write((i, i*i)) \n\n time.sleep(1)\n```\nWhen you run this code, you will notice a Jupyter Notebook file `test.ipynb` gets created in your script folder. From a command prompt type `jupyter notebook` and select `test.ipynb`. Choose *Cell > Run all* in the menu to see the real-time line graph as values get written in your script.\n\nHere's the output you will see in Jupyter Notebook:\n\n\"TensorWatch\n\nTo dive deeper into the various other features, please see [Tutorials](#tutorials) and [notebooks](https://github.com/microsoft/tensorwatch/tree/master/notebooks).\n\n### How does this work?\n\nWhen you write to a TensorWatch stream, the values get serialized and sent to a TCP/IP socket as well as the file you specified. From Jupyter Notebook, we load the previously logged values from the file and then listen to that TCP/IP socket for any future values. The visualizer listens to the stream and renders the values as they arrive.\n\nOk, so that's a very simplified description. The TensorWatch architecture is actually much more powerful. Almost everything in TensorWatch is a *stream*. Files, sockets, consoles and even visualizers are streams themselves. A cool thing about TensorWatch streams is that they can listen to any other streams. This allows TensorWatch to create a *data flow graph*. This means that a visualizer can listen to many streams simultaneously, each of which could be a file, a socket or some other stream. You can recursively extend this to build arbitrary data flow graphs. TensorWatch decouples streams from how they get stored and how they get visualized.\n\n## Visualizations\nIn the above example, the line graph is used as the default visualization. However, TensorWatch supports many other diagram types including histograms, pie charts, scatter charts, bar charts and 3D versions of many of these plots. You can log your data, specify the chart type you want and let TensorWatch take care of the rest. \n\nOne of the significant strengths of TensorWatch is the ability to combine, compose, and create custom visualizations effortlessly. For example, you can choose to visualize an arbitrary number of streams in the same plot. Or you can visualize the same stream in many different plots *simultaneously*. Or you can place an arbitrary set of visualizations side-by-side. You can even create your own custom visualization widget simply by creating a new Python class, implementing a few methods.\n\n## Comparing Results of Multiple Runs\nEach TensorWatch stream may contain a metric of your choice. By default, TensorWatch saves all streams in a single file, but you could also choose to save each stream in seprate files or not to save them at all (for example, sending streams over sockets or into the console directly, zero hit to disk!). Later you can open these streams and direct them to one or more visualizations. This design allows you to quickly compare the results from your different experiments in your choice of visualizations easily. \n\n## Training within Jupyter Notebook\nOften you might prefer to do data analysis, ML training, and testing - all from within Jupyter Notebook instead of from a separate script. TensorWatch can help you do sophisticated, real-time visualizations effortlessly from code that is run within a Jupyter Notebook end-to-end.\n\n## Lazy Logging Mode\nA unique feature in TensorWatch is the ability to query the live running process, retrieve the result of this query as a stream and direct this stream to your preferred visualization(s). You don't need to log any data beforehand. We call this new way of debugging and visualization a *lazy logging mode*.\n\nFor example, as seen below, we visualize input and output image pairs, sampled randomly during the training of an autoencoder on a fruits dataset. These images were not logged beforehand in the script. Instead, the user sends query as a Python lambda expression which results in a stream of images that gets displayed in the Jupyter Notebook:\n\n\"TensorWatch\n\nSee [Lazy Logging Tutorial](https://github.com/microsoft/tensorwatch/blob/master/docs/lazy_logging.md).\n\n### Pre-Training and Post-Training Tasks\n\nTensorWatch leverages several excellent libraries including [hiddenlayer](https://github.com/waleedka/hiddenlayer), [torchstat](https://github.com/Swall0w/torchstat), [Visual Attribution](https://github.com/yulongwang12/visual-attribution) to allow performing the usual debugging and analysis activities in one consistent package and interface.\n\nFor example, you can view the model graph with tensor shapes with a one-liner:\n\n\"Model\n\nYou can view statistics for different layers such as flops, number of parameters, etc:\n\n\"Model\n\n[See notebook](https://github.com/microsoft/tensorwatch/blob/master/notebooks/network_arch.ipynb).\n\nYou can view the dataset in a lower dimensional space using techniques such as t-SNE:\n\n\"t-SNE\n\n[See notebook](https://github.com/microsoft/tensorwatch/blob/master/notebooks/data_exploration.ipynb).\n\n### Prediction Explanations\nWe wish to provide various tools for explaining predictions to help debugging models. Currently, we offer several explainers for convolutional networks, including [Lime](https://github.com/marcotcr/lime). For example, the following highlights the areas that cause the Resnet50 model to make a prediction for class 240 for the Imagenet dataset:\n\n\"CNN\n\n[See notebook](https://github.com/microsoft/tensorwatch/blob/master/notebooks/cnn_pred_explain.ipynb).\n\n\n## Tutorials\n\n- [Simple Logging Tutorial](https://github.com/microsoft/tensorwatch/blob/master/docs/simple_logging.md)\n\n- [Lazy Logging Tutorial](https://github.com/microsoft/tensorwatch/blob/master/docs/lazy_logging.md)\n\n- [Using TensorWatch for Deep Learning Training (MNIST)](https://github.com/microsoft/tensorwatch/blob/master/notebooks/mnist.ipynb)\n\n- [Using TensorWatch for Deep Learning Training (Food360)](https://github.com/microsoft/tensorwatch/blob/master/notebooks/fruits_analysis.ipynb)\n\n- [Exploring Data Using T-SNE](https://github.com/microsoft/tensorwatch/blob/master/notebooks/data_exploration.ipynb)\n\n- [Predication Explainers for Convolutional Neural Networks](https://github.com/microsoft/tensorwatch/blob/master/notebooks/cnn_pred_explain.ipynb)\n\n- [Viewing Model Graph and Statistics](https://github.com/microsoft/tensorwatch/blob/master/notebooks/network_arch.ipynb)\n\n## Contribute\n\nWe would love your contributions, feedback, questions, and feature requests! Please [file a Github issue](https://github.com/microsoft/tensorwatch/issues/new) or send us a pull request. Please review the [Microsoft Code of Conduct](https://opensource.microsoft.com/codeofconduct/) and [learn more](https://github.com/microsoft/tensorwatch/blob/master/CONTRIBUTING.md).\n\n## Contact\n\nJoin the TensorWatch group on [Facebook](https://www.facebook.com/groups/378075159472803/) to stay up to date or ask any questions.\n\n## Credits\n\nTensorWatch utilizes several open source libraries for many of its features. These includes: [hiddenlayer](https://github.com/waleedka/hiddenlayer), [torchstat](https://github.com/Swall0w/torchstat), [Visual-Attribution](https://github.com/yulongwang12/visual-attribution), [pyzmq](https://github.com/zeromq/pyzmq), [receptivefield](https://github.com/fornaxai/receptivefield), [nbformat](https://github.com/jupyter/nbformat). Please see `install_requires` section in [setup.py](setup.py) for upto date list.\n\n## License\n\nThis project is released under the MIT License. Please review the [License file](LICENSE.txt) for more details.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/microsoft/tensorwatch", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "tensorwatch", "package_url": "https://pypi.org/project/tensorwatch/", "platform": "", "project_url": "https://pypi.org/project/tensorwatch/", "project_urls": { "Homepage": "https://github.com/microsoft/tensorwatch" }, "release_url": "https://pypi.org/project/tensorwatch/0.8.5/", "requires_dist": null, "requires_python": "", "summary": "Interactive Realtime Debugging and Visualization for AI", "version": "0.8.5" }, "last_serial": 5340606, "releases": { "0.3.0": [ { "comment_text": "", "digests": { "md5": "7496997de033d6f7f346d37305403d03", "sha256": "92ed224448cc4dc0301fa5f9da7e181345e355415c173789b3894d644fcb27d3" }, "downloads": -1, "filename": "tensorwatch-0.3.0.tar.gz", "has_sig": false, "md5_digest": "7496997de033d6f7f346d37305403d03", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 34639, "upload_time": "2019-03-07T12:55:13", "url": "https://files.pythonhosted.org/packages/27/a3/c407582b5e57e76632d0cc4890b4e2d6e3b26d154f953b3428b6100b9028/tensorwatch-0.3.0.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "c761e558e5e52e07e523ca0718b6a2ae", "sha256": "0028db1b654ec82926f2fe4da13e54e5c5f990b0a09cf3d1b54c20bf72532724" }, "downloads": -1, "filename": "tensorwatch-0.3.2.tar.gz", "has_sig": false, "md5_digest": "c761e558e5e52e07e523ca0718b6a2ae", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 57424, "upload_time": "2019-04-07T10:29:11", "url": "https://files.pythonhosted.org/packages/30/96/bceb5e3b5f00419f02ab78ed8ea9502d28b62c50dfc5cdee346fa4d2d8cb/tensorwatch-0.3.2.tar.gz" } ], "0.8.0": [ { "comment_text": "", "digests": { "md5": "e689edda9bf922c779935a52706351d2", "sha256": "8f48e039d04fd586358f62e184866abad7d50717298d7a1a985b2959de4634f4" }, "downloads": -1, "filename": "tensorwatch-0.8.0.tar.gz", "has_sig": false, "md5_digest": "e689edda9bf922c779935a52706351d2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 74299, "upload_time": "2019-05-22T13:32:31", "url": "https://files.pythonhosted.org/packages/47/96/840ee893073194f37554ff166732fe9803c779e7ca84293301ba1d54d87c/tensorwatch-0.8.0.tar.gz" } ], "0.8.1": [ { "comment_text": "", "digests": { "md5": "cfb589a67c61628e511d7df4af13ac30", "sha256": "931ae84b214524182c9368c792b396b7e3fa4828e170d2ad8bad930815325d12" }, "downloads": -1, "filename": "tensorwatch-0.8.1.tar.gz", "has_sig": false, "md5_digest": "cfb589a67c61628e511d7df4af13ac30", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 74203, "upload_time": "2019-05-22T21:57:39", "url": "https://files.pythonhosted.org/packages/4a/b8/1e17d03efb56d2c65da1fc38e478854888126c5eebcffe818d3e45af1726/tensorwatch-0.8.1.tar.gz" } ], "0.8.2": [ { "comment_text": "", "digests": { "md5": "582f0302504ae51d361064ea6842bedc", "sha256": "8b03cece3ed9c8a5bbfb4b42dcb2e5fe0cd59bab91e3269b335374076210e08a" }, "downloads": -1, "filename": "tensorwatch-0.8.2.tar.gz", "has_sig": false, "md5_digest": "582f0302504ae51d361064ea6842bedc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 76725, "upload_time": "2019-05-28T14:25:34", "url": "https://files.pythonhosted.org/packages/15/b7/0e0522e4b03810160a6fad6d5ef0faaf6c02ae029b5b7d9ae43bb19b31a1/tensorwatch-0.8.2.tar.gz" } ], "0.8.3": [ { "comment_text": "", "digests": { "md5": "b7f98a129dff476d23650bc095b9d876", "sha256": "875d87461c69d485f1f0ec9e899601b9e5ac934c1d1e7e07bee4a7f8edeeff78" }, "downloads": -1, "filename": "tensorwatch-0.8.3.tar.gz", "has_sig": false, "md5_digest": "b7f98a129dff476d23650bc095b9d876", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 157445, "upload_time": "2019-05-29T07:03:05", "url": "https://files.pythonhosted.org/packages/ec/70/1d66283b203a2e867230aeb6a0d03855951eb831458d7e86076ecb9ffc83/tensorwatch-0.8.3.tar.gz" } ], "0.8.4": [ { "comment_text": "", "digests": { "md5": "4d279c99691683cf240578cd9790822c", "sha256": "0b422a3c34d4937856f5972050886f16b36eda22dd14ad5148eca8530952055f" }, "downloads": -1, "filename": "tensorwatch-0.8.4.tar.gz", "has_sig": false, "md5_digest": "4d279c99691683cf240578cd9790822c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 157859, "upload_time": "2019-05-29T08:26:08", "url": "https://files.pythonhosted.org/packages/ce/f2/4885c7f5ddf06224fc1443bb998464755e542c34f9966de4e686b9f1e43e/tensorwatch-0.8.4.tar.gz" } ], "0.8.5": [ { "comment_text": "", "digests": { "md5": "cdc951d53d2ad69cc6cc861d127d3e31", "sha256": "5ceb43471ce80daa4fb4399a0d361d972eefd494205c5ca59649a9767ff73ccd" }, "downloads": -1, "filename": "tensorwatch-0.8.5.tar.gz", "has_sig": false, "md5_digest": "cdc951d53d2ad69cc6cc861d127d3e31", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 157946, "upload_time": "2019-05-31T02:36:32", "url": "https://files.pythonhosted.org/packages/7c/17/7115c666b03775ca687c5d81e38269286f7029c4658980d879073364a8c3/tensorwatch-0.8.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "cdc951d53d2ad69cc6cc861d127d3e31", "sha256": "5ceb43471ce80daa4fb4399a0d361d972eefd494205c5ca59649a9767ff73ccd" }, "downloads": -1, "filename": "tensorwatch-0.8.5.tar.gz", "has_sig": false, "md5_digest": "cdc951d53d2ad69cc6cc861d127d3e31", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 157946, "upload_time": "2019-05-31T02:36:32", "url": "https://files.pythonhosted.org/packages/7c/17/7115c666b03775ca687c5d81e38269286f7029c4658980d879073364a8c3/tensorwatch-0.8.5.tar.gz" } ] }