Skip to content

Commit 01b7409

Browse files
committed
Fixed tests
1 parent 40660bf commit 01b7409

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

google/cloud/aiplatform/training_jobs.py

+2
Original file line numberDiff line numberDiff line change
@@ -2106,6 +2106,8 @@ def run(
21062106
test_filter_split=test_filter_split,
21072107
predefined_split_column_name=predefined_split_column_name,
21082108
timestamp_split_column_name=timestamp_split_column_name,
2109+
timeout=timeout,
2110+
restart_job_on_worker_restart=restart_job_on_worker_restart,
21092111
enable_web_access=enable_web_access,
21102112
tensorboard=tensorboard,
21112113
reduction_server_container_uri=reduction_server_container_uri

tests/unit/aiplatform/test_training_jobs.py

+3-6
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ def _get_custom_job_proto_with_enable_web_access(state=None, name=None, version=
205205
custom_job_proto.web_access_uris = _TEST_WEB_ACCESS_URIS
206206
return custom_job_proto
207207

208+
208209
def _get_custom_job_proto_with_scheduling(state=None, name=None, version="v1"):
209210
custom_job_proto = copy.deepcopy(_TEST_BASE_CUSTOM_JOB_PROTO)
210211
custom_job_proto.name = name
@@ -215,6 +216,7 @@ def _get_custom_job_proto_with_scheduling(state=None, name=None, version="v1"):
215216
custom_job_proto.web_access_uris = _TEST_WEB_ACCESS_URIS
216217
return custom_job_proto
217218

219+
218220
def local_copy_method(path):
219221
shutil.copy(path, ".")
220222
return pathlib.Path(path).name
@@ -600,6 +602,7 @@ def make_training_pipeline_with_scheduling(state):
600602
name=_TEST_PIPELINE_RESOURCE_NAME,
601603
state=state,
602604
training_task_inputs={
605+
# "enable_web_access": _TEST_ENABLE_WEB_ACCESS,
603606
"timeout": f"{_TEST_TIMEOUT}s",
604607
"restart_job_on_worker_restart": _TEST_RESTART_JOB_ON_WORKER_RESTART,
605608
},
@@ -1537,8 +1540,6 @@ def test_run_call_pipeline_service_create_with_scheduling(self, sync, caplog):
15371540
if not sync:
15381541
job.wait()
15391542

1540-
print(caplog.text)
1541-
assert "workerpool0-0" in caplog.text
15421543
assert job._gca_resource == make_training_pipeline_with_scheduling(
15431544
gca_pipeline_state.PipelineState.PIPELINE_STATE_SUCCEEDED
15441545
)
@@ -2985,8 +2986,6 @@ def test_run_call_pipeline_service_create_with_scheduling(self, sync, caplog):
29852986
if not sync:
29862987
job.wait()
29872988

2988-
print(caplog.text)
2989-
assert "workerpool0-0" in caplog.text
29902989
assert job._gca_resource == make_training_pipeline_with_enable_web_access(
29912990
gca_pipeline_state.PipelineState.PIPELINE_STATE_SUCCEEDED
29922991
)
@@ -4706,8 +4705,6 @@ def test_run_call_pipeline_service_create_with_scheduling(self, sync, caplog):
47064705
if not sync:
47074706
job.wait()
47084707

4709-
print(caplog.text)
4710-
assert "workerpool0-0" in caplog.text
47114708
assert job._gca_resource == make_training_pipeline_with_enable_web_access(
47124709
gca_pipeline_state.PipelineState.PIPELINE_STATE_SUCCEEDED
47134710
)

0 commit comments

Comments
 (0)