Skip to content

Commit

Permalink
fix: get_model in ray executor
Browse files Browse the repository at this point in the history
  • Loading branch information
zhijianma committed Dec 4, 2023
1 parent d0f564f commit ef34418
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions data_juicer/utils/model_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,4 +285,8 @@ def get_model(model_key, lang='en', model_type='sentencepiece'):
:param model_key: name of the model or tokenzier
"""
if model_key is None:
return None
if model_key not in MODEL_ZOO:
prepare_model(lang=lang, model_type=model_type, model_key=model_key)
return MODEL_ZOO.get(model_key, None)

0 comments on commit ef34418

Please sign in to comment.