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/"))
Release files for deairequest 0.0.20
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| deairequest-0.0.20.tar.gz | 41.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| deairequest-0.0.20-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 89.4 kB
Release files / deairequest-0.0.20.tar.gz
| Download URL | deairequest-0.0.20.tar.gz |
|---|---|
| Size | 41.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d1548dc3cd7222363929174fbc8fb73e9c3595db364fc49998e44ef108814344
|
|
BLAKE2b-256 checksum How to use checksums |
53f4092f7352446abb1bc5c6e82547b7084c9d1f40728296fcb10c4860b68efc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.5
|
Release files / deairequest-0.0.20-py3-none-any.whl
| Download URL | deairequest-0.0.20-py3-none-any.whl |
|---|---|
| Size | 47.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
95808eb1d4170ba2589e7f24c62c881165c53e7e9e3b0dfe4730eaf272615b29
|
|
BLAKE2b-256 checksum How to use checksums |
43fe069dcaefd780c610554d909076c3a83b86a8d58b723a35cb898b0e6b1634
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.5
|