Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the start command to use validate_schema #82

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
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
3 changes: 2 additions & 1 deletion src/aiq/cli/commands/start.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
from aiq.cli.type_registry import GlobalTypeRegistry
from aiq.cli.type_registry import RegisteredFrontEndInfo
from aiq.data_models.config import AIQConfig
from aiq.utils.data_models.schema_validator import validate_schema
from aiq.utils.type_utils import DecomposedType

logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -184,7 +185,7 @@ def invoke_subcommand(self,
# Get the front end for the command
front_end: RegisteredFrontEndInfo = self._registered_front_ends[cmd_name]

config = AIQConfig.model_validate(config_dict)
config = validate_schema(config_dict, AIQConfig)

# Check that we have the right kind of front end
if (not isinstance(config.general.front_end, front_end.config_type)):
Expand Down