CodeBundle
A class representing a code bundle for a task. This is used to package the code and the inflation path. The code bundle computes the version of the code using the hash of the code.
Attributes
| Attribute | Type | Description |
|---|---|---|
| computed_version | str | The version of the code bundle, representing the hash of the code. |
| destination | str = . | The destination path for the code bundle to be inflated to. |
| tgz | `str | None` |
| pkl | `str | None` |
| downloaded_path | `pathlib.Path | None` |
| files | `List[str] | None` |
Constructor
Signature
def CodeBundle(
computed_version: str,
destination: str = ".",
tgz: str | None = null,
pkl: str | None = null,
downloaded_path: pathlib.Path | None = null,
files: List[str]| None = null
) -> null
Parameters
| Name | Type | Description |
|---|---|---|
| computed_version | str | The version of the code bundle, derived from the hash of the code. |
| destination | str = "." | The destination path where the code bundle will be inflated. |
| tgz | `str | None` = null |
| pkl | `str | None` = null |
| downloaded_path | `pathlib.Path | None` = null |
| files | `List[str] | None` = null |
Methods
with_downloaded_path()
def with_downloaded_path(self, path: pathlib.Path) -> CodeBundle: ...
Create a new CodeBundle with the given downloaded path.
Parameters
| Name | Type | Description |
|---|---|---|
| path | pathlib.Path | The filesystem path where the code bundle has been downloaded and inflated during runtime. |
Returns
| Type | Description |
|---|---|
[CodeBundle](codebundle.md?sid=flyte_models_codebundle) | A new instance of CodeBundle with the updated downloaded_path field, preserving all other existing attributes. |