diff --git a/src/fondant/cli.py b/src/fondant/cli.py index 066e32cfe..49ffa4a2b 100644 --- a/src/fondant/cli.py +++ b/src/fondant/cli.py @@ -378,8 +378,8 @@ def register_run(parent_parser): help="""The project id of the GCP project used to submit the pipeline""", ) vertex_parser.add_argument( - "--project-region", - help="The project region of the GCP project used to submit the pipeline ", + "--region", + help="The region where to run the pipeline", ) vertex_parser.add_argument( @@ -454,7 +454,7 @@ def run_vertex(args): finally: runner = VertexRunner( project_id=args.project_id, - project_region=args.project_region, + region=args.region, service_account=args.service_account, ) runner.run(input_spec=spec_ref) diff --git a/src/fondant/runner.py b/src/fondant/runner.py index df898c97d..a30df5762 100644 --- a/src/fondant/runner.py +++ b/src/fondant/runner.py @@ -97,14 +97,14 @@ def __resolve_imports(self): def __init__( self, project_id: str, - project_region: str, + region: str, service_account: t.Optional[str] = None, ): self.__resolve_imports() self.aip.init( project=project_id, - location=project_region, + location=region, ) self.service_account = service_account diff --git a/tests/test_cli.py b/tests/test_cli.py index 89f0d46c5..64fb2b0e4 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -276,7 +276,7 @@ def test_vertex_run(tmp_path_factory): local=False, vertex=True, output_path=None, - project_region="europe-west-1", + region="europe-west-1", project_id="project-123", service_account=None, ref="some/path", @@ -284,7 +284,7 @@ def test_vertex_run(tmp_path_factory): run_vertex(args) mock_runner.assert_called_once_with( project_id="project-123", - project_region="europe-west-1", + region="europe-west-1", service_account=None, ) @@ -300,13 +300,13 @@ def test_vertex_run(tmp_path_factory): host="localhost2", output_path=str(fn / "kubeflow_pipelines.yml"), ref=__name__, - project_region="europe-west-1", + region="europe-west-1", project_id="project-123", service_account=None, ) run_vertex(args) mock_runner.assert_called_once_with( project_id="project-123", - project_region="europe-west-1", + region="europe-west-1", service_account=None, )