This commit is contained in:
Sunny Liu
2025-04-08 16:06:35 -04:00
committed by Sung Ching Liu
parent fefcbc300d
commit 8154d26614
2 changed files with 10 additions and 2 deletions

View File

@@ -130,7 +130,7 @@ def load_preference_datasets(
if cli_args.debug or cfg.debug:
if cfg.rl == "grpo":
LOG.info("skip check_dataset_labels during debug for grpo")
pass
else:
LOG.info("check_dataset_labels...")

View File

@@ -9,7 +9,15 @@ import sys
LOG = logging.getLogger("axolotl")
def import_from_path(module_name, file_path):
def import_from_path(module_name: str, file_path: str):
"""
Import a module from a file path.
Args:
module_name (str): Name of the module.
file_path (str): Path to the file.
Feturns:
module: The imported module.
"""
spec = importlib.util.spec_from_file_location(module_name, file_path)
if spec is None:
raise ImportError(f"Could not create module spec for: {file_path}")