WorldJen Python SDK for running evaluation pipelines on video and world models
Reason this release was yanked:
Incorrect package
Project description
WorldJen Python SDK
Python SDK for running WorldJen evaluation on video and world models.
Requires Python 3.10+.
Configuration
Set your API key and options via worldjen.config() or environment variables:
WORLDJEN_API_KEY— API key (required for run creation and uploads)WORLDJEN_VIDEO_DIR— Directory for cached prompts and run outputs (default:~/.worldjen/data/videos)
import worldjen
worldjen.config(api_key="your-api-key")
# or use env vars and call config() only to override
worldjen.config(video_dir="/path/to/videos")
Usage
Dimensions
Use the Dimensions enum for evaluation dimensions:
from worldjen import Dimensions
dims = [Dimensions.SUBJECT_CONSISTENCY, Dimensions.SCENE_CONSISTENCY]
# or strings: dims = ["subject_consistency", "scene_consistency"]
Running a pipeline
Your pipeline must be either:
- A callable:
pipeline(prompt, **kwargs) -> list[frames] - An object with a
generatemethod:pipeline.generate(prompt, **kwargs) -> list[frames] - An object with an
infermethod:pipeline.infer(prompt, **kwargs) -> list[frames]
Frames can be PIL Images or numpy arrays (HWC, any dtype supported by the SDK’s video writer).
import worldjen
def my_pipeline(prompt, **kwargs):
# Generate frames from prompt (text-to-video)
...
return frames # list of PIL or numpy arrays
result = worldjen.run(
my_pipeline,
dimensions=[worldjen.Dimensions.SUBJECT_CONSISTENCY],
run_name="my-eval-run",
model_id="my-org/my-model-checkpoint-xyz"
wait_for_evals=True,
# optional pipeline kwargs:
# num_frames=16,
)
print(result.run_id, result.status, result.video_paths, result.eval_results)
if result.error_message:
print("Error:", result.error_message)
On any failure (run creation, pipeline error, upload), the run is marked failed and RunResult is returned with status="failed" and error_message set.
API
worldjen.config(api_key=..., video_dir=..., api_url=..., timeout=...)— Set or override config; returns the config object.worldjen.run(pipeline, dimensions, run_name=None, wait_for_evals=True, **pipeline_kwargs)— Creates a run, generates videos, uploads videos, then optionally poll until evals are ready. ReturnsRunResult(run_id, video_paths, output_dir, eval_results, status, error_message).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file worldjen-0.1.0-py3-none-any.whl.
File metadata
- Download URL: worldjen-0.1.0-py3-none-any.whl
- Upload date:
- Size: 236.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4cb719f78e3e2beb8ce98a2ceac5f9847bdd1ba1ab8fbde926f279e7b81b916
|
|
| MD5 |
57494d7a156401f6d913d377a9f90919
|
|
| BLAKE2b-256 |
3c2a7622a565d82ea694d6b213f63592774db721eca836ebee0fc48e91bd0596
|