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.42.tar.gz (4.8 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.42-py2.py3-none-any.whl (6.5 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

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

File hashes

Hashes for py_ait-0.0.42.tar.gz
Algorithm Hash digest
SHA256 09438e4d7e07ee7dda73a28476d6ad5da620ef79e0253958c5d89f3413551204
MD5 469ff2f21c95079294b581ebeda9d72c
BLAKE2b-256 2489cf47c07729b5216c58768c126d933482748954975bfaffb94f64bd74416d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: py_ait-0.0.42-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.5 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.42-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 118969c551e992dcb176227b0bd4bcef97a487317b156917d5dec7a8ed510a4e
MD5 5f47dd1161cd31e7c06d4caf755feaf9
BLAKE2b-256 6677c54a4a9ec5a8c63651833cfa9fa9eb13f90c90158327aa2ac337b8da470a

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