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
-
computed_version: string
- The version of the code bundle. This is the hash of the code.
-
destination: string = "."
- The destination path for the code bundle to be inflated to.
-
tgz: string | None = None
- Optional path to the tgz file.
-
pkl: string | None = None
- Optional path to the pkl file.
-
downloaded_path: pathlib.Path | None = None
- The path to the downloaded code bundle. This is only available during runtime, when the code bundle has been downloaded and inflated.
Constructors
- Initializes a new instance of the CodeBundle class.
Args: computed_version: The version of the code bundle, which is the hash of the code. destination: The destination path for the code bundle to be inflated to. Defaults to ".". tgz: Optional path to the tgz file. pkl: Optional path to the pkl file.
-
Parameters
- computed_version: str
- The version of the code bundle. This is the hash of the code.
- destination: str
- The destination path for the code bundle to be inflated to.
- tgz: str | None
- Optional path to the tgz file.
- pkl: str | None
- Optional path to the pkl file.
- computed_version: str
Methods
def with_downloaded_path(path: pathlib.Path) - > [CodeBundle](src_flyte_models_codebundle)
-
Create a new CodeBundle with the given downloaded path.
-
Parameters
- path: pathlib.Path
- The path to the downloaded code bundle.
- path: pathlib.Path
-
Return Value: CodeBundle
- A new CodeBundle instance with the updated downloaded_path.