Skip to main content

This module provide a toolbox for ai dev.

Project description

AI-Toolbox

Command


ait-download

Download hf model,dataset and will retry after a failure, default 10 times.

ait-download \
--repo_info_path=/your_repo_info.json \
--retry_count=2 \
--thread_nums=5

Args description

name description required default
--repo_info_path repo info file for download multi repos at once, demo below! True None
--retry_count retry count after a failure False 10
--thread_nums the number of threads concurrently executing the target False 5

Demo repo_info.json

{
    "model":[
        "OpenAssistant/falcon-40b-megacode2-oasst",
        "stabilityai/stable-diffusion-xl-base-1.0"
    ],
    "dataset":[
        "OpenAssistant/oasst1",
        "PygmalionAI/PIPPA"
    ]
}

ait-fork

fork hf model, dataset and will retry after a failure, default 10 times.

# fork with fork_repo_info.json
ait-fork \
--repo_info_path=/your_repo_info.json \
--retry_count=2 \
--hf_username=your_hf_username \
--hf_token=your_hf_token \
--separator=__ \
--thread_nums=5

# fork without fork_repo_info.json
ait-fork \
--retry_count=2 \
--hf_username=your_hf_username \
--hf_token=your_hf_token \
--separator=__ \
--source_repo=source_repo \
--target_repo=your_target_repo \
--repo_type=dataset|model \
--disable-multi-task

Args description

you must pass --repo_info_path or --source_repo at least one!

name description required default
--hf_username your hugging face username True None
--hf_token your hugging face token True None
--repo_info_path repo info file for fork multi repos at once, demo below! False None
--retry_count retry count after a failure False 10
--separator a string used to replace / when you did not pass target_repo without --repo_info_path False __
--source_repo the source repo you want to fork! eg: PygmalionAI/PIPPA, False 10
--target_repo the target repo you want to fork to! eg: your_hf_username/your_repo_name, if not pass, use your_hf_username/source_repo.replace_/_with_separator False None
--repo_type model or dataset False dataset
--disable-multi-task disable multi task for forking multi repos when you pass, only work with --repo_info_path False False
--thread_nums the number of threads concurrently executing the target False 5

Demo fork_repo_info.json

{
    "model":[
        {
            "source":"OpenAssistant/falcon-40b-megacode2-oasst",
            "target":"your_name/your_repo"
        }        
    ],
    "dataset":[
        {
            "source":"PygmalionAI/PIPPA",
            "target":"your_name/your_repo"
        }
    ]
}

Project details


Download files

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

Source Distribution

py_ait-0.0.41.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py_ait-0.0.41-py2.py3-none-any.whl (6.4 kB view details)

Uploaded Python 2Python 3

File details

Details for the file py_ait-0.0.41.tar.gz.

File metadata

  • Download URL: py_ait-0.0.41.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.31.0

File hashes

Hashes for py_ait-0.0.41.tar.gz
Algorithm Hash digest
SHA256 0247f9e18f87c16a736cc77065e1e04875275aab1e5604ca5bc18cb4517e52d1
MD5 4a0222877896ee6287d1ea58d7a66b67
BLAKE2b-256 f6f3b7c880f14389097fea5088d111bc984b9fbfbf1e980a8b62794d685422d2

See more details on using hashes here.

File details

Details for the file py_ait-0.0.41-py2.py3-none-any.whl.

File metadata

  • Download URL: py_ait-0.0.41-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.31.0

File hashes

Hashes for py_ait-0.0.41-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 240a42e924d7d539c15c013a3868fffb2fe468713b02ca42f5196b12bfa3f61e
MD5 6f135585ce77b09a51439548fafea6e3
BLAKE2b-256 87cdc1c0fa4274f6b4e3ceca1702695f80daf6add5ee0423e1e49c4423f50025

See more details on using hashes here.

Supported by

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