A Decentralised AI library which allows to run remote AI jobs
Project description
The Decentralised AI Request
Enable for any AI python code to be executed on decentralised AI compute.
Supported AI compute:
Bacalhau
Required: Have a working IPFS Desktop App running on the same machine. You can download it here.
Commands:
python -m build # build the project
python -m unittest # run all unit tests
Usage:
from deairequest import DeProtocolSelector as selector
bp = selector.DeProtocolSelector("Bacalhau")
bp.get_docker_images()
if a user wants a custom image
bp.add_docker_image("custom_images")
For each request you need to set the docker image to use
bp.set_docker_image("the docker image to use")
To add datasets of type URL:
bp.add_dataset(bp.get_url_data_type(),"https://www...")
Of type File:
bp.add_dataset(bp.get_file_data_type(),"/path/to/file/name.csv")
Of type Directory:
bp.add_dataset(bp.get_directory_data_type(),"/path/to/directory/")
Of type IPFS:
bp.add_dataset(bp.get_ipfs_data_type(),"AW233dfD23dsds32323sdds") # The IPFS CID
To get all the datasets:
bp.get_datasets()
output: [{"url":"https://www..."},{"file":"/path/to/file/name.csv"},{"directory":"/path/to/directory/"},{"ipfs":"AW233dfD23dsds32323sdds"}]
Afterwards you can submit a job
job = bp.submit_job(Path("/path/to/notebook.jpynb"))
get the logs
state = bp.get_state(job)
and when the job is finished and the state changes from "InProgress" to either "Complete" or "Error"
result = bp.get_results(job,Path("/path/to/output/directory/"))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file deairequest-0.0.17.tar.gz
.
File metadata
- Download URL: deairequest-0.0.17.tar.gz
- Upload date:
- Size: 40.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4dc95551c14f582cce50ba24b6559dc3dc93b9af28e736ff9307e95bc7ed8df0 |
|
MD5 | 00416ed4aeae46102baacbde69c311e7 |
|
BLAKE2b-256 | 2d74a503059011596ce4ac7734945e6e5160df264a533d5c623fedc7b227e658 |
File details
Details for the file deairequest-0.0.17-py3-none-any.whl
.
File metadata
- Download URL: deairequest-0.0.17-py3-none-any.whl
- Upload date:
- Size: 46.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d880257bb28f9427dd7924c30164633dc38db29a108a8fbf0fa9521d3f005bd8 |
|
MD5 | d9ed5496bdb862bb1d25c7646b2ea971 |
|
BLAKE2b-256 | e1e615c604758975590e65c424c7fdcee475bcad321db2657dfcacfb0930d3fa |