Apheris CLI package for interaction with the Apheris product.
Project description
Apheris CLI
The Apheris Command Line Interface (CLI) is a tool for Machine Learning Engineers and Data Scientists to define Federated computations, launch them and get the results through the Apheris product.
The CLI provides both terminal and Python interfaces to interact with the Apheris 3.0 platform. It can be used to create, activate and deactivate Compute Specs, and to submit and monitor compute jobs.
We recommend installing the CLI in a fresh virtual environment.
For a full guide to the CLI, please see the Apheris CLI documentation.
Quickstart: Python API
import apheris
# Login to apheris
>>> apheris.login()
Logging in to your company account...
Apheris:
Authenticating with Apheris Cloud Platform...
Please continue the authorization process in your browser.
Login was successful
# List the datasets to which you have access
>>> apheris.list_datasets()
+-----+---------------------------------------------------------+--------------+---------------------------+
| idx | dataset_id | organization | data custodian |
+-----+---------------------------------------------------------+--------------+---------------------------+
| 0 | cancer-medical-images_gateway-2_org-2 | Org 2 | Orsino Hoek |
| 1 | pneumonia-x-ray-images_gateway-2_org-2 | Org 2 | Orsino Hoek |
| 2 | covid-19-patients_gateway-1_org-1 | Org 1 | Agathe McFarland |
| 3 | medical-decathlon-task004-hippocampus-a_gateway-1_org-1 | Org 1 | Agathe McFarland |
| 4 | medical-decathlon-task004-hippocampus-b_gateway-2_org-2 | Org 2 | Orsino Hoek |
| ... | ... | ... | ... |
+-----+---------------------------------------------------------+--------------+---------------------------+
# List models available to you
>>> apheris.list_models()
+-----+---------------------------+-------------------------------------+
| id | name | version |
+-----+---------------------------+-------------------------------------+
| 0 | apheris-nnunet | u.v.w |
| 1 | apheris-statistics | x.y.z |
| ... | ... | ... |
+-----+---------------------------+-------------------------------------+
# List compuutations
>>> apheris.list_compute_specs()
+--------------------------------------+---------------------+------------------------------+
| ID | Created | Activation Status |
+--------------------------------------+---------------------+------------------------------+
| f20eba74-28d2-4458-aedb-72a983cb2a33 | 2025-05-20 13:37:59 | inactive.awaiting_activation |
| 29d542ed-d273-4176-8e3f-dfc70311cf32 | 2025-05-20 13:38:44 | inactive.shutdown |
| c4e3f12a-0b20-4475-9611-79846dcb23b6 | 2025-05-21 07:40:53 | inactive.shutdown |
| aae7bf0e-0568-4441-8d85-fdabc6343a4d | 2025-05-21 07:48:57 | inactive.shutdown |
| 67b76354-aae3-48cc-810a-fd79c1040cc3 | 2025-05-21 07:50:05 | inactive.shutdown |
| 70829d63-bb77-4ff0-a1a9-90273aa38792 | 2025-05-23 06:16:36 | inactive.shutdown |
| 41994296-be34-487c-893c-d183f7baeb99 | 2025-05-23 06:52:50 | inactive.shutdown |
| f1589f63-cfc9-4b1a-b985-ee959121c765 | 2025-05-23 07:17:11 | inactive.shutdown |
| 3640fed9-f1d3-43f8-9b6b-5cde345a5ed5 | 2025-05-26 11:56:14 | inactive.awaiting_activation |
| defe5013-2c73-4eb9-be52-1ae7aed841ff | 2025-05-26 12:00:59 | active.running |
+--------------------------------------+---------------------+------------------------------+
# Run a job in Apheris
>>> from aphcli.api import job
>>> job.run(
... datasets=[
... "medical-decathlon-task004-hippocampus-a_gateway-1_org-1",
... "medical-decathlon-task004-hippocampus-b_gateway-2_org-2"
... ],
... payload={"mode": "training", "model_configuration": "2d", "dataset_id": 4, "num_rounds": 1},
... model="apheris-nnunet",
... version="x.y.z"
...)
Job(duration='0:00:00', id=UUID('f77d5dc7-a2e7-4a2a-827d-49a2131b1ffe'), status='submitted', created_at=datetime.datetime(2025, 7, 8, 17, 17, 6, 897476), compute_spec_id=UUID('defe5013-2c73-4eb9-be52-1ae7aed841ff'))
# Logout of Apheris
>>> apheris.logout()
Logging out from Apheris Cloud Platform session
Successfully logged out
Quickstart: CLI
Logging into Apheris:
$ apheris login
Logging in to your company account...
Apheris:
Authenticating with Apheris Cloud Platform...
Please continue the authorization process in your browser.
Login was successful
You are logged in:
e-mail: your.name@your-company.com
organization: your_organisation
environment: your_environment
You can check your current login status.
$ apheris login status
You are logged in:
e-mail: your.name@your-company.com
organization: your_organisation
environment: your_environment
When you are done with your work, it is recommended to log out.
$ apheris logout
Logging out from Apheris Cloud Platform session
Logging out from Apheris Compute environments session
Successfully logged out
You can see the datasets to which you've been given access using the datasets command:
$ apheris datasets list
+-----+---------------------------------------------------------+--------------+---------------------------+
| idx | dataset_id | organization | data custodian |
+-----+---------------------------------------------------------+--------------+---------------------------+
| 0 | cancer-medical-images_gateway-2_org-2 | Org 2 | Orsino Hoek |
| 1 | pneumonia-x-ray-images_gateway-2_org-2 | Org 2 | Orsino Hoek |
| 2 | covid-19-patients_gateway-1_org-1 | Org 1 | Agathe McFarland |
| 3 | medical-decathlon-task004-hippocampus-a_gateway-1_org-1 | Org 1 | Agathe McFarland |
| 4 | medical-decathlon-task004-hippocampus-b_gateway-2_org-2 | Org 2 | Orsino Hoek |
| ... | ... | ... | ... |
+-----+---------------------------------------------------------+--------------+---------------------------+
And you can see models using the models command:
$ apheris models list
+-----+---------------------------+-------------------------------------+
| id | name | version |
+-----+---------------------------+-------------------------------------+
| 0 | apheris-nnunet | u.v.w |
| 1 | apheris-statistics | x.y.z |
| ... | ... | ... |
+-----+---------------------------+-------------------------------------+
You can schedule a job on Apheris using the job command:
$ apheris job schedule \
--dataset_ids medical-decathlon-task004-hippocampus-a_gateway-1_org-1,medical-decathlon-task004-hippocampus-b_gateway-2_org-2 \
--model_id apheris-nnunet \
--model_version x.y.z \
--payload '{"mode": "training", "model_configuration": "2d", "dataset_id": 4, "num_rounds": 1}'
About to schedule job with parameters:
Dataset IDs: medical-decathlon-task004-hippocampus-a_gateway-1_org-1,medical-decathlon-task004-hippocampus-b_gateway-2_org-2
Model: apheris-nnunet:x.y.z
Payload: {"mode": "training", "model_configuration": "2d", "dataset_id": 4, "num_rounds": 1}
Resources:
Client: 1.0 CPU, 0 GPU, 2000 MB memory
Server: 1.0 CPU, 0 GPU, 2000 MB memory
Do you want to proceed? (y/N)
:y
The job was submitted! The job ID is d6f7b657-8b30-4636-8f4c-2d96678095ba
Check the status of a job:
$ apheris job status
Using the cached `compute_spec_id` defe5013-2c73-4eb9-be52-1ae7aed841ff [2025-07-08 17:17:06].
Using the cached `job_id` f77d5dc7-a2e7-4a2a-827d-49a2131b1ffe [stored 2025-07-08 17:36:26].
status: running
Once a job is complete, you can download the results:
$ apheris job download-results /path/to/store/results
Using the cached `compute_spec_id` defe5013-2c73-4eb9-be52-1ae7aed841ff [2025-07-08 17:17:06].
Using the cached `job_id` f77d5dc7-a2e7-4a2a-827d-49a2131b1ffe [stored 2025-07-08 17:36:26].
Successfully downloaded job outputs to /path/to/store/results
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 Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file apheris_cli-0.39.0-py3-none-any.whl.
File metadata
- Download URL: apheris_cli-0.39.0-py3-none-any.whl
- Upload date:
- Size: 48.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a0268ea86c43b8f84b84bb331f812b95a20a862ee76aa17f0cb47888b7db02e
|
|
| MD5 |
7c0b1ecede6d342bb8989157f3b3d60f
|
|
| BLAKE2b-256 |
3240387d3f3fa177727b8200d1b61849b9d38d79e22d5156f9aa0e2a066c9385
|
Provenance
The following attestation bundles were made for apheris_cli-0.39.0-py3-none-any.whl:
Publisher:
publish-pypi.yaml on apheris/apheris-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
apheris_cli-0.39.0-py3-none-any.whl -
Subject digest:
5a0268ea86c43b8f84b84bb331f812b95a20a862ee76aa17f0cb47888b7db02e - Sigstore transparency entry: 406115087
- Sigstore integration time:
-
Permalink:
apheris/apheris-cli@7af1db1c2ae98f9ea579dcd90c8c15da766b3ab0 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/apheris
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yaml@7af1db1c2ae98f9ea579dcd90c8c15da766b3ab0 -
Trigger Event:
workflow_dispatch
-
Statement type: