Manifest
geneva.manifest.mgr.GenevaManifest
A Geneva Manifest represents the files and dependencies used in the execution environment.
created_at
created_at: datetime = field(
factory=lambda: now(utc),
metadata={"pa_type": timestamp("us", tz="UTC")},
)
compute_checksum
Generate a stable checksum of the manifest, ignoring the checksum field. The zip file names include the checksum of the contents so this hash is comprehensive.
geneva.manifest.builder.GenevaManifestBuilder
Fluent builder for GenevaManifest. name is required, all optional
fields will use defaults. Manifests can be saved using db.define_manifest() and
loaded using db.context()
Example usage:
import geneva
m = GenevaManifestBuilder
.create("my-manifest")
.pip(["numpy", "pandas"])
.py_modules(["mymodule"])
.head_image("my-custom-image:latest")
.skip_site_packages(True)
.build()
conn = geneva.connect("s3://my-bucket/my-db")
conn.define_manifest("my-manifest", m)
with conn.context(cluster="my-cluster", manifest="my-manifest"):
conn.open_table("my-table").backfill("my-column")
pip
pip(packages: list[str]) -> GenevaManifestBuilder
Set the runtime pip packages list. See Ray's RuntimeEnv doc for more details.
add_pip
add_pip(package: str) -> GenevaManifestBuilder
Add a single pip package to the runtime environment. See Ray's RuntimeEnv doc for more details.
py_modules
py_modules(modules: list[str]) -> GenevaManifestBuilder
Set the Python modules for the runtime environment. See Ray's RuntimeEnv doc for more details.
add_py_module
add_py_module(module: str) -> GenevaManifestBuilder
Add a single Python module to the runtime environment. See Ray's RuntimeEnv doc for more details.
head_image
head_image(head_image: str) -> GenevaManifestBuilder
Set the container image for Ray head. If set, this will take priority over the head image specified in the cluster definition.
worker_image
worker_image(worker_image: str) -> GenevaManifestBuilder
Set the container image for Ray workers. If set, this will take priority over the worker image specified in the cluster definition.
default_head_image
default_head_image() -> GenevaManifestBuilder
Set the container image for Ray head to the default for the current platform
default_worker_image
default_worker_image() -> GenevaManifestBuilder
Set the container image for Ray workers to the default for the current platform.
skip_site_packages
skip_site_packages(
skip: bool = True,
) -> GenevaManifestBuilder
Set whether to skip site packages during packaging.
delete_local_zips
delete_local_zips(
delete: bool = True,
) -> GenevaManifestBuilder
Set whether to delete local zip files after upload.
local_zip_output_dir
local_zip_output_dir(
output_dir: str,
) -> GenevaManifestBuilder
Set the local directory for zip file output.
create
create(name: str) -> GenevaManifestBuilder
Create a new builder with the given manifest name.