Releases: InfuseAI/primehub-python-sdk
v0.4.2
Bug fixes
Admin Groups
- [SDK] Failed to list images / instancetypes / volumes
- [SDK] Failed to create images / instancetypes / volumes
- [SDK] Failed to disconnect users
- [SDK / CLI] The return of updating group doesn't include newly added field
Enhancement
Admin Groups
- Use List instead of String for updating group admins
- Improve readability for the output of getting and updating group
Others
- Refactor and remove some unused code
v0.4.0
Feature added
Admin Groups enhancements
Now system admin is able to connect and disconnect resources like image
, instancetype
, and volume
. When a resource is connected to a group, the member of the group can access the resource.
$ primehub admin groups connect-image <group_id> <image_id>
$ primehub admin groups connect-instancetype <group_id> <instancetype_id>
$ primehub admin groups connect-volume <group_id> <volume_id>
$ primehub admin groups disconnect-image <group_id> <image_id>
$ primehub admin groups disconnect-instancetype <group_id> <instancetype_id>
$ primehub admin groups disconnect-volume <group_id> <volume_id>
System admin can manage resources. Create a resource with a group directly, and list resources.
$ primehub admin groups create-image <group_id> --file /tmp/image.json
$ primehub admin groups create-instancetype <group_id> --file /tmp/instancetype.json
$ primehub admin groups create-volume <group_id> --file /tmp/volume.json
$ primehub admin groups list-images <group_id>
$ primehub admin groups list-instancetypes <group_id>
$ primehub admin groups list-volumes <group_id>
System admin can manage users. Add users to a group, and list group users.
$ primehub admin groups list-users <group_id>
$ primehub admin groups connect-user <group_id> <user_id>
Admin Images, InstanceTypes, and Volumes enhancements
It’s similar with admin groups
, but from resource perspective. System admin can manage groups for resources.
$ primehub admin images add-group <id> <group_id>
$ primehub admin images remove-group <id> <group_id>
$ primehub admin images list-groups <id>
$ primehub admin instancetypes add-group <id> <group_id>
$ primehub admin instancetypes remove-group <id> <group_id>
$ primehub admin instancetypes list-groups <id>
$ primehub admin volumes add-group <id> <group_id>
$ primehub admin volumes remove-group <id> <group_id>
$ primehub admin volumes list-groups <id>
Admin reports added
System admin now can download and list reports.
$ primehub admin reports list
$ primehub admin reports download <url>
Group admin enhancements
Note: This is required PrimeHub v4.0
Group admin now can manage members.
$ primehub groups add-user <group_id> <user_id>
$ primehub groups remove-user <group_id> <user_id>
$ primehub groups list-users <group_id>
Group admin can set/unset MLflow settings.
$ primehub groups set-mlflow <group_id> --file /tmp/mlflow.json
$ primehub groups unset-mlflow <group_id>
$ primehub groups get-mlflow <group_id>
Group images enhancements
Group admin now can create or delete group images
$ primehub images create --file /tmp/base-notebook-group-1.json
primehub images delete <image_name>
MLflow model registry
Note: This is required PrimeHub v4.0
models
now supports model registry and related functions.
$ primehub models list-runs <experiment_name>
$ primehub models list-artifacts <run_id>
$ primehub models register <name> <run_id> <path>
- For more details, please check the doc: https://github.com/InfuseAI/primehub-python-sdk/blob/main/docs/CLI/models.md#example-register-a-model
Files enhancements
files
can easily obtain PHFS Uri. Add phfsUri
field to list outputs and add a new function get-phfs-uri
to get PHFS Uri by path directly.
$ primehub files list /
name size lastModified phfsUri
------------- ------ -------------- ---------------------
jobArtifacts/ 0 phfs:///jobArtifacts/
$ primehub files get-phfs-uri <path>
v0.3.8
Feature added
CLI auto-completion
We Introduce a beta version of the command-line auto-completion feature.
With auto-completion, it will present you with possible options of commands and help complete it.
$ source primehub-sdk-autocomplete.sh
$ primehub<SPACE><TAB>
admin apptemplates deployments groups info jobs models recurring-jobs volumes
apps config files images instancetypes me notebooks version
command group for general users
Usage:
primehub datasets <command>
Manage datasets
Available Commands:
create Create a datasets
delete Delete the dataset
files-delete delete files from the dataset
files-download download files from the dataset
files-list lists files of the dataset
files-upload upload files to the dataset
get Get the dataset
list List datasets
update Update a dataset
Usage:
primehub secrets <command>
Get a secret or list secrets
Available Commands:
get Get a secret by id
list List secrets
command group for admin users
Usage:
primehub admin secrets <command>
Manage secrets
Available Commands:
create Create a secret
delete Delete a secret by id
get Get an secret by id
list List secrets
update Update the secret
Changes and bugfixes
- Refine
files
operation behavior #23727 - Bugfix: fix im #23681
- Documents update
v0.3.7
Feature added
- Introduce auto-filling fields to
create
orsubmit
command #22571
We add the auto-filling feature to actions that create new resources. It happens when a required
field (a few optional cases) is omitted and is supported by auto-filling.
We take create
PhApp by example:
Before auto-filling was introduced, we put all required fields to create an app:
$ primehub apps create <<EOF
{
"templateId": "code-server",
"id": "code-server-26fcc",
"displayName": "my-code-server-26fcc",
"instanceType": "cpu-1",
"scope": "primehub"
}
EOF
After auto-filling was supported, we remove the id
and it will be generated with templateId
prefix ( code-server-{random-hex} )
$ primehub apps create <<EOF
{
"templateId": "code-server",
"displayName": "my-code-server-26fcc",
"instanceType": "cpu-1",
"scope": "primehub"
}
EOF
Changes and bugfixes
- Rename the original command group
datasets
tovolumes
#22666 - Rename the original command group
schedule
torecurring-jobs
#23065 - Make
instancetypes list
output more information #23015 - Bugfix: some errors not formatted well #23027
v0.3.6
Feature added
command group for general users
- files add
upload
function
$ primehub files
Usage:
primehub files <command>
List and download shared files
Available Commands:
download Download shared files
list List shared files
upload Upload shared files
command group for admin users
$ primehub admin
Usage:
primehub admin <command>
Available Commands:
datasets Manage datasets
groups Manage groups
images Manage images
instancetypes Manage instance type
users Manage users
v0.3.5
v0.3.4
All commands for primehub
$ primehub
Usage:
primehub <command>
Available Commands:
apps Manage PrimeHub Applications
apptemplates Get PhAppTemplates
config Update the settings of PrimeHub SDK
datasets Get a dataset or list datasets
deployments Get a deployment or list deployments
files List and download shared files
groups Get a group or list groups
images Get a image or list images
info Display the user information and the selected group information
instancetypes Get an instance types of list instance types
jobs Get a job or list jobs
me Show user account
notebooks Get notebooks logs
schedules Get a schedule or list schedules
version Display the version of PrimeHub Python SDK
Options:
-h, --help Show the help
Global Options:
--config CONFIG Change the path of the config file (Default: ~/.primehub/config.json)
--endpoint ENDPOINT Override the GraphQL API endpoint
--token TOKEN Override the API Token
--group GROUP Override the current group
--json Output the json format (output human-friendly format by default)
PhApp features
New features to work with PhAppTemplate and PhApp functions.
- primehub apps
- primehub apptemplates
Administration feature
$ primehub admin
Usage:
primehub admin <command>
Available Commands:
datasets Manage datasets
Options:
-h, --help Show the help
Global Options:
--config CONFIG Change the path of the config file (Default: ~/.primehub/config.json)
--endpoint ENDPOINT Override the GraphQL API endpoint
--token TOKEN Override the API Token
--group GROUP Override the current group
--json Output the json format (output human-friendly format by default)
The datasets
is the first command group in our admin
group. You could manage datasets with PrimeHub CLI and SDK.
Please see documents