Primehub-python-sdk

Latest version: v0.4.2

Safety actively analyzes 623165 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

4.0

`models` now supports model registry and related functions.

bash
$ primehub models list-runs <experiment_name>


bash
$ primehub models list-artifacts <run_id>


bash
$ 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](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.

bash
$ primehub files list /
name size lastModified phfsUri
------------- ------ -------------- ---------------------
jobArtifacts/ 0 phfs:///jobArtifacts/


bash
$ primehub files get-phfs-uri <path>

0.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

0.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.

bash
$ 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.

bash
$ 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


bash
$ 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.

bash
$ primehub admin groups list-users <group_id>


bash
$ 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.

bash
$ primehub admin images add-group <id> <group_id>
$ primehub admin images remove-group <id> <group_id>
$ primehub admin images list-groups <id>


bash
$ primehub admin instancetypes add-group <id> <group_id>
$ primehub admin instancetypes remove-group <id> <group_id>
$ primehub admin instancetypes list-groups <id>


bash
$ 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.

bash
$ primehub admin reports list


bash
$ primehub admin reports download <url>


Group admin enhancements

0.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
* [files](https://github.com/InfuseAI/primehub-python-sdk/blob/v0.3.8/docs/CLI/files.md) add `delete` operation
* [datasets](https://github.com/InfuseAI/primehub-python-sdk/blob/v0.3.8/docs/CLI/datasets.md)
* [secrets](https://github.com/InfuseAI/primehub-python-sdk/blob/v0.3.8/docs/CLI/secrets.md)

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
* [secrets](https://github.com/InfuseAI/primehub-python-sdk/blob/v0.3.8/docs/CLI/admin/secrets.md)

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

0.3.7

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](https://github.com/InfuseAI/primehub-python-sdk/blob/v0.3.7/docs/CLI/apps.md#fields-for-creating-or-updating) 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

0.3.6

Feature added

command group for general users

* [files](https://github.com/InfuseAI/primehub-python-sdk/blob/v0.3.6/docs/CLI/files.md) 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

* [groups](https://github.com/InfuseAI/primehub-python-sdk/blob/v0.3.6/docs/CLI/admin/groups.md)
* [images](https://github.com/InfuseAI/primehub-python-sdk/blob/v0.3.6/docs/CLI/admin/images.md)


$ primehub admin
Usage:
primehub admin <command>

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

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.