Skip to content

Commit 36691f6

Browse files
committed
Update driver_utils.py
1 parent 5dd2d9f commit 36691f6

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

ads/jobs/templates/driver_utils.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -424,17 +424,19 @@ def conda_unpack(self):
424424
logger.info("conda-unpack exits with non-zero return code.")
425425
return self
426426

427-
def install_pip_requirements(
428-
self, req_path: str = os.environ.get(CONST_ENV_PIP_REQ)
429-
):
427+
def install_pip_requirements(self, req_path: str = None):
428+
if not req_path:
429+
req_path = os.environ.get(CONST_ENV_PIP_REQ)
430430
if not req_path:
431431
return self
432432
self.run_command(
433433
f"pip install -r {req_path}", conda_prefix=self.conda_prefix, check=True
434434
)
435435
return self
436436

437-
def install_pip_packages(self, packages: str = os.environ.get(CONST_ENV_PIP_PKG)):
437+
def install_pip_packages(self, packages: str = None):
438+
if not packages:
439+
packages = os.environ.get(CONST_ENV_PIP_PKG)
438440
if not packages:
439441
return self
440442
self.run_command(

0 commit comments

Comments
 (0)