Skip to content

Commit 5b20089

Browse files
committed
Remove the use of exceptions module.
1 parent dced541 commit 5b20089

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

ads/jobs/templates/driver_pytorch.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import torch
2424

2525
from ads import set_auth
26-
from ads.aqua.training import exceptions
2726
from ads.jobs import DataScienceJob, DataScienceJobRun
2827
from ads.jobs.builders.infrastructure.dsc_job_runtime import (
2928
PythonRuntimeHandler,
@@ -285,7 +284,7 @@ def wait_for_log(self, job_run, log_prefix, timeout=15 * 60) -> str:
285284
if time.time() - second_started > timeout:
286285
logs = job_run.logs()
287286
last_log = logs[-1]["message"] if len(logs) > 0 else ""
288-
raise exceptions.LoggingError(
287+
raise Exception(
289288
f"Failed to obtain log with prefix {log_prefix} for {job_run.id} in {timeout} seconds.\n"
290289
f"Last log obtained: {last_log}"
291290
)
@@ -1025,10 +1024,7 @@ def main():
10251024
else:
10261025
runner_class = GenericRunner
10271026

1028-
try:
1029-
runner = runner_class()
1030-
except oci.exceptions.ServiceError as ex:
1031-
raise exceptions.ServiceErrorExit from ex
1027+
runner = runner_class()
10321028

10331029
runner: Runner
10341030
runner.fetch_code().set_working_dir().setup_python_path().install_dependencies()

0 commit comments

Comments
 (0)