Submit PrimeHub jobs easier
Project description
This is still in the Pre-Alpha stage.
PrimeHub Job
Submit PrimeHub jobs easier
Install
pip install primehub_job
How to Use
- Set the API_TOKEN environment variable
- Make sure your group have group volume
from primehub_job import submit_phjob, get_phjob_logs, get_phjob_result, wait_and_get_phjob_result
# You can write @submit_job() to use default settings.
@submit_phjob(name='submitJob', image='datascience-notebook', instance_type='cpu')
def test(a, b='b'):
print(a)
print(b)
return a, b
# Submit a job and wait the result
wait_and_get_phjob_result(test('aaa', 'ccc'))
# Submit a job
job_id = test('aaa', 'ccc')
# Get the running logs
print(get_phjob_logs(job_id))
# Get the job result
get_phjob_result(job_id)
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
primehub_job-0.0.4.tar.gz
(3.6 kB
view details)
Built Distribution
File details
Details for the file primehub_job-0.0.4.tar.gz
.
File metadata
- Download URL: primehub_job-0.0.4.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00e351efb36df6630676f68c9bfb58de8e4ce6e05dc577cbdee302354ee839e5 |
|
MD5 | 65d7626c94e86a8f58d07ef45c20cd44 |
|
BLAKE2b-256 | 9878170fc48c5faa9f3293f744a8c4d8cb9ee83dd31189fd1dcac3f150a3117e |
File details
Details for the file primehub_job-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: primehub_job-0.0.4-py3-none-any.whl
- Upload date:
- Size: 10.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | af02a799f5fbe47b110ec413ca3bcbee91be8b5b01916476f110c2d547a9cf5f |
|
MD5 | fe18cf33b721aaccf20aa9c555b04eda |
|
BLAKE2b-256 | 5dcf8d9cf23547d9e48ac2fd71dba6c8ec261e7569970450dc0a0fe40b6ce5b3 |