Skip to main content

init_from_config

Initialize the Flyte system using a configuration file or Config object. This method should be called before any other Flyte remote API methods are called. Thread-safe implementation.

def init_from_config(
path_or_config: str | Path | Config | None = None,
root_dir: Path | None = None,
log_level: int | None = None,
log_format: LogFormat = "console",
project: str | None = None,
domain: str | None = None,
storage: Storage | None = None,
batch_size: int = 1000,
image_builder: ImageBuildEngine.ImageBuilderType | None = None,
images: tuple[str, ...] | None = None,
sync_local_sys_paths: bool = True
) - > None

Initialize the Flyte system using a configuration file or Config object. This method should be called before any other Flyte remote API methods are called. Thread-safe implementation.

Parameters

NameTypeDescription
path_or_config`strPath
root_dir`PathNone` = None
log_level`intNone` = None
log_formatLogFormat = "console"Optional logging format for the logger, default is "console"
project`strNone` = None
domain`strNone` = None
storage`StorageNone` = None
batch_sizeint = 1000Optional batch size for operations that use listings, defaults to 1000
image_builder`ImageBuildEngine.ImageBuilderTypeNone` = None
images`tuple[str, ...]None` = None
sync_local_sys_pathsbool = TrueWhether to include and synchronize local sys.path entries under the root directory into the remote container (default: True).

Returns

TypeDescription
None