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 hashes)
Built Distribution
Close
Hashes for primehub_job-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | af02a799f5fbe47b110ec413ca3bcbee91be8b5b01916476f110c2d547a9cf5f |
|
MD5 | fe18cf33b721aaccf20aa9c555b04eda |
|
BLAKE2b-256 | 5dcf8d9cf23547d9e48ac2fd71dba6c8ec261e7569970450dc0a0fe40b6ce5b3 |