Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.2.0-alpha.93"
".": "0.2.0-alpha.94"
}
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## 0.2.0-alpha.94 (2025-09-11)

Full Changelog: [v0.2.0-alpha.93...v0.2.0-alpha.94](https://github.com/openlayer-ai/openlayer-python/compare/v0.2.0-alpha.93...v0.2.0-alpha.94)

### Bug Fixes

* custom args with run_batch_from_df ([4a45a89](https://github.com/openlayer-ai/openlayer-python/commit/4a45a899811b1c778b8cecabd82b5f97c46346ab))

## 0.2.0-alpha.93 (2025-09-10)

Full Changelog: [v0.2.0-alpha.92...v0.2.0-alpha.93](https://github.com/openlayer-ai/openlayer-python/compare/v0.2.0-alpha.92...v0.2.0-alpha.93)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "openlayer"
version = "0.2.0-alpha.93"
version = "0.2.0-alpha.94"
description = "The official Python library for the openlayer API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/openlayer/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "openlayer"
__version__ = "0.2.0-alpha.93" # x-release-please-version
__version__ = "0.2.0-alpha.94" # x-release-please-version
10 changes: 2 additions & 8 deletions src/openlayer/lib/core/base_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,10 @@ def batch(self, dataset_path: str, output_dir: str) -> None:
raise ValueError(f"Unsupported dataset format: {dataset_path}")

# Call the model's run_batch method, passing in the DataFrame
output_df, config = self.run_batch_from_df(df, custom_args=self.custom_args)
output_df, config = self.run_batch_from_df(df)
self.write_output_to_directory(output_df, config, output_dir, fmt)

def run_batch_from_df(
self, df: pd.DataFrame, custom_args: dict = None
) -> Tuple[pd.DataFrame, dict]:
def run_batch_from_df(self, df: pd.DataFrame) -> Tuple[pd.DataFrame, dict]:
"""Function that runs the model and returns the result."""
# Ensure the 'output' column exists
if "output" not in df.columns:
Expand All @@ -105,10 +103,6 @@ def run_batch_from_df(
# Get the signature of the 'run' method
run_signature = inspect.signature(self.run)

# If the model has a custom_args attribute, update it
if hasattr(self, "custom_args") and custom_args is not None:
self.custom_args.update(custom_args)

for index, row in df.iterrows():
# Filter row_dict to only include keys that are valid parameters
# for the 'run' method
Expand Down
4 changes: 1 addition & 3 deletions src/openlayer/lib/integrations/bedrock_tracer.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@
logger = logging.getLogger(__name__)


def trace_bedrock(
client: "boto3.client",
) -> "boto3.client":
def trace_bedrock(client: "boto3.client") -> "boto3.client":
"""Patch the Bedrock client to trace model invocations.

The following information is collected for each model invocation:
Expand Down