From 7f64f94b670f75577723250e76909cd4c26c2db5 Mon Sep 17 00:00:00 2001 From: SoniaGrh Date: Wed, 11 Dec 2024 09:53:23 +0100 Subject: [PATCH] fix: add host to client --- .../create_datalake_autotagging_processing.py | 5 ++++- .../launch_datalake_autotagging_processing.py | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/pipelines/datalake_autotagging/create_datalake_autotagging_processing.py b/src/pipelines/datalake_autotagging/create_datalake_autotagging_processing.py index cc4c5975..03ac3cc6 100644 --- a/src/pipelines/datalake_autotagging/create_datalake_autotagging_processing.py +++ b/src/pipelines/datalake_autotagging/create_datalake_autotagging_processing.py @@ -37,6 +37,7 @@ def create_processing( parser = ArgumentParser("Create a processing") parser.add_argument("--api_token", type=str) parser.add_argument("--organization_id", type=str) + parser.add_argument("--host", type=str) parser.add_argument("--processing_name", type=str) parser.add_argument("--processing_type", type=str) parser.add_argument("--default_cpu", type=int) @@ -46,7 +47,9 @@ def create_processing( parser.add_argument("--docker_flags", nargs="+", type=str, default=None) args = parser.parse_args() - client = Client(api_token=args.api_token, organization_id=args.organization_id) + client = Client( + api_token=args.api_token, organization_id=args.organization_id, host=args.host + ) default_parameters = { "tags_list": ["is_woman", "is_man"], diff --git a/src/pipelines/datalake_autotagging/launch_datalake_autotagging_processing.py b/src/pipelines/datalake_autotagging/launch_datalake_autotagging_processing.py index 85ec7026..f55caad5 100644 --- a/src/pipelines/datalake_autotagging/launch_datalake_autotagging_processing.py +++ b/src/pipelines/datalake_autotagging/launch_datalake_autotagging_processing.py @@ -50,6 +50,7 @@ def launch_processing( parser = ArgumentParser("Launch a processing") parser.add_argument("--api_token", type=str) parser.add_argument("--organization_id", type=str) + parser.add_argument("--host", type=str) parser.add_argument("--processing_name", type=str) parser.add_argument("--datalake_id", type=str) parser.add_argument("--target_datalake_name", type=str, default=None) @@ -62,7 +63,9 @@ def launch_processing( parser.add_argument("--batch_size", type=int, default=8) args = parser.parse_args() - client = Client(api_token=args.api_token, organization_id=args.organization_id) + client = Client( + api_token=args.api_token, organization_id=args.organization_id, host=args.host + ) data_ids = [UUID(data_id) for data_id in args.data_ids]