Skip to content

Commit cdb4327

Browse files
committed
Bug fixes in ads opctl command: container entrypoint and distributed training
1 parent c937a9b commit cdb4327

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

ads/opctl/cmds.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def _save_yaml(yaml_content, **kwargs):
141141
yaml_content : str
142142
YAML content as string.
143143
"""
144-
if kwargs["job_info"]:
144+
if kwargs.get("job_info"):
145145
yaml_path = os.path.abspath(os.path.expanduser(kwargs["job_info"]))
146146
if os.path.isfile(yaml_path):
147147
overwrite = input(
@@ -210,7 +210,7 @@ def run(config: Dict, **kwargs) -> Dict:
210210
"backend operator for distributed training can either be local or job"
211211
)
212212
else:
213-
if not kwargs["dry_run"]:
213+
if not kwargs["dry_run"] and not kwargs["nobuild"]:
214214
verify_and_publish_image(kwargs["nopush"], config)
215215
print("running image: " + config["spec"]["cluster"]["spec"]["image"])
216216
cluster_def = YamlSpecParser.parse_content(config)

ads/opctl/config/resolver.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,11 @@ def _resolve_source_folder_path(self) -> None:
155155
def _resolve_entry_script(self) -> None:
156156
# this should be run after _resolve_source_folder_path
157157
if not self._is_ads_operator():
158-
if os.path.splitext(self.config["execution"]["entrypoint"])[1] == ".ipynb":
158+
if (
159+
self.config["execution"].get("entrypoint")
160+
and os.path.splitext(self.config["execution"]["entrypoint"])[1]
161+
== ".ipynb"
162+
):
159163
input_path = os.path.join(
160164
self.config["execution"]["source_folder"],
161165
self.config["execution"]["entrypoint"],

0 commit comments

Comments
 (0)