From 9542ed8bb433bce7baae6e482230a61a7c5cee42 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Thu, 9 Jan 2025 14:52:15 +0000 Subject: [PATCH] Auto-update of NLP template --- .../e2e_nlp/steps/deploying/huggingface_deployment.py | 4 +++- .../e2e_nlp/steps/promotion/promote_get_metrics.py | 10 ++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/e2e_nlp/steps/deploying/huggingface_deployment.py b/examples/e2e_nlp/steps/deploying/huggingface_deployment.py index 222e813a3a..7c743ce732 100644 --- a/examples/e2e_nlp/steps/deploying/huggingface_deployment.py +++ b/examples/e2e_nlp/steps/deploying/huggingface_deployment.py @@ -39,7 +39,9 @@ def deploy_to_huggingface( """ ### ADD YOUR OWN CODE HERE - THIS IS JUST AN EXAMPLE ### secret = Client().get_secret("huggingface_creds") - assert secret, "No secret found with name 'huggingface_creds'. Please create one that includes your `username` and `token`." + assert secret, ( + "No secret found with name 'huggingface_creds'. Please create one that includes your `username` and `token`." + ) token = secret.secret_values["token"] api = HfApi(token=token) hf_repo = api.create_repo( diff --git a/examples/e2e_nlp/steps/promotion/promote_get_metrics.py b/examples/e2e_nlp/steps/promotion/promote_get_metrics.py index 8c8220bc71..eec6eb526f 100644 --- a/examples/e2e_nlp/steps/promotion/promote_get_metrics.py +++ b/examples/e2e_nlp/steps/promotion/promote_get_metrics.py @@ -30,12 +30,10 @@ @step -def promote_get_metrics() -> ( - Tuple[ - Annotated[Dict[str, Any], "latest_metrics"], - Annotated[Dict[str, Any], "current_metrics`"], - ] -): +def promote_get_metrics() -> Tuple[ + Annotated[Dict[str, Any], "latest_metrics"], + Annotated[Dict[str, Any], "current_metrics`"], +]: """Get metrics for comparison for promoting a model. This is an example of a metric retrieval step. It is used to retrieve