Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
johnml1135 committed Feb 3, 2024
1 parent 850bca4 commit fd774d6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion machine/jobs/huggingface/hugging_face_nmt_model_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def create_engine(self) -> TranslationEngine:
)

def save_model(self) -> None:
if self._config.save_model is None:
if "save_model" not in self._config:
return

tar_file_path = Path(self._config.data_dir, "builds", self._config.build_id, "model.tar.gz")
Expand Down
2 changes: 1 addition & 1 deletion machine/jobs/nmt_engine_build_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def run(
current_inference_step += len(pi_batch)
phase_progress(ProgressStatus.from_step(current_inference_step, inference_step_count))

if self._config.save_model is not None:
if "save_model" in self._config and self._config.save_model is not None:
logger.info("Saving model")
self._nmt_model_factory.save_model()

Expand Down

0 comments on commit fd774d6

Please sign in to comment.