with_runcontext
Launch a new run with the given parameters as the context.
def with_runcontext(
mode: Mode | None = None,
name: Optional[str] = None,
service_account: Optional[str] = None,
version: Optional[str] = None,
copy_style: CopyFiles = "loaded_modules",
dry_run: bool = False,
copy_bundle_to: pathlib.Path | None = None,
interactive_mode: bool | None = None,
raw_data_path: str | None = None,
run_base_dir: str | None = None,
overwrite_cache: bool = False,
project: str | None = None,
domain: str | None = None,
env_vars: Dict[str, str] | None = None,
labels: Dict[str, str] | None = None,
annotations: Dict[str, str] | None = None,
interruptible: bool | None = None,
log_level: int | None = None,
log_format: LogFormat = "console",
reset_root_logger: bool = False,
disable_run_cache: bool = False,
queue: Optional[str] = None,
notifications: Notification | Tuple[Notification, ...] | None = None,
custom_context: Dict[str, str] | None = None,
cache_lookup_scope: CacheLookupScope = "global",
preserve_original_types: bool = False,
debug: bool = False,
_tracker: Any = None
) - > _Runner
Launch a new run with the given parameters as the context.
Parameters
| Name | Type | Description |
|---|---|---|
| mode | `Mode | None` = None |
| name | Optional[str] = None | The name to use for the run |
| service_account | Optional[str] = None | The service account to use for the run context |
| version | Optional[str] = None | The version to use for the run, if not provided, it will be computed from the code bundle |
| copy_style | CopyFiles = "loaded_modules" | The copy style to use for the run context |
| dry_run | bool = False | If true, the run will not be executed, but the bundle will be created |
| copy_bundle_to | `pathlib.Path | None` = None |
| interactive_mode | `bool | None` = None |
| raw_data_path | `str | None` = None |
| run_base_dir | `str | None` = None |
| overwrite_cache | bool = False | If true, the cache will be overwritten for the run |
| project | `str | None` = None |
| domain | `str | None` = None |
| env_vars | `Dict[str, str] | None` = None |
| labels | `Dict[str, str] | None` = None |
| annotations | `Dict[str, str] | None` = None |
| interruptible | `bool | None` = None |
| log_level | `int | None` = None |
| log_format | LogFormat = "console" | Log format to set for the run. If not provided, it will be set to the default log format |
| reset_root_logger | bool = False | If true, the root logger will be preserved and not modified by Flyte. |
| disable_run_cache | bool = False | If true, the run cache will be disabled. This is useful for testing purposes. |
| queue | Optional[str] = None | The queue to use for the run. This is used to specify the cluster to use for the run. |
| notifications | `Notification | Tuple[Notification, ...] |
| custom_context | `Dict[str, str] | None` = None |
| cache_lookup_scope | CacheLookupScope = "global" | Scope to use for the run. This is used to specify the scope to use for cache lookups. If not specified, it will be set to the default scope (global unless overridden at the system level). |
| preserve_original_types | bool = False | If true, the type engine will preserve original types (e.g., pd.DataFrame) when guessing python types from literal types. If false (default), it will return the generic flyte.io.DataFrame. This option is automatically set to True if interactive_mode is True unless overridden explicitly by this parameter. |
| debug | bool = False | If true, the task will be run as a VSCode debug task, starting a code-server in the container so users can connect via the UI to interactively debug/run the task. |
| _tracker | Any = None | This is an internal only parameter used by the CLI to render the TUI. |
Returns
| Type | Description |
|---|---|
_Runner | runner |