Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HyperAI integration: orchestrator and service connector #2372

Merged
merged 140 commits into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
140 commits
Select commit Hold shift + click to select a range
d7c4ada
Add init for HyperAI integration
christianversloot Jan 23, 2024
38a0f75
WIP: HyperAI service connector
christianversloot Jan 23, 2024
069aa5a
WIP
christianversloot Jan 23, 2024
8555b06
WIP: HyperAI Service Connector
christianversloot Jan 23, 2024
1cf7b1e
WIP: HyperAI Orchestrator
christianversloot Jan 23, 2024
61aaa28
Replace Docker compose write with temporary file and SCP
christianversloot Jan 25, 2024
b1971ef
Variable assignment error
christianversloot Jan 25, 2024
433ffb0
Set dependency
christianversloot Jan 25, 2024
f911c65
Set basic values of the HyperAI settings and config
christianversloot Jan 25, 2024
25b4e6b
Add config property
christianversloot Jan 25, 2024
b353a18
Allow mounts to be made
christianversloot Jan 25, 2024
ca9b525
Remove newline
christianversloot Jan 25, 2024
3a68dde
Merge pull request #1 from zenml-io/develop
christianversloot Jan 25, 2024
d611a4b
Finish (untested) orchestrator
christianversloot Jan 25, 2024
b9bd84f
Import HyperAI integration
christianversloot Jan 25, 2024
a614d4d
Import HyperAI service connector in service connector registry
christianversloot Jan 25, 2024
17d016f
Rename resource type
christianversloot Jan 25, 2024
93b1dbe
Rename auth method
christianversloot Jan 25, 2024
c82c4c6
Force key to be base64
christianversloot Jan 25, 2024
ec4f48e
Fixes to service connector
christianversloot Jan 25, 2024
442d7f3
Identify instance by name and IP address
christianversloot Jan 25, 2024
17b4990
Strip IP address Python
christianversloot Jan 25, 2024
99b15e2
Strip IP address Python
christianversloot Jan 25, 2024
15658a5
Return paramiko client
christianversloot Jan 25, 2024
cb53440
WIP
christianversloot Jan 25, 2024
00bbe76
Mimic sagemaker integration
christianversloot Jan 25, 2024
502908e
Fixes to make HyperAI orchestrator visible
christianversloot Jan 25, 2024
52b2417
Fixes to make orchestrator work
christianversloot Jan 26, 2024
e5fd25b
Temp change default local ip for testing
christianversloot Jan 26, 2024
0bbe217
Environment fix
christianversloot Jan 26, 2024
8efebb0
Use upstream steps to determine dependencies
christianversloot Jan 26, 2024
7bf8da3
Add support for scheduled pipelines
christianversloot Jan 26, 2024
b14e68c
Polish schedules
christianversloot Jan 26, 2024
110be97
Add configuration support for multiple Paramiko key types
christianversloot Jan 26, 2024
1217584
Add Base64 instructions
christianversloot Jan 26, 2024
5f047c9
Rename various vars
christianversloot Jan 26, 2024
ef7ab76
Add instructions about possible cron
christianversloot Jan 26, 2024
82bfc58
Some docstring edits
christianversloot Jan 26, 2024
943db39
Add setting for CR autologin
christianversloot Jan 26, 2024
92519c1
Add rudimentary Docker login
christianversloot Jan 26, 2024
94268fa
Move value
christianversloot Jan 26, 2024
fa0144d
Add docstring
christianversloot Jan 26, 2024
4a6c30e
Remove unused def
christianversloot Jan 26, 2024
e8c9f97
Extract Paramiko key type given service connector configuration
christianversloot Jan 26, 2024
51993b0
Add better warnings
christianversloot Jan 26, 2024
a4b0433
Check for None differently
christianversloot Jan 26, 2024
88068fc
Automatic Docker login if configured
christianversloot Jan 26, 2024
7340603
Add HyperAI orchestrator flavor to docs
christianversloot Jan 26, 2024
013940d
Basic docs for HyperAI orchestrator
christianversloot Jan 26, 2024
eee13a9
Add HyperAI service connector to auth management docs
christianversloot Jan 26, 2024
3d613e6
Add HyperAI service connector to docs
christianversloot Jan 26, 2024
9576745
Set autologin to False by default
christianversloot Jan 29, 2024
992cda2
Add test similar to Airflow orchestrator
christianversloot Jan 29, 2024
ba53f7c
Formatting
christianversloot Jan 29, 2024
8b8d952
Merge pull request #2 from christianversloot/develop
christianversloot Jan 29, 2024
76727e1
Revert changes needed to run successfully locally
christianversloot Jan 29, 2024
850f7db
Add mount path validation
christianversloot Jan 30, 2024
3aa6a30
Improve error handling and formatting
christianversloot Jan 30, 2024
71ab61d
Format mount paths differently
christianversloot Jan 30, 2024
c6e74f7
Upgrade azureml-core to 1.54.0.post1
christianversloot Jan 30, 2024
251665b
Fix docstring
christianversloot Jan 30, 2024
ab4fe04
Update src/zenml/integrations/hyperai/service_connectors/hyperai_serv…
christianversloot Jan 30, 2024
2c19d2c
Rename def into _validate_mount_paht
christianversloot Jan 30, 2024
e3ecefd
Merge branch 'hyperai-integration' of github.com:christianversloot/ze…
christianversloot Jan 30, 2024
5baf47d
Update config docstring to default to False
christianversloot Jan 30, 2024
2c6f6a9
Move Settings, Config and Flavor to lavor folder
christianversloot Jan 30, 2024
da39cc8
Remove type from docstring
christianversloot Jan 30, 2024
d3180ab
Remove type from docstring
christianversloot Jan 30, 2024
9511608
Remove type check convered by pydantic
christianversloot Jan 30, 2024
1cc6bff
Select container registry more efficiently
christianversloot Jan 30, 2024
7f1bb67
Remove redundant type conversion
christianversloot Jan 30, 2024
b843d83
Move Paramiko client creation into helper method
christianversloot Jan 30, 2024
921bcd5
Reformatting
christianversloot Jan 30, 2024
57949b8
Fix imports
christianversloot Jan 30, 2024
76fdb29
Temp changes for local testing
christianversloot Jan 30, 2024
3e7390c
Fix imports
christianversloot Jan 30, 2024
86688af
Revert "Temp changes for local testing"
christianversloot Jan 30, 2024
2d36b6e
Rename HYPERAI_RESOURCE_TYPE into hyperai-instance
christianversloot Jan 30, 2024
da2877c
Rename ip_address into hostname
christianversloot Jan 30, 2024
906e591
Update src/zenml/integrations/hyperai/service_connectors/hyperai_serv…
christianversloot Jan 30, 2024
fc0e473
Merge branch 'hyperai-integration' of github.com:christianversloot/ze…
christianversloot Jan 30, 2024
57f2c92
Raise AuthorizationException if client cannot be created
christianversloot Jan 30, 2024
ce40f59
Remove RuntimeError in two places because it will never arrive in tha…
christianversloot Jan 30, 2024
ae7b069
Remove try/catch statement
christianversloot Jan 30, 2024
20709ff
Let exception fall through if applicable
christianversloot Jan 30, 2024
0cd8518
Remove raises
christianversloot Jan 30, 2024
e5f49a3
Add warning hint about long-lived credentials
christianversloot Jan 30, 2024
c1357bf
Renames in docs based on changes
christianversloot Jan 30, 2024
a2e54b9
Add missing io import
christianversloot Jan 30, 2024
9df4546
Formatting
christianversloot Jan 30, 2024
d821ef1
Add automatic_cleanup_pipeline_files to HyperAIOrchestratorConfig
christianversloot Jan 30, 2024
28fd86c
Remove redundant variable assignment
christianversloot Jan 30, 2024
7101b14
Clean only if users configure auto cleaning
christianversloot Jan 30, 2024
2b4c546
Update docs
christianversloot Jan 30, 2024
4a9b9e5
Work in progress: multi IP service connector
christianversloot Jan 30, 2024
da3b453
Resources
christianversloot Jan 30, 2024
7960c8b
Append hostname instead
christianversloot Jan 30, 2024
50ef923
Omit assigning value
christianversloot Jan 30, 2024
74052d0
Rename config value
christianversloot Jan 30, 2024
b9cc6b8
Ensure that hostname is passed to Paramiko client
christianversloot Jan 30, 2024
6ca8b97
Raise NotImplementedError instead of pass value
christianversloot Jan 30, 2024
8a55572
Formatting
christianversloot Jan 30, 2024
4ad6d79
Changes to _verify
christianversloot Jan 30, 2024
230f95c
Reflect changes in service connector docs
christianversloot Jan 30, 2024
08914a2
Fix connector value validation to allow arrays to be used with the CLI
stefannica Jan 30, 2024
90efa46
Merge branch 'hyperai-integration' of github.com:christianversloot/ze…
christianversloot Jan 30, 2024
0f9538c
Reflect changes in orchestrator docs
christianversloot Jan 30, 2024
421f53a
Fix connector verification to allow the multi-instance case
stefannica Jan 30, 2024
4141425
Merge branch 'hyperai-integration' of github.com:christianversloot/ze…
stefannica Jan 30, 2024
7bb3405
Ensure that pipelines can run when scheduled by setting run ID dynami…
christianversloot Jan 31, 2024
79aef22
Reformatting
christianversloot Jan 31, 2024
a92dd21
Add information about scheduled pipelines to docs
christianversloot Jan 31, 2024
82375fa
Merge branch 'develop' into hyperai-integration
strickvl Jan 31, 2024
93d58a9
Merge branch 'develop' into hyperai-integration
christianversloot Feb 1, 2024
31d0a28
Use service connector username to create Compose files on instance
christianversloot Feb 1, 2024
ebf8f69
Add GPU reservation if configured that way
christianversloot Feb 1, 2024
88f07c9
Formatting
christianversloot Feb 1, 2024
e7d0575
Add instruction
christianversloot Feb 1, 2024
f35882c
Add prerequisites for HyperAI instance
christianversloot Feb 2, 2024
e48632b
Merge branch 'develop' into hyperai-integration
christianversloot Feb 2, 2024
c20f9c5
Merge branch 'develop' into hyperai-integration
christianversloot Feb 2, 2024
a43baed
Formatting and docstrings
christianversloot Feb 3, 2024
5c6c887
Merge branch 'hyperai-integration' of github.com:christianversloot/ze…
christianversloot Feb 3, 2024
aa25e21
Fixed remaining linter errors
stefannica Feb 5, 2024
d75ece0
Applied review suggestions
stefannica Feb 5, 2024
7a1bf4b
Add paramiko to API docs mocks
stefannica Feb 5, 2024
bc96c84
HyperAI orchestrator config tests; make additional assertions availab…
christianversloot Feb 5, 2024
d0be24c
Remove GPU-based Dockerfile
christianversloot Feb 5, 2024
45cc0d4
Merge branch 'develop' into hyperai-integration
strickvl Feb 5, 2024
8147575
Ensure that shell commands are escaped when used
christianversloot Feb 5, 2024
e1bc7d0
Provide password to stdin differently
christianversloot Feb 5, 2024
6e680bf
Escape case where file cannot be written to HyperAI instance
christianversloot Feb 5, 2024
fe026f4
Escape inputs differently
christianversloot Feb 5, 2024
cd16e76
Use network mode host to avoid non-overlapping IPv4 network pool error
christianversloot Feb 5, 2024
b4278cb
Disable security check for paramiko auto-add-policy
stefannica Feb 5, 2024
12231d4
Changes to escaping
christianversloot Feb 5, 2024
05debc3
Merge branch 'hyperai-integration' of github.com:christianversloot/ze…
christianversloot Feb 5, 2024
67ea70e
Merge branch 'develop' into hyperai-integration
christianversloot Feb 5, 2024
2a134aa
Silenced remaining security issues and fixed remaining linter errors
stefannica Feb 5, 2024
a7be14c
Merge branch 'hyperai-integration' of github.com:christianversloot/ze…
stefannica Feb 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ zenml service-connector list-types
┃ │ │ 🌀 kubernetes-cluster │ service-account │ │ ┃
┃ │ │ 🐳 docker-registry │ oauth2-token │ │ ┃
┃ │ │ │ impersonation │ │ ┃
┠──────────────────────────────┼───────────────┼───────────────────────┼──────────────────┼───────┼────────┨
┃ HyperAI Service Connector │ 🤖 hyperai │ 🤖 hyperai-instance │ rsa-key │ ✅ │ ✅ ┃
┃ │ │ │ dsa-key │ │ ┃
┃ │ │ │ ecdsa-key │ │ ┃
┃ │ │ │ ed25519-key │ │ ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━┷━━━━━━━┷━━━━━━━━┛
```
{% endcode %}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
description: Configuring HyperAI Connectors to connect ZenML to HyperAI instances.
---

# HyperAI Service Connector

The ZenML HyperAI Service Connector allows authenticating with a HyperAI instance for deployment of pipeline runs. This connector provides pre-authenticated Paramiko SSH clients to Stack Components that are linked to it.

```
$ zenml service-connector list-types --type hyperai
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━┯━━━━━━━┯━━━━━━━━┓
┃ NAME │ TYPE │ RESOURCE TYPES │ AUTH METHODS │ LOCAL │ REMOTE ┃
┠───────────────────────────┼────────────┼────────────────────┼──────────────┼───────┼────────┨
┃ HyperAI Service Connector │ 🤖 hyperai │ 🤖 hyperai-instance │ rsa-key │ ✅ │ ✅ ┃
┃ │ │ │ dsa-key │ │ ┃
┃ │ │ │ ecdsa-key │ │ ┃
┃ │ │ │ ed25519-key │ │ ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━┷━━━━━━━┷━━━━━━━━┛
```

## Prerequisites
The HyperAI Service Connector is part of the HyperAI integration. It is necessary to install the integration in order to use this Service Connector:

* `zenml integration install hyperai` installs the HyperAI integration

## Resource Types
The HyperAI Service Connector supports HyperAI instances.

## Authentication Methods
ZenML creates an SSH connection to the HyperAI instance in the background when using this Service Connector. It then provides these connections to stack components requiring them, such as the HyperAI Orchestrator. Multiple authentication methods are supported:

1. RSA key based authentication.
2. DSA (DSS) key based authentication.
3. ECDSA key based authentication.
4. ED25519 key based authentication.

christianversloot marked this conversation as resolved.
Show resolved Hide resolved
{% hint style="warning" %}
SSH private keys configured in the connector will be distributed to all clients that use them to run pipelines with the HyperAI orchestrator. SSH keys are long-lived credentials that give unrestricted access to HyperAI instances.
{% endhint %}

When configuring the Service Connector, it is required to provide at least one hostname via `hostnames` and the `username` with which to login. Optionally, it is possible to provide an `ssh_passphrase` if applicable. This way, it is possible to use the HyperAI service connector in multiple ways:

1. Create one service connector per HyperAI instance with different SSH keys.
2. Configure a reused SSH key just once for multiple HyperAI instances, then select the individual instance when creating the HyperAI orchestrator component.

## Auto-configuration

{% hint style="info" %}
This Service Connector does not support auto-discovery and extraction of authentication credentials from HyperAI instances. If this feature is useful to you or your organization, please let us know by messaging us in [Slack](https://zenml.io/slack-invite) or [creating an issue on GitHub](https://github.com/zenml-io/zenml/issues).
{% endhint %}

## Stack Components use

The HyperAI Service Connector can be used by the HyperAI Orchestrator to deploy pipeline runs to HyperAI instances.

<!-- For scarf -->
<figure><img alt="ZenML Scarf" referrerpolicy="no-referrer-when-downgrade" src="https://static.scarf.sh/a.png?x-pxid=f0b4f458-0a54-4fcd-aa95-d5ee424815bc" /></figure>
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
---
description: Orchestrating your pipelines to run on HyperAI.ai instances.
---

# HyperAI orchestrator
[HyperAI](https://www.hyperai.ai) is a cutting-edge cloud compute platform designed to make AI accessible for everyone. The HyperAI orchestrator is an [orchestrator](orchestrators.md) flavor that allows you to easily deploy your pipelines on HyperAI instances.

{% hint style="warning" %}
This component is only meant to be used within the context of
a [remote ZenML deployment scenario](/docs/book/deploying-zenml/zenml-self-hosted/zenml-self-hosted.md).
Usage with a local ZenML deployment may lead to unexpected behavior!
{% endhint %}

### When to use it

You should use the HyperAI orchestrator if:

* you're looking for a managed solution for running your pipelines.
* you're a HyperAI customer.

### Prerequisites
You will need to do the following to start using the HyperAI orchestrator:

* Have a running HyperAI instance. It must be accessible from the internet (or at least from the IP addresses of your ZenML users) and allow SSH key based access (passwords are not supported).
* Ensure that a recent version of Docker is installed. This version must include Docker Compose, meaning that the command `docker compose` works.
* Ensure that the appropriate [NVIDIA Driver](https://www.nvidia.com/en-us/drivers/unix/) is installed on the HyperAI instance (if not already installed by the HyperAI team).
* Ensure that the [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html) is installed and configured on the HyperAI instance.

Note that it is possible to omit installing the NVIDIA Driver and NVIDIA Container Toolkit. However, you will then be unable to use the GPU from within your ZenML pipeline. Additionally, you will then need to disable GPU access within the container when configuring the Orchestrator component, or the pipeline will not start correctly.

## How it works
The HyperAI orchestrator works with Docker Compose, which can be used to construct machine learning pipelines.
Under the hood, it creates a Docker Compose file which it then deploys and executes on the configured HyperAI instance.
For each ZenML pipeline step, it creates a service in this file. It uses the `service_completed_successfully` condition
to ensure that pipeline steps will only run if their connected upstream steps have successfully finished.

If configured for it, the HyperAI orchestrator will connect the HyperAI instance to the stack's container registry to ensure
a smooth transfer of Docker images.

### Scheduled pipelines

[Scheduled pipelines](../../../user-guide/advanced-guide/pipelining-features/schedule-pipeline-runs.md) are supported by the HyperAI orchestrator. Currently, only cron expressions are supported via `cron_expression`. When pipeline runs are scheduled, they are added as a crontab entry
on the HyperAI instance.

### How to deploy it
To use the HyperAI orchestrator, you must configure a HyperAI Service Connector in ZenML and link it to the HyperAI orchestrator
component. The service connector contains credentials with which ZenML connects to the HyperAI instance.

Additionally, the HyperAI orchestrator must be used in a stack that contains a container registry and an image builder.

### How to use it

To use the HyperAI orchestrator, we must configure a HyperAI Service Connector first using one of its supported authentication
methods. For example, for authentication with an RSA-based key, create the service connector as follows:

```shell
zenml service-connector register <SERVICE_CONNECTOR_NAME> --type=hyperai --auth-method=rsa-key --base64_ssh_key=<BASE64_SSH_KEY> --hostnames=<INSTANCE_1>,<INSTANCE_2>,..,<INSTANCE_N> --username=<INSTANCE_USERNAME>
```

Hostnames are either DNS resolvable names or IP addresses.

For example, if you have two servers - one at `1.2.3.4` and another at `4.3.2.1`, you could provide them as `--hostnames=1.2.3.4,4.3.2.1`.

Optionally, it is possible to provide a passphrase for the key (`--ssh_passphrase`).

Following registering the service connector, we can register the orchestrator and use it in our active stack:

```shell
zenml orchestrator register <ORCHESTRATOR_NAME> --flavor=hyperai

