Skip to main content

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_ext和 jupyterlab_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)

Release files for jupyterlab-hai-platform-ext 7.15.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for jupyterlab-hai-platform-ext 7.15.1
File Interpreter ABI Platform
jupyterlab_hai_platform_ext-7.15.1-py2.py3-none-any.whl Python 3, Python 2 none any Details

Release files / jupyterlab_hai_platform_ext-7.15.1-py2.py3-none-any.whl

Download URL jupyterlab_hai_platform_ext-7.15.1-py2.py3-none-any.whl
Size 11.8 MB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
e83030d6fa1833db089b62267f6f62407b70fe6ed5155cd6f21294c39e9e9aa8
BLAKE2b-256 checksum
How to use checksums
5ed7a6150a1364a3271111f06d2da9dc752bd124917c37def5a80393b10471ac
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

7.15.1 This release

1 release file

7.14.4

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page