You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Kedro Boot Apps are currently setted through CLI. Here is an example of setting an App using Kedro Boot CLI command kedro boot --app path.to.app_class <kedro_params>. Even if this works for regular use cases, it can be limited when we need to set the APP Class globally (at source level) and when we need to have a dedicated CLI command for a Kedro Boot App.
Settings Kedro boot Apps globally through Kedro project settings
Settings the App class through CLI can be repetitive in some cases (similar issue with kedro runner). Moreover A CLI args are a runtime/environment settings, sometimes we need to set the App class globally (at source level). We propose to use the Kedro settings.py as an additional channel to set the App Class and it's Init Args.
The APP_ARGS are used to init the Kedro Boot App Class, they are not runtime args. Runtime/env args are setted through a config file (application.yml by default). Users could explicitely add a config file for his app by adding the associated config pattern in the CONFIG_LOADER_ARGS. Since the App object have access to the config loader through the Kedro Boot Session, it can load the appropriate configs, using the same kedro configs mechanisms.
Note that the App Class given by CLI command take precedence over App Class given by the project settings.
Extend Kedro Boot commands with Apps commands
A Kedro Boot App could have a CLI command. We need to provide a mechanism to extend the Kedro Boot CLI commands with the App Command. Here is a proposed solution path :
Add a subcommand level in Kedro Boot CLI commands : kedro boot <app_command_name> <app_command_params> <kedro_params>
Include run and dryrun as project specific commands from Kedro Boot. kedro boot --app path.to.app_class <kedro_params> would become kedro boot run --app path.to.app_class <kedro_params>
Create the App command through Kedro Boot Command Factory, in order to keep the CLI booting logic and kedro CLI params (pipeline, extra params, tags, ....). Here is an example of using the Kedro Boot Command Factory:
Kedro Boot Apps are currently setted through CLI. Here is an example of setting an App using Kedro Boot CLI command
kedro boot --app path.to.app_class <kedro_params>
. Even if this works for regular use cases, it can be limited when we need to set the APP Class globally (at source level) and when we need to have a dedicated CLI command for a Kedro Boot App.Settings Kedro boot Apps globally through Kedro project settings
Settings the App class through CLI can be repetitive in some cases (similar issue with kedro runner). Moreover A CLI args are a runtime/environment settings, sometimes we need to set the App class globally (at source level). We propose to use the Kedro
settings.py
as an additional channel to set the App Class and it's Init Args.The
APP_ARGS
are used to init the Kedro Boot App Class, they are not runtime args. Runtime/env args are setted through a config file (application.yml by default). Users could explicitely add a config file for his app by adding the associated config pattern in theCONFIG_LOADER_ARGS
. Since the App object have access to the config loader through the Kedro Boot Session, it can load the appropriate configs, using the same kedro configs mechanisms.Note that the App Class given by CLI command take precedence over App Class given by the project settings.
Extend Kedro Boot commands with Apps commands
A Kedro Boot App could have a CLI command. We need to provide a mechanism to extend the Kedro Boot CLI commands with the App Command. Here is a proposed solution path :
kedro boot <app_command_name> <app_command_params> <kedro_params>
run
anddryrun
as project specific commands from Kedro Boot.kedro boot --app path.to.app_class <kedro_params>
would becomekedro boot run --app path.to.app_class <kedro_params>
The App command could then be used as follow:
kedro boot fastapi --host 127.0.0.1 --port 8000 <kedro_params>
The text was updated successfully, but these errors were encountered: