Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add support for version arg in agent execute
  • Loading branch information
spillai committed Apr 7, 2025
commit b29dea692d9b265a9562bc16192145e9ca9da242
6 changes: 6 additions & 0 deletions vlmrun/client/predictions.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ def _handle_images_or_urls(
def execute(
self,
name: str,
version: str = "latest",
images: Optional[List[Union[Path, Image.Image]]] = None,
urls: Optional[List[str]] = None,
batch: bool = False,
Expand All @@ -188,6 +189,7 @@ def execute(

Args:
name: Name of the model to use
version: Version of the model to use
images: List of file paths (Path) or PIL Image objects to process. Either images or urls must be provided.
urls: List of HTTP URLs pointing to images. Either images or urls must be provided.
batch: Whether to run prediction in batch mode
Expand All @@ -212,6 +214,7 @@ def execute(
url="image/execute",
data={
"name": name,
"version": version,
"images": images_data,
"batch": batch,
"callback_url": callback_url,
Expand Down Expand Up @@ -445,6 +448,7 @@ def generate(
def execute(
self,
name: str,
version: str = "latest",
file: Optional[Union[Path, str]] = None,
url: Optional[str] = None,
batch: bool = False,
Expand All @@ -457,6 +461,7 @@ def execute(

Args:
name: Name of the model to execute
version: Version of the model to execute
file: File (pathlib.Path) or file_id to generate prediction from
url: URL to generate prediction from
batch: Whether to run prediction in batch mode
Expand All @@ -480,6 +485,7 @@ def execute(
url=f"{route}/execute",
data={
"name": name,
"version": version,
"url" if is_url else "file_id": file_or_url,
"batch": batch,
"callback_url": callback_url,
Expand Down
2 changes: 1 addition & 1 deletion vlmrun/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.2.12"
__version__ = "0.2.13"
Loading