Skip to main content

GSnet

PYPI package for GSnet平台。

安装

适配 python3.8 及以上版本

pip install gsnet-sdk

PyPI 发布名为 gsnet-sdk,Python 导入名和命令行名称均为 gsnet:

import gsnet
gsnet --help

首次发布版本为 0.1.0,后续版本规则与发布步骤见 版本与发布指南。

功能介绍

  • 支持进行本地上传与下载文件到GSnet平台
  • 支持代码调用函数,可在本地Python脚本或notebook使用;支持终端命令行,方便在服务器上使用。
  • 具体请参考 帮助文档

使用示例

以 MNIST 示例数据集为例。

  • python 代码中下载(可直接复制到 python 文件或 notebook 中运行)
from gsnet import gsnet_download_file

# 下载整个数据集;只下载部分文件时用 filename(需带远端子目录,多个文件传列表)
#   下载单个文件加上:filename="train/train-images-idx3-ubyte"
gsnet_download_file(
    repo_id="OpenIOSSG/MnistDataset_mindspore",  # 必填:拥有者/数据集名
    local_dir="./downloads",                     # 选填:本地保存目录,默认当前目录下的 `MnistDataset_mindspore/`
    #filename="train/train-images-idx3-ubyte"     # 选填:下载指定文件,不填默认下载整个数据集
)
  • 上述代码调用对应的终端命令(可直接复制到终端命令行中运行)
gsnet dataset download OpenIOSSG/MnistDataset_mindspore --local_dir ./downloads
  • 执行结果:实时显示整体进度与各文件进度,并按远端目录结构保存到本地
数据集 `OpenIOSSG/MnistDataset_mindspore` 获取文件列表中……
- 云端共找到 5 个文件。
- 开始下载 5 个文件……
- 本地保存目录 D:/MnistDataset_mindspore/downloads
┌─────────────────────────────────────────────────────────────────────────────┐
│  10 workers | 已处理文件: 5/5 -------------- 100% 60.1MiB/s 52.4MiB 0:00:00 │
└─────────────────────────────────────────────────────────────────────────────┘
 README.md                 -------------------- 100% ?         193bytes 0:00:00
 (…)t10k-images-idx3-ubyte -------------------- 100% 44.8MiB/s 7.5MiB   0:00:00
 (…)t10k-labels-idx1-ubyte -------------------- 100% ?         9.8KiB   0:00:00
 (…)rain-images-idx3-ubyte -------------------- 100% 90.2MiB/s 44.9MiB  0:00:00
 (…)rain-labels-idx1-ubyte -------------------- 100% 55.7MiB/s 58.6KiB  0:00:00

下载完成后的本地目录结构(与远端 test/、train/ 一致):

downloads/
├── README.md                        193 B
├── test/
│   ├── t10k-images-idx3-ubyte      7.84 MB
│   └── t10k-labels-idx1-ubyte      9.78 KB
└── train/
    ├── train-images-idx3-ubyte    44.86 MB
    └── train-labels-idx1-ubyte   58.60 KB
  • 只下载部分文件:-f
# 单个文件 -> ./MnistDataset_mindspore/train/train-images-idx3-ubyte
gsnet dataset download OpenIOSSG/MnistDataset_mindspore -f train/train-images-idx3-ubyte

# 多个文件(逗号隔开) -> ./MnistDataset_mindspore/test/t10k-images-idx3-ubyte 与 .../test/t10k-labels-idx1-ubyte
gsnet dataset download OpenIOSSG/MnistDataset_mindspore -f test/t10k-images-idx3-ubyte,test/t10k-labels-idx1-ubyte
  • 更多使用指南(上传、受控数据集、权限与常见报错等)请参考 帮助文档

Metadata

Release files for gsnet-sdk 0.1.2

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

Source distribution (sdist)

Source distribution for gsnet-sdk 0.1.2
File Size Uploaded Provenance Actions
gsnet_sdk-0.1.2.tar.gz 94.8 kB Without provenance Details for gsnet_sdk-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gsnet-sdk 0.1.2
File Interpreter ABI Platform Actions
gsnet_sdk-0.1.2-py3-none-any.whl Python 3 none any Details for gsnet_sdk-0.1.2-py3-none-any.whl

Total release size: 204.1 kB

Release files / gsnet_sdk-0.1.2.tar.gz

Download URL gsnet_sdk-0.1.2.tar.gz
Size 94.8 kB
Tags Source
SHA-256 checksum
How to use checksums
08e1b2d16c06486bf0730da0b1570d558361614e03295f2f3918ec46ddd72cd5
BLAKE2b-256 checksum
How to use checksums
ad3d90f96e97bb438a942179e208281acfa71ed6d3314014dd30eb3796da27c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.18

Release files / gsnet_sdk-0.1.2-py3-none-any.whl

Download URL gsnet_sdk-0.1.2-py3-none-any.whl
Size 109.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
19b4c5190c2db6ed4a10ee96aa5ce0758af9c17529170d76f1ee751f30604240
BLAKE2b-256 checksum
How to use checksums
74cfe6191e4d19133ead93f63f17c966513dd4b2a94881638ad08fb0a6607bf9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.18

Security for gsnet-sdk 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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