# Register and activate a stack with the new orchestrator
zenml stack register <STACK_NAME> -o <ORCHESTRATOR_NAME> ... --set
```

You can now run any ZenML pipeline using the HyperAI orchestrator:

```shell
python file_that_runs_a_zenml_pipeline.py
```

#### Enabling CUDA for GPU-backed hardware

Note that if you wish to use this orchestrator to run steps on a GPU, you will need to
follow [the instructions on this page](/docs/book/user-guide/advanced-guide/infrastructure-management/scale-compute-to-the-cloud.md) to ensure
that it works. It requires adding some extra settings customization and is essential to enable CUDA for the GPU to
give its full acceleration.

<!-- For scarf -->
<figure><img alt="ZenML Scarf" referrerpolicy="no-referrer-when-downgrade" src="https://static.scarf.sh/a.png?x-pxid=f0b4f458-0a54-4fcd-aa95-d5ee424815bc" /></figure>

Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Additional orchestrators are provided by integrations:
| [SkypilotAWSOrchestrator](skypilot-vm.md) | `vm_aws` | `skypilot[aws]` | Runs your pipelines in AWS VMs using SkyPilot |
| [SkypilotGCPOrchestrator](skypilot-vm.md) | `vm_gcp` | `skypilot[gcp]` | Runs your pipelines in GCP VMs using SkyPilot |
| [SkypilotAzureOrchestrator](skypilot-vm.md) | `vm_azure` | `skypilot[azure]` | Runs your pipelines in Azure VMs using SkyPilot |
| [HyperAIOrchestrator](hyperai.md) | `hyperai` | `hyperai` | Runs your pipeline in HyperAI.ai instances.
| [Custom Implementation](custom.md) | _custom_ | | Extend the orchestrator abstraction and provide your own implementation |

If you would like to see the available flavors of orchestrators, you can use the command:
Expand Down
1 change: 1 addition & 0 deletions docs/mocked_libs.json
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@
"neptune",
"neuralprophet",
"openai",
"paramiko",
"polars",
"pyarrow",
"pyarrow.parquet",
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ types-certifi = { version = "^2021.10.8.0", optional = true }
types-croniter = { version = "^1.0.2", optional = true }
types-futures = { version = "^3.3.1", optional = true }
types-Markdown = { version = "^3.3.6", optional = true }
types-paramiko = { version = ">=3.4.0", optional = true }
types-Pillow = { version = "^9.2.1", optional = true }
types-protobuf = { version = "^3.18.0", optional = true }
types-PyMySQL = { version = "^1.0.4", optional = true }
Expand Down Expand Up @@ -232,6 +233,7 @@ dev = [
"types-croniter",
"types-futures",
"types-Markdown",
"types-paramiko",
"types-Pillow",
"types-protobuf",
"types-PyMySQL",
Expand Down
8 changes: 6 additions & 2 deletions src/zenml/cli/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -915,12 +915,14 @@ def prompt_configuration(
config_dict = {}
for attr_name, attr_schema in config_schema.get("properties", {}).items():
title = attr_schema.get("title", attr_name)
attr_type = attr_schema.get("type", "string")
attr_type_name = attr_type = attr_schema.get("type", "string")
if attr_type == "array":
attr_type_name = "list (CSV or JSON)"
title = f"[{attr_name}] {title}"
required = attr_name in config_schema.get("required", [])
hidden = attr_schema.get("format", "") == "password"
subtitles: List[str] = []
subtitles.append(attr_type)
subtitles.append(attr_type_name)
if hidden:
subtitles.append("secret")
if required:
Expand All @@ -938,6 +940,8 @@ def prompt_configuration(
if hidden and not show_secrets:
title += " is currently set to: [HIDDEN]"
else:
if attr_type == "array":
existing_value = json.dumps(existing_value)
title += f" is currently set to: '{existing_value}'"
else:
title += " is not currently set"
Expand Down
1 change: 1 addition & 0 deletions src/zenml/integrations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
GreatExpectationsIntegration,
)
from zenml.integrations.huggingface import HuggingfaceIntegration # noqa
from zenml.integrations.hyperai import HyperAIIntegration # noqa
from zenml.integrations.kaniko import KanikoIntegration # noqa
from zenml.integrations.kserve import KServeIntegration # noqa
from zenml.integrations.kubeflow import KubeflowIntegration # noqa
Expand Down
2 changes: 1 addition & 1 deletion src/zenml/integrations/azure/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class AzureIntegration(Integration):
"azure-keyvault-keys",
"azure-keyvault-secrets",
"azure-identity==1.10.0",
"azureml-core==1.48.0",
"azureml-core==1.54.0.post1",
"azure-mgmt-containerservice>=20.0.0",
"azure-storage-blob==12.17.0", # temporary fix for https://github.com/Azure/azure-sdk-for-python/issues/32056
"kubernetes",
Expand Down
1 change: 1 addition & 0 deletions src/zenml/integrations/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
GRAPHVIZ = "graphviz"
KSERVE = "kserve"
HUGGINGFACE = "huggingface"
HYPERAI = "hyperai"
GREAT_EXPECTATIONS = "great_expectations"
KANIKO = "kaniko"
KUBEFLOW = "kubeflow"
Expand Down
53 changes: 53 additions & 0 deletions src/zenml/integrations/hyperai/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Copyright (c) ZenML GmbH 2024. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
# or implied. See the License for the specific language governing
# permissions and limitations under the License.
"""Initialization of the HyperAI integration."""
from typing import List, Type

from zenml.integrations.constants import HYPERAI
from zenml.integrations.integration import Integration
from zenml.stack import Flavor

# Service connector constants
HYPERAI_CONNECTOR_TYPE = "hyperai"
HYPERAI_RESOURCE_TYPE = "hyperai-instance"


class HyperAIIntegration(Integration):
"""Definition of HyperAI integration for ZenML."""

NAME = HYPERAI
REQUIREMENTS = [
"paramiko>=3.4.0",
]

@classmethod
def activate(cls) -> None:
"""Activates the integration."""
from zenml.integrations.hyperai import service_connectors # noqa

@classmethod
def flavors(cls) -> List[Type[Flavor]]:
"""Declare the stack component flavors for the HyperAI integration.

Returns:
List of stack component flavors for this integration.
"""
from zenml.integrations.hyperai.flavors import (
HyperAIOrchestratorFlavor
)

return [HyperAIOrchestratorFlavor]


HyperAIIntegration.check_installation()
20 changes: 20 additions & 0 deletions src/zenml/integrations/hyperai/flavors/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright (c) ZenML GmbH 2024. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
# or implied. See the License for the specific language governing
# permissions and limitations under the License.
"""Airflow integration flavors."""

from zenml.integrations.hyperai.flavors.hyperai_orchestrator_flavor import (
HyperAIOrchestratorFlavor,
)

__all__ = ["HyperAIOrchestratorFlavor"]
Loading
Loading