jupyterlab-hai-platform-ext


Namejupyterlab-hai-platform-ext JSON
Version 7.15.1 PyPI version JSON
download
home_pagehttps://github.com/my_name/myextension
SummaryA JupyterLab extension to use HAI Platform service
upload_time2023-04-26 16:14:57
maintainer
docs_urlNone
authorHighflyer AiLab
requires_python>=3.6
licenseGPLv3
keywords jupyter jupyterlab jupyterlab3
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <a name="readme-top"></a>

# hai-platform-jupyter-ext

HAI Platform 的 jupyter 插件

## 介绍

本插件集成了 HAI Platform 的一些常用功能,包括但不限于:

* 直接通过 python 文件进行实验提交。
* 管理提交的实验,支持实验的实时监控、日志分析和实验状态管理。
* 当前容器内存、集群节点、任务状况查看。
* 个人 Quota 的查看和调整、可访问路径的查看。
* .ipynb 快速清除输出、快速转换 python 文件等增强功能。

## 安装

### **在 [HAI Platform](https://github.com/HFAiLab/hai-platform) 中集成**

在 [HAI Platform](https://github.com/HFAiLab/hai-platform) 中可以采用如下方式快速集成:

1. 下载本项目的 release 包并解压,放到集群的共享目录
2. 在 `storage` 数据表下添加如下挂载点:

    ```csv
    /path/to/jupyterlab_hai_platform_ext,/jupyter_ext/server/jupyterlab_hai_platform_ext,{public},"",Directory,true,add,true
    /path/to/jupyterlab_hai_platform_ext/labextension,/jupyter_ext/client/jupyterlab_hai_platform_ext,{public},"",Directory,true,add,true
    /path/to/jupyterlab_hai_platform_ext/jupyter-config/jupyterlab_hai_platform_ext.json,/usr/local/etc/jupyter/jupyter_server_config.d/jupyterlab_hai_platform_ext.json,{public},"",File,true,add,true
    ```

3. 在 `train_environment` 数据表中添加对应的环境变量,这部分和下文直接安装的环境变量相同。
4. 初次使用时,请检查在 `Settings -> Advanced Setting Editor -> HF AiLab Token` 是否已经设置了正确的 Token。

### **直接安装**

依赖:

* jupyterlab

```shell
pip install jupyterlab_hai_platform_ext
```

在启动的时候,请确保已经设置了以下几个环境变量:

* **BFF_URL**: [ailab-server](https://github.com/HFAiLab/hai-platform-studio) 接入层短链接地址
* **WS_URL**: [ailab-server](https://github.com/HFAiLab/hai-platform-studio) 接入层长链接地址
* **CLUSTER_SERVER_URL**: [HAI Platform](https://github.com/HFAiLab/hai-platform) 集群 api 地址


另外,我们提供一些可选的环境变量配置:


* **JUPYTER_COUNTLY_URL**: 如果需要开启 [Countly](https://countly.com/) 监控,请配置该字段
* **JUPYTER_COUNTLY_API_KEY**: 如果需要开启 [Countly](https://countly.com/) 监控,请配置该字段

## 本地调试

先对项目进行编译:

```shell
jlpm install
jlpm run build
```

编译完成后,先通过 `pip install .` 安装后,再将 `jupyterlab_hai_platform_ext`和 `jupyterlab_hai_platform_ext/labextension` 分别软链接到后端(位于 `site-packages` 目录)和前端(位于 `share/jupyter/labextensions` 目录)。

之后通过 `jlpm run watch` 可以进行前端插件的调试。

## 更多支持

在当前地开源的版本中,我们对一些功能进行了裁剪,你可以自行二次开发,或者[联系我们](https://github.com/HFAiLab/hai-platform-jupyter-ext/issues)获取更多支持:包括但不限于完整版本的试用、私有部署等。

## License

Distributed under the GPL License. See [LICENSE](./LICENSE) for more information.

<p align="right">(<a href="#readme-top">back to top</a>)</p>

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/my_name/myextension",
    "name": "jupyterlab-hai-platform-ext",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "Jupyter,JupyterLab,JupyterLab3",
    "author": "Highflyer AiLab",
    "author_email": "",
    "download_url": "",
    "platform": "Linux",
    "description": "<a name=\"readme-top\"></a>\n\n# hai-platform-jupyter-ext\n\nHAI Platform \u7684 jupyter \u63d2\u4ef6\n\n## \u4ecb\u7ecd\n\n\u672c\u63d2\u4ef6\u96c6\u6210\u4e86 HAI Platform \u7684\u4e00\u4e9b\u5e38\u7528\u529f\u80fd\uff0c\u5305\u62ec\u4f46\u4e0d\u9650\u4e8e\uff1a\n\n* \u76f4\u63a5\u901a\u8fc7 python \u6587\u4ef6\u8fdb\u884c\u5b9e\u9a8c\u63d0\u4ea4\u3002\n* \u7ba1\u7406\u63d0\u4ea4\u7684\u5b9e\u9a8c\uff0c\u652f\u6301\u5b9e\u9a8c\u7684\u5b9e\u65f6\u76d1\u63a7\u3001\u65e5\u5fd7\u5206\u6790\u548c\u5b9e\u9a8c\u72b6\u6001\u7ba1\u7406\u3002\n* \u5f53\u524d\u5bb9\u5668\u5185\u5b58\u3001\u96c6\u7fa4\u8282\u70b9\u3001\u4efb\u52a1\u72b6\u51b5\u67e5\u770b\u3002\n* \u4e2a\u4eba Quota \u7684\u67e5\u770b\u548c\u8c03\u6574\u3001\u53ef\u8bbf\u95ee\u8def\u5f84\u7684\u67e5\u770b\u3002\n* .ipynb \u5feb\u901f\u6e05\u9664\u8f93\u51fa\u3001\u5feb\u901f\u8f6c\u6362 python \u6587\u4ef6\u7b49\u589e\u5f3a\u529f\u80fd\u3002\n\n## \u5b89\u88c5\n\n### **\u5728 [HAI Platform](https://github.com/HFAiLab/hai-platform) \u4e2d\u96c6\u6210**\n\n\u5728 [HAI Platform](https://github.com/HFAiLab/hai-platform) \u4e2d\u53ef\u4ee5\u91c7\u7528\u5982\u4e0b\u65b9\u5f0f\u5feb\u901f\u96c6\u6210\uff1a\n\n1. \u4e0b\u8f7d\u672c\u9879\u76ee\u7684 release \u5305\u5e76\u89e3\u538b\uff0c\u653e\u5230\u96c6\u7fa4\u7684\u5171\u4eab\u76ee\u5f55\n2. \u5728 `storage` \u6570\u636e\u8868\u4e0b\u6dfb\u52a0\u5982\u4e0b\u6302\u8f7d\u70b9\uff1a\n\n    ```csv\n    /path/to/jupyterlab_hai_platform_ext,/jupyter_ext/server/jupyterlab_hai_platform_ext,{public},\"\",Directory,true,add,true\n    /path/to/jupyterlab_hai_platform_ext/labextension,/jupyter_ext/client/jupyterlab_hai_platform_ext,{public},\"\",Directory,true,add,true\n    /path/to/jupyterlab_hai_platform_ext/jupyter-config/jupyterlab_hai_platform_ext.json,/usr/local/etc/jupyter/jupyter_server_config.d/jupyterlab_hai_platform_ext.json,{public},\"\",File,true,add,true\n    ```\n\n3. \u5728 `train_environment` \u6570\u636e\u8868\u4e2d\u6dfb\u52a0\u5bf9\u5e94\u7684\u73af\u5883\u53d8\u91cf\uff0c\u8fd9\u90e8\u5206\u548c\u4e0b\u6587\u76f4\u63a5\u5b89\u88c5\u7684\u73af\u5883\u53d8\u91cf\u76f8\u540c\u3002\n4. \u521d\u6b21\u4f7f\u7528\u65f6\uff0c\u8bf7\u68c0\u67e5\u5728 `Settings -> Advanced Setting Editor -> HF AiLab Token` \u662f\u5426\u5df2\u7ecf\u8bbe\u7f6e\u4e86\u6b63\u786e\u7684 Token\u3002\n\n### **\u76f4\u63a5\u5b89\u88c5**\n\n\u4f9d\u8d56\uff1a\n\n* jupyterlab\n\n```shell\npip install jupyterlab_hai_platform_ext\n```\n\n\u5728\u542f\u52a8\u7684\u65f6\u5019\uff0c\u8bf7\u786e\u4fdd\u5df2\u7ecf\u8bbe\u7f6e\u4e86\u4ee5\u4e0b\u51e0\u4e2a\u73af\u5883\u53d8\u91cf\uff1a\n\n* **BFF_URL**: [ailab-server](https://github.com/HFAiLab/hai-platform-studio) \u63a5\u5165\u5c42\u77ed\u94fe\u63a5\u5730\u5740\n* **WS_URL**: [ailab-server](https://github.com/HFAiLab/hai-platform-studio) \u63a5\u5165\u5c42\u957f\u94fe\u63a5\u5730\u5740\n* **CLUSTER_SERVER_URL**: [HAI Platform](https://github.com/HFAiLab/hai-platform) \u96c6\u7fa4 api \u5730\u5740\n\n\n\u53e6\u5916\uff0c\u6211\u4eec\u63d0\u4f9b\u4e00\u4e9b\u53ef\u9009\u7684\u73af\u5883\u53d8\u91cf\u914d\u7f6e\uff1a\n\n\n* **JUPYTER_COUNTLY_URL**: \u5982\u679c\u9700\u8981\u5f00\u542f [Countly](https://countly.com/) \u76d1\u63a7\uff0c\u8bf7\u914d\u7f6e\u8be5\u5b57\u6bb5\n* **JUPYTER_COUNTLY_API_KEY**: \u5982\u679c\u9700\u8981\u5f00\u542f [Countly](https://countly.com/) \u76d1\u63a7\uff0c\u8bf7\u914d\u7f6e\u8be5\u5b57\u6bb5\n\n## \u672c\u5730\u8c03\u8bd5\n\n\u5148\u5bf9\u9879\u76ee\u8fdb\u884c\u7f16\u8bd1\uff1a\n\n```shell\njlpm install\njlpm run build\n```\n\n\u7f16\u8bd1\u5b8c\u6210\u540e\uff0c\u5148\u901a\u8fc7 `pip install .` \u5b89\u88c5\u540e\uff0c\u518d\u5c06 `jupyterlab_hai_platform_ext`\u548c `jupyterlab_hai_platform_ext/labextension` \u5206\u522b\u8f6f\u94fe\u63a5\u5230\u540e\u7aef\uff08\u4f4d\u4e8e `site-packages` \u76ee\u5f55\uff09\u548c\u524d\u7aef\uff08\u4f4d\u4e8e `share/jupyter/labextensions` \u76ee\u5f55\uff09\u3002\n\n\u4e4b\u540e\u901a\u8fc7 `jlpm run watch` \u53ef\u4ee5\u8fdb\u884c\u524d\u7aef\u63d2\u4ef6\u7684\u8c03\u8bd5\u3002\n\n## \u66f4\u591a\u652f\u6301\n\n\u5728\u5f53\u524d\u5730\u5f00\u6e90\u7684\u7248\u672c\u4e2d\uff0c\u6211\u4eec\u5bf9\u4e00\u4e9b\u529f\u80fd\u8fdb\u884c\u4e86\u88c1\u526a\uff0c\u4f60\u53ef\u4ee5\u81ea\u884c\u4e8c\u6b21\u5f00\u53d1\uff0c\u6216\u8005[\u8054\u7cfb\u6211\u4eec](https://github.com/HFAiLab/hai-platform-jupyter-ext/issues)\u83b7\u53d6\u66f4\u591a\u652f\u6301\uff1a\u5305\u62ec\u4f46\u4e0d\u9650\u4e8e\u5b8c\u6574\u7248\u672c\u7684\u8bd5\u7528\u3001\u79c1\u6709\u90e8\u7f72\u7b49\u3002\n\n## License\n\nDistributed under the GPL License. See [LICENSE](./LICENSE) for more information.\n\n<p align=\"right\">(<a href=\"#readme-top\">back to top</a>)</p>\n",
    "bugtrack_url": null,
    "license": "GPLv3",
    "summary": "A JupyterLab extension to use HAI Platform service",
    "version": "7.15.1",
    "split_keywords": [
        "jupyter",
        "jupyterlab",
        "jupyterlab3"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5ed7a6150a1364a3271111f06d2da9dc752bd124917c37def5a80393b10471ac",
                "md5": "1ba704f7058eb7f50da20c198be6e1e7",
                "sha256": "e83030d6fa1833db089b62267f6f62407b70fe6ed5155cd6f21294c39e9e9aa8"
            },
            "downloads": -1,
            "filename": "jupyterlab_hai_platform_ext-7.15.1-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1ba704f7058eb7f50da20c198be6e1e7",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.6",
            "size": 11783533,
            "upload_time": "2023-04-26T16:14:57",
            "upload_time_iso_8601": "2023-04-26T16:14:57.539924Z",
            "url": "https://files.pythonhosted.org/packages/5e/d7/a6150a1364a3271111f06d2da9dc752bd124917c37def5a80393b10471ac/jupyterlab_hai_platform_ext-7.15.1-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-26 16:14:57",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "my_name",
    "github_project": "myextension",
    "lcname": "jupyterlab-hai-platform-ext"
}
        
Elapsed time: 0.06524s