Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions llm_studio/src/utils/config_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ def convert_nested_dictionary_to_cfg_base(
Inverse operation of convert_cfg_base_to_nested_dictionary
"""
problem_type = cfg_dict["problem_type"]
allowed_types = GENERATION_PROBLEM_TYPES + NON_GENERATION_PROBLEM_TYPES + ["text_sequence_to_sequence_modeling"]

if problem_type not in allowed_types:
raise NotImplementedError(f"Problem Type {problem_type} not implemented or allowed")

module_name = f"llm_studio.python_configs.{problem_type}_config"
try:
module = importlib.import_module(module_name)
Expand Down