Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
@@ -1,11 +1,7 @@
# {% include 'template/license_header' %}

from typing import Optional, List

import os
import re
import sky
from huggingface_hub import create_branch, login, HfApi

from zenml import step
from zenml.client import Client
Expand All @@ -16,14 +12,15 @@ logger = get_logger(__name__)


@step()
def deploy_to_skypilot(
):
def deploy_to_skypilot():
"""
This step deploy the model to a VM using SkyPilot.

This step requires `skypilot` to be installed.
aswell as a configured cloud account locally (e.g. AWS, GCP, Azure).
as well as a configured cloud account locally (e.g. AWS, GCP, Azure).
"""
import sky

### ADD YOUR OWN CODE HERE - THIS IS JUST AN EXAMPLE ###
zenml_repo_root = Client().root
if not zenml_repo_root:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ model_registry = Client().active_stack.model_registry

@step
def promote_metric_compare_promoter(
latest_metrics: Dict[str, str],
current_metrics: Dict[str, str],
latest_metrics: Dict[str, Any],
current_metrics: Dict[str, Any],
metric_to_compare: str = "accuracy",
):
"""Try to promote trained model.
Expand Down