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` = null |
| pkl | `str | None` = null |
| downloaded_path | `pathlib.Path | None` = null |
| files | `List[str] | None` = null |
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, typically a hash of the code. |
| destination | str = "." | The destination path for the code bundle to be inflated to. |
| tgz | `str | None` = null |
| pkl | `str | None` = null |
| downloaded_path | `pathlib.Path | None` = null |
| files | `List[str] | None` = null |
Methods
with_downloaded_path()
@classmethod
def with_downloaded_path(
path: pathlib.Path
) - > [CodeBundle](codebundle.md?sid=flyte_models_codebundle)
Create a new CodeBundle with the given downloaded path.
Parameters
| Name | Type | Description |
|---|---|---|
| path | pathlib.Path | The local 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 downloaded_path field updated to the specified filesystem path. |