Skip to content

Releases: InfuseAI/primehub-python-sdk

v0.4.2

18 Apr 09:07
5cde4c7
Compare
Choose a tag to compare

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

02 Mar 02:10
cf5bb60
Compare
Choose a tag to compare

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>

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

27 Dec 05:28
edbdbcb
Compare
Choose a tag to compare

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

26 Nov 01:47
d1fceb1
Compare
Choose a tag to compare

Feature added

  • Introduce auto-filling fields to create or submit 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 to volumes #22666
  • Rename the original command group schedule to recurring-jobs #23065
  • Make instancetypes list output more information #23015
  • Bugfix: some errors not formatted well #23027

v0.3.6

12 Nov 08:20
Compare
Choose a tag to compare

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

26 Oct 09:03
Compare
Choose a tag to compare

Feature added

command group for general users

command group for admin users

$ primehub admin

Usage:
  primehub admin <command>

Available Commands:
  datasets             Manage datasets
  instancetypes        Manage instance type
  users                Manage users

v0.3.4

18 Oct 03:38
5200518
Compare
Choose a tag to compare

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

v0.3.2

30 Sep 06:07
c657cd9
Compare
Choose a tag to compare

Changelogs

  • Fix logs --follow output

v0.3.1

28 Sep 01:41
Compare
Choose a tag to compare

Changelog

  • Bugfix: copy jobs artifacts would fail when a group name is not normalized in the PHFS path.

Installation

pip install primehub-python-sdk==0.3.1

v0.3.0

19 Aug 02:18
Compare
Choose a tag to compare

Release v0.3.0 compatible version to PrimeHub 3.x

pip install primehub-python-sdk==0.3.0