Skip to content

Manifest

Pin your dependencies

Manifest dependencies are installed by Ray on the workers; they are not copied from your local environment. A ranged or unversioned specifier (numpy, torch>=2.1) therefore resolves to whatever version is newest when the workers install it, which drifts away from the versions you tested against locally and surfaces later as serialization errors, missing attributes, or wrong results.

Pin every dependency to an exact version:

manifest = (
    GenevaManifest.create_pip("my-manifest")
    .pip(["numpy==2.1.3", "torch==2.10.0", "geneva==0.15.0"])
    .build()
)

Building a manifest with unpinned dependencies logs a warning listing the specifiers to pin. If a range is intentional, call .allow_unpinned() on the builder to silence it.

A fully pinned requirements.txt (from pip freeze or uv pip compile) passed via .requirements_path() works equally well. The advisory covers pip dependencies only; conda manifests are built without it.

geneva.manifest.mgr.GenevaManifest

A Geneva Manifest represents the files and dependencies used in the execution environment.

name

name: str = field()

version

version: Optional[str] = field(default=None)

pip

pip: list[str] = field(default=[])

py_modules

py_modules: list[str] = field(default=[])

head_image

head_image: Optional[str] = field(default=None)

worker_image

worker_image: Optional[str] = field(default=None)

skip_site_packages

skip_site_packages: bool = field(default=True)

delete_local_zips

delete_local_zips: bool = field(default=False)

local_zip_output_dir

local_zip_output_dir: Optional[str] = field(default=None)

zips

zips: list[list[str]] = field(default=[[]])

checksum

checksum: Optional[str] = field(default=None)

created_at

created_at: datetime = field(
    factory=lambda: now(utc),
    metadata={"pa_type": timestamp("us", tz="UTC")},
)

created_by

created_by: str = field(factory=current_user)

requirements_path

requirements_path: Optional[str] = field(default=None)

conda

conda: dict[str, Any] = field(
    factory=dict, metadata={"pa_type": string()}
)

conda_environment_path

conda_environment_path: Optional[str] = field(default=None)

env_vars

env_vars: dict[str, str] = field(
    factory=dict, metadata={"pa_type": string()}
)

pip_extra_index_urls

pip_extra_index_urls: list[str] = field(factory=list)

compute_checksum

compute_checksum() -> str

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.

create_pip

create_pip(name: str) -> PipManifestBuilder

Create a pip-based manifest builder.

Pin dependencies to exact versions: they are installed on the Ray workers, so ranged specifiers can resolve to versions that differ from the local environment.

Examples:

manifest = (
    GenevaManifest.create_pip("my-manifest")
    .pip(["numpy==2.1.3"])
    .build()
)

create_conda

create_conda(name: str) -> CondaManifestBuilder

Create a conda-based manifest builder.

Pin dependencies to exact versions: they are installed on the Ray workers, so ranged specifiers can resolve to versions that differ from the local environment.

Examples:

manifest = GenevaManifest.create_conda("my-manifest").conda({...}).build()

create_site

create_site(name: str) -> SiteManifestBuilder

Create a site-packages manifest builder.

Uploads local site-packages without external dependencies. upload_site_packages defaults to True.

Examples:

manifest = GenevaManifest.create_site("my-manifest").build()

as_dict

as_dict() -> dict

to_json

to_json() -> str

Canonical JSON serialization of this manifest for column metadata storage. Excludes transient/runtime fields.

from_json

from_json(payload: str) -> GenevaManifest

Reconstruct a GenevaManifest from a string produced by to_json. Missing transient fields fall back to defaults.

geneva.manifest.builder.PipManifestBuilder

Bases: _ManifestBuilderBase

Type-safe builder for pip-based manifests.

This builder does NOT have conda methods - use CondaManifestBuilder for conda.

Pin every dependency to an exact version. Ranged specifiers (numpy>=2) are resolved when Ray installs them on the workers, so they can pick up a different version than the local environment and cause failures that are hard to trace back to the manifest.

Examples:

manifest = (
    PipManifestBuilder.create("my-manifest")
    .pip(["numpy==2.1.3", "pandas==2.2.3"])
    .build()
)

pip

pip(packages: list[str]) -> PipManifestBuilder

Set the runtime pip packages list.

Pin exact versions ("numpy==2.1.3") rather than ranges so workers install the same versions as the local environment.

Cannot be used with .requirements_path().

add_pip

add_pip(package: str) -> PipManifestBuilder

Add a single pip package, ideally pinned ("numpy==2.1.3").

requirements_path

requirements_path(path: str) -> PipManifestBuilder

Set the path to a requirements.txt file.

Prefer a fully pinned file, such as one produced by pip freeze or uv pip compile.

Cannot be used with .pip().

add_extra_index_url

add_extra_index_url(url: str) -> PipManifestBuilder

Add an extra pip index URL for Ray workers.

These URLs are merged with Geneva's default indexes (fury.io) and set in PIP_EXTRA_INDEX_URL for worker processes.

build

build() -> GenevaManifest

Build the GenevaManifest with pip configuration.

Logs a recommendation when any dependency is not pinned to an exact version; call .allow_unpinned() to silence it.

create

create(name: str) -> PipManifestBuilder

Create a new pip manifest builder with the given name.

name

name(name: str) -> Self

Set the manifest name.

version

version(version: str) -> Self

Set the manifest version.

py_modules

py_modules(modules: list[str]) -> Self

Set the Python modules for the runtime environment.

add_py_module

add_py_module(module: str) -> Self

Add a single Python module to the runtime environment.

head_image

head_image(head_image: str) -> Self

Set the container image for Ray head.

worker_image

worker_image(worker_image: str) -> Self

Set the container image for Ray workers.

default_head_image

default_head_image() -> Self

Set the container image for Ray head to the platform default.

default_worker_image

default_worker_image() -> Self

Set the container image for Ray workers to the platform default.

upload_site_packages

upload_site_packages(upload: bool = True) -> Self

Set whether to upload site packages during packaging.

delete_local_zips

delete_local_zips(delete: bool = True) -> Self

Set whether to delete local zip files after upload.

local_zip_output_dir

local_zip_output_dir(output_dir: str) -> Self

Set the local directory for zip file output.

env_vars

env_vars(env_vars: dict[str, str]) -> Self

Set environment variables for Ray workers via runtime_env.

These override cluster-level env vars for Ray worker processes.

add_env_var

add_env_var(key: str, value: str) -> Self

Add a single environment variable for Ray workers.

allow_unpinned

allow_unpinned(allow: bool = True) -> Self

Silence the recommendation to pin exact dependency versions.

Dependencies are installed on the Ray workers at run time, so ranged or unversioned specifiers may resolve to versions that differ from the local environment. Use this only when that drift is intended.

geneva.manifest.builder.CondaManifestBuilder

Bases: _ManifestBuilderBase

Type-safe builder for conda-based manifests.

This builder does NOT have pip methods - use PipManifestBuilder for pip.

Pin every dependency to an exact version. Ranged specifiers (numpy>=2) are resolved when Ray creates the environment on the workers, so they can pick up a different version than the local environment and cause failures that are hard to trace back to the manifest.

Examples:

manifest = (
    CondaManifestBuilder.create("my-manifest")
    .conda({"dependencies": ["python=3.10.14", "numpy=2.1.3"]})
    .build()
)

conda

conda(dependencies: dict[str, Any]) -> CondaManifestBuilder

Set the conda dependencies for the runtime environment.

Pin exact versions ("numpy=2.1.3") rather than ranges so workers install the same versions as the local environment.

Cannot be used with .conda_environment_path().

conda_environment_path

conda_environment_path(path: str) -> CondaManifestBuilder

Set the path to a conda environment.yml file.

Prefer a fully pinned file, such as one produced by conda env export.

Cannot be used with .conda().

build

build() -> GenevaManifest

Build the GenevaManifest with conda configuration.

Logs a recommendation when any dependency is not pinned to an exact version; call .allow_unpinned() to silence it.

create

create(name: str) -> CondaManifestBuilder

Create a new conda manifest builder with the given name.

name

name(name: str) -> Self

Set the manifest name.

version

version(version: str) -> Self

Set the manifest version.

py_modules

py_modules(modules: list[str]) -> Self

Set the Python modules for the runtime environment.

add_py_module

add_py_module(module: str) -> Self

Add a single Python module to the runtime environment.

head_image

head_image(head_image: str) -> Self

Set the container image for Ray head.

worker_image

worker_image(worker_image: str) -> Self

Set the container image for Ray workers.

default_head_image

default_head_image() -> Self

Set the container image for Ray head to the platform default.

default_worker_image

default_worker_image() -> Self

Set the container image for Ray workers to the platform default.

upload_site_packages

upload_site_packages(upload: bool = True) -> Self

Set whether to upload site packages during packaging.

delete_local_zips

delete_local_zips(delete: bool = True) -> Self

Set whether to delete local zip files after upload.

local_zip_output_dir

local_zip_output_dir(output_dir: str) -> Self

Set the local directory for zip file output.

env_vars

env_vars(env_vars: dict[str, str]) -> Self

Set environment variables for Ray workers via runtime_env.

These override cluster-level env vars for Ray worker processes.

add_env_var

add_env_var(key: str, value: str) -> Self

Add a single environment variable for Ray workers.

allow_unpinned

allow_unpinned(allow: bool = True) -> Self

Silence the recommendation to pin exact dependency versions.

Dependencies are installed on the Ray workers at run time, so ranged or unversioned specifiers may resolve to versions that differ from the local environment. Use this only when that drift is intended.

geneva.manifest.builder.SiteManifestBuilder

Bases: _ManifestBuilderBase

Type-safe builder for site-packages manifests.

This builder uploads local site-packages without external dependencies. It does NOT have pip or conda methods.

upload_site_packages defaults to True for this builder.

Examples:

manifest = SiteManifestBuilder.create("my-manifest").build()

build

build() -> GenevaManifest

Build the GenevaManifest with site-packages configuration.

create

create(name: str) -> SiteManifestBuilder

Create a new site manifest builder with the given name.

name

name(name: str) -> Self

Set the manifest name.

version

version(version: str) -> Self

Set the manifest version.

py_modules

py_modules(modules: list[str]) -> Self

Set the Python modules for the runtime environment.

add_py_module

add_py_module(module: str) -> Self

Add a single Python module to the runtime environment.

head_image

head_image(head_image: str) -> Self

Set the container image for Ray head.

worker_image

worker_image(worker_image: str) -> Self

Set the container image for Ray workers.

default_head_image

default_head_image() -> Self

Set the container image for Ray head to the platform default.

default_worker_image

default_worker_image() -> Self

Set the container image for Ray workers to the platform default.

upload_site_packages

upload_site_packages(upload: bool = True) -> Self

Set whether to upload site packages during packaging.

delete_local_zips

delete_local_zips(delete: bool = True) -> Self

Set whether to delete local zip files after upload.

local_zip_output_dir

local_zip_output_dir(output_dir: str) -> Self

Set the local directory for zip file output.

env_vars

env_vars(env_vars: dict[str, str]) -> Self

Set environment variables for Ray workers via runtime_env.

These override cluster-level env vars for Ray worker processes.

add_env_var

add_env_var(key: str, value: str) -> Self

Add a single environment variable for Ray workers.

allow_unpinned

allow_unpinned(allow: bool = True) -> Self

Silence the recommendation to pin exact dependency versions.

Dependencies are installed on the Ray workers at run time, so ranged or unversioned specifiers may resolve to versions that differ from the local environment. Use this only when that drift is intended.