jupyterlab-tensorboard-pro


Namejupyterlab-tensorboard-pro JSON
Version 0.8.0 PyPI version JSON
download
home_pagehttps://github.com/HFAiLab/jupyterlab_tensorboard_pro
SummaryA JupyterLab extension for tensorboard.
upload_time2023-07-05 03:58:46
maintainer
docs_urlNone
authoraircloud
requires_python>=3.6
licenseMIT
keywords jupyter jupyterlab jupyterlab3 tensorboard tensorflow
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # JupyterLab-TensorBoard-Pro

![Github Actions Status](https://github.com/HFAiLab/jupyterlab_tensorboard_pro/workflows/Build/badge.svg) [![pypi](https://img.shields.io/pypi/v/jupyterlab_tensorboard_pro.svg)](https://pypi.org/project/jupyterlab-tensorboard-pro/)

[中文文档](./README.zh-cn.md)

A TensorBoard JupyterLab plugin.

![](./images/tensorboard.step4.png)

## Requirements

**python >= 3.6**

Please install the following dependencies before installing this project:

- jupyterlab
- tensorflow
- tensorboard

## Install

```
pip install jupyterlab-tensorboard-pro
```

> only jupyterlab support, not include notebook

## Background

In fact, there are already [jupyterlab_tensorboard](https://github.com/chaoleili/jupyterlab_tensorboard) (front-end plugin) and [jupyter_tensorboard](https://github.com/lspvic/jupyter_tensorboard) (back-end plugin) in the community, but both repositories have not been updated for a long time, and some new repair PRs have not been merged in time. Based on this, maybe the project author is no longer actively maintaining the corresponding repositories.

At the same time, the existing community TensorBoard plugin has some experience problems, such as installing two python packages at the same time, no response for a long time after clicking `TensorBoard`, and the TensorBoard Reload time cannot be set. The interactive experience is not friendly enough, which will also affect the user's JupyterLab experience.

Therefore, this project is forked from the existing projects of the community, and we made some positive changes, contained some previous PRs which are helpful but have not been merged for the time being. This repo will to be maintained for a long time in the future.

This repo has also changed the api name, so it can be completely independent of the above plugins.

Special thanks to the developers of the previous related repositories.

## Instructions

### Create Instance

#### Create from Launcher Panel

We can click the TensorBoard icon from the Launcher panel, the first click will take you to a default initialization panel from which we can create a TensorBoard instance. But if there is an active TensorBoard backend at this time, it will be opened directly.

![](./images/tensorboard.step1.png)

#### Create by Shortcut Command

We can also type `Open TensorBoard` in the JupyterLab shortcut panel (evoked by `ctrl + shift + c`)

![](./images/tensorboard.step2.png)

#### Parameters

In the initialization panel, two parameters are provided:

- **Log Dir**: The default is the **relative directory** of the current sidebar when TensorBoard is clicked. You can also manually fill in the corresponding directory. It is recommended to make the directory as detailed as possible. If the directory content is small, the initialization speed will be improved.
- **Reload Interval**: How often does TensorBoard backend rescan the corresponding directory. This option is set to false by default. It is recommended to disable and use manually Reload for daily use (The continuous scanning of directories by the TensorBoard backend will have some impact on Jupyter's stability and file system).

Select the parameters and click Create TensorBoard, and the TensorBoard instance will be created synchronously. At this time, the jupyter backend is **blocking**, please wait for the instance to be created before performing other operations.

![](./images/tensorboard.step3.png)

### Manage Instances

After the instance of TensorBoard is created, we can manage the instance. Currently, the following functions are provided:

- **Refresh and list all**: TensorBoard backends can be switched to other instances (won't destroy the before)
- **Open in a separate page**: You can open TensorBoard in the form of a separate web page tab.
- **Reload**: Reinitialize the TensorBoard backend. When the content of the file is updated, you can load the new content through this function (Note: The refresh inside TensorBoard will not cause Reload).
- **Destroy**: Destroy the instance, it will close both the backend and the frontend panel.
- **Duplicate**: Open an identical frontend panel, this operation will reuse the TensorBoard backend.
- **New**: Create an additional TensorBoard backend, please refer to the above for precautions.

In addition, for the TensorBoard instance we created, it can be managed in the Kernel management panel of Jupyter, providing functions such as jumping to the corresponding instance and deleting.

![](./images/tensorboard.step5.png)

### Use AWS S3

> It is assumed here that you have some experience with aws s3

TensorBoard supports passing an s3 path via `s3://path/to/dir`, which is also supported in this plugin.

However, because the s3 path is usually not directly accessible, you need to configure some basic information through `aws configure` ([download](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html) aws cli), Usually, the system where JupyterLab is running should have the following files:

```shell
# ~/.aws/config
[default]
region = ap-southeast-1
output = json

# ~/.aws/credentials
[default]
aws_access_key_id = ********
aws_secret_access_key = ********
```

Then you need to install some additional dependencies:

```
pip install botocore boto3 tensorflow-io
```

After that, you can enter an s3 path, then click the refresh button of tensorboard, and wait the loading:

![](./images/tensorboard.step6.png)

> In fact, the status prompt of tensorboard itself is not friendly now, and we will further investigate whether there is a better way to experience it later.

## Debug

You can use `jupyter-lab --debug` to enable debug logging for JupyterLab and TensorBoard.

## Develop

```shell
jlpm install
pip install jupyter_packaging
jlpm run install:client
jlpm run install:server
ln -s /path/to/jupyterlab_tensorboard_pro/jupyterlab_tensorboard_pro
# after above maybe you need create use a soft link to hot update
```

watch frontend:
```
jlpm run watch
```

build:
```
python setup.py bdist_wheel --universal
```

Under normal circumstances, you can just submit MR, the developers of this project will package and publish to pypi.


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/HFAiLab/jupyterlab_tensorboard_pro",
    "name": "jupyterlab-tensorboard-pro",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "Jupyter,JupyterLab,JupyterLab3,Tensorboard,Tensorflow",
    "author": "aircloud",
    "author_email": "onlythen@yeah.net",
    "download_url": "",
    "platform": "Linux",
    "description": "# JupyterLab-TensorBoard-Pro\n\n![Github Actions Status](https://github.com/HFAiLab/jupyterlab_tensorboard_pro/workflows/Build/badge.svg) [![pypi](https://img.shields.io/pypi/v/jupyterlab_tensorboard_pro.svg)](https://pypi.org/project/jupyterlab-tensorboard-pro/)\n\n[\u4e2d\u6587\u6587\u6863](./README.zh-cn.md)\n\nA TensorBoard JupyterLab plugin.\n\n![](./images/tensorboard.step4.png)\n\n## Requirements\n\n**python >= 3.6**\n\nPlease install the following dependencies before installing this project:\n\n- jupyterlab\n- tensorflow\n- tensorboard\n\n## Install\n\n```\npip install jupyterlab-tensorboard-pro\n```\n\n> only jupyterlab support, not include notebook\n\n## Background\n\nIn fact, there are already [jupyterlab_tensorboard](https://github.com/chaoleili/jupyterlab_tensorboard) (front-end plugin) and [jupyter_tensorboard](https://github.com/lspvic/jupyter_tensorboard) (back-end plugin) in the community, but both repositories have not been updated for a long time, and some new repair PRs have not been merged in time. Based on this, maybe the project author is no longer actively maintaining the corresponding repositories.\n\nAt the same time, the existing community TensorBoard plugin has some experience problems, such as installing two python packages at the same time, no response for a long time after clicking `TensorBoard`, and the TensorBoard Reload time cannot be set. The interactive experience is not friendly enough, which will also affect the user's JupyterLab experience.\n\nTherefore, this project is forked from the existing projects of the community, and we made some positive changes, contained some previous PRs which are helpful but have not been merged for the time being. This repo will to be maintained for a long time in the future.\n\nThis repo has also changed the api name, so it can be completely independent of the above plugins.\n\nSpecial thanks to the developers of the previous related repositories.\n\n## Instructions\n\n### Create Instance\n\n#### Create from Launcher Panel\n\nWe can click the TensorBoard icon from the Launcher panel, the first click will take you to a default initialization panel from which we can create a TensorBoard instance. But if there is an active TensorBoard backend at this time, it will be opened directly.\n\n![](./images/tensorboard.step1.png)\n\n#### Create by Shortcut Command\n\nWe can also type `Open TensorBoard` in the JupyterLab shortcut panel (evoked by `ctrl + shift + c`)\n\n![](./images/tensorboard.step2.png)\n\n#### Parameters\n\nIn the initialization panel, two parameters are provided:\n\n- **Log Dir**: The default is the **relative directory** of the current sidebar when TensorBoard is clicked. You can also manually fill in the corresponding directory. It is recommended to make the directory as detailed as possible. If the directory content is small, the initialization speed will be improved.\n- **Reload Interval**: How often does TensorBoard backend rescan the corresponding directory. This option is set to false by default. It is recommended to disable and use manually Reload for daily use (The continuous scanning of directories by the TensorBoard backend will have some impact on Jupyter's stability and file system).\n\nSelect the parameters and click Create TensorBoard, and the TensorBoard instance will be created synchronously. At this time, the jupyter backend is **blocking**, please wait for the instance to be created before performing other operations.\n\n![](./images/tensorboard.step3.png)\n\n### Manage Instances\n\nAfter the instance of TensorBoard is created, we can manage the instance. Currently, the following functions are provided:\n\n- **Refresh and list all**: TensorBoard backends can be switched to other instances (won't destroy the before)\n- **Open in a separate page**: You can open TensorBoard in the form of a separate web page tab.\n- **Reload**: Reinitialize the TensorBoard backend. When the content of the file is updated, you can load the new content through this function (Note: The refresh inside TensorBoard will not cause Reload).\n- **Destroy**: Destroy the instance, it will close both the backend and the frontend panel.\n- **Duplicate**: Open an identical frontend panel, this operation will reuse the TensorBoard backend.\n- **New**: Create an additional TensorBoard backend, please refer to the above for precautions.\n\nIn addition, for the TensorBoard instance we created, it can be managed in the Kernel management panel of Jupyter, providing functions such as jumping to the corresponding instance and deleting.\n\n![](./images/tensorboard.step5.png)\n\n### Use AWS S3\n\n> It is assumed here that you have some experience with aws s3\n\nTensorBoard supports passing an s3 path via `s3://path/to/dir`, which is also supported in this plugin.\n\nHowever, because the s3 path is usually not directly accessible, you need to configure some basic information through `aws configure` ([download](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html) aws cli), Usually, the system where JupyterLab is running should have the following files:\n\n```shell\n# ~/.aws/config\n[default]\nregion = ap-southeast-1\noutput = json\n\n# ~/.aws/credentials\n[default]\naws_access_key_id = ********\naws_secret_access_key = ********\n```\n\nThen you need to install some additional dependencies:\n\n```\npip install botocore boto3 tensorflow-io\n```\n\nAfter that, you can enter an s3 path, then click the refresh button of tensorboard, and wait the loading:\n\n![](./images/tensorboard.step6.png)\n\n> In fact, the status prompt of tensorboard itself is not friendly now, and we will further investigate whether there is a better way to experience it later.\n\n## Debug\n\nYou can use `jupyter-lab --debug` to enable debug logging for JupyterLab and TensorBoard.\n\n## Develop\n\n```shell\njlpm install\npip install jupyter_packaging\njlpm run install:client\njlpm run install:server\nln -s /path/to/jupyterlab_tensorboard_pro/jupyterlab_tensorboard_pro\n# after above maybe you need create use a soft link to hot update\n```\n\nwatch frontend:\n```\njlpm run watch\n```\n\nbuild:\n```\npython setup.py bdist_wheel --universal\n```\n\nUnder normal circumstances, you can just submit MR, the developers of this project will package and publish to pypi.\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A JupyterLab extension for tensorboard.",
    "version": "0.8.0",
    "project_urls": {
        "Homepage": "https://github.com/HFAiLab/jupyterlab_tensorboard_pro"
    },
    "split_keywords": [
        "jupyter",
        "jupyterlab",
        "jupyterlab3",
        "tensorboard",
        "tensorflow"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3af22bbd997a515b1d0bcedce3f0742de7587fd9f475e82c417db40672dd4579",
                "md5": "72b6d32221c98b5bfcd8d10c78c8cf71",
                "sha256": "bc61fe2374a4324471e8685f0574bb7e75412439333146e60f389a8dc3ec5c5c"
            },
            "downloads": -1,
            "filename": "jupyterlab_tensorboard_pro-0.8.0-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "72b6d32221c98b5bfcd8d10c78c8cf71",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.6",
            "size": 553892,
            "upload_time": "2023-07-05T03:58:46",
            "upload_time_iso_8601": "2023-07-05T03:58:46.057102Z",
            "url": "https://files.pythonhosted.org/packages/3a/f2/2bbd997a515b1d0bcedce3f0742de7587fd9f475e82c417db40672dd4579/jupyterlab_tensorboard_pro-0.8.0-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-05 03:58:46",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "HFAiLab",
    "github_project": "jupyterlab_tensorboard_pro",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "jupyterlab-tensorboard-pro"
}
        
Elapsed time: 0.09459s