chore: improve position map conversion and tolerate empty position yaml file (#6541)
This commit is contained in:
parent
c8da4a1b7e
commit
20268708cc
7 changed files with 44 additions and 32 deletions
|
|
@ -162,7 +162,7 @@ class AIModel(ABC):
|
|||
# traverse all model_schema_yaml_paths
|
||||
for model_schema_yaml_path in model_schema_yaml_paths:
|
||||
# read yaml data from yaml file
|
||||
yaml_data = load_yaml_file(model_schema_yaml_path, ignore_error=True)
|
||||
yaml_data = load_yaml_file(model_schema_yaml_path)
|
||||
|
||||
new_parameter_rules = []
|
||||
for parameter_rule in yaml_data.get('parameter_rules', []):
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ class ModelProvider(ABC):
|
|||
|
||||
# read provider schema from yaml file
|
||||
yaml_path = os.path.join(current_path, f'{provider_name}.yaml')
|
||||
yaml_data = load_yaml_file(yaml_path, ignore_error=True)
|
||||
yaml_data = load_yaml_file(yaml_path)
|
||||
|
||||
try:
|
||||
# yaml_data to entity
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue