Skip to main content

A JupyterLab extension to use HAI Platform service

Project description

hai-platform-jupyter-ext

HAI Platform 的 jupyter 插件

介绍

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

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

安装

HAI Platform 中集成

HAI Platform 中可以采用如下方式快速集成:

  1. 下载本项目的 release 包并解压,放到集群的共享目录

  2. storage 数据表下添加如下挂载点:

    /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
pip install jupyterlab_hai_platform_ext

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

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

  • JUPYTER_COUNTLY_URL: 如果需要开启 Countly 监控,请配置该字段
  • JUPYTER_COUNTLY_API_KEY: 如果需要开启 Countly 监控,请配置该字段

本地调试

先对项目进行编译:

jlpm install
jlpm run build

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

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

更多支持

在当前地开源的版本中,我们对一些功能进行了裁剪,你可以自行二次开发,或者联系我们获取更多支持:包括但不限于完整版本的试用、私有部署等。

License

Distributed under the GPL License. See LICENSE for more information.

(back to top)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

jupyterlab_hai_platform_ext-7.15.1-py2.py3-none-any.whl (11.8 MB view details)

Uploaded Python 2 Python 3

File details

Details for the file jupyterlab_hai_platform_ext-7.15.1-py2.py3-none-any.whl.

File metadata

  • Download URL: jupyterlab_hai_platform_ext-7.15.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 11.8 MB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.10 tqdm/4.64.0 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.15

File hashes

Hashes for jupyterlab_hai_platform_ext-7.15.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e83030d6fa1833db089b62267f6f62407b70fe6ed5155cd6f21294c39e9e9aa8
MD5 1ba704f7058eb7f50da20c198be6e1e7
BLAKE2b-256 5ed7a6150a1364a3271111f06d2da9dc752bd124917c37def5a80393b10471ac

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page