Skip to content

release: 0.2.0-alpha.69 #483

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 11, 2025
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
24 changes: 24 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Pull Request

## Summary

<!-- Briefly explain what this PR does. -->

## Changes

<!-- List key changes. Keep it concise. -->

- [x] Change 1

## Context

<!-- Why is this needed? Link to relevant Linear issues (e.g., `LINEAR-123`). -->

## Testing

<!-- How did you test this? Include relevant details. -->

- [ ] Unit tests
- [ ] Manual testing
- [ ] Postman CI/CD
- [ ] Other (please specify)
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.68"
".": "0.2.0-alpha.69"
}
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ 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.69 (2025-07-11)

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

### Bug Fixes

* improve tracing errors ([a204b4c](https://github.com/openlayer-ai/openlayer-python/commit/a204b4cb59fd508d830421b549dd19e651c8cb3e))


### Chores

* add github PR template ([4166639](https://github.com/openlayer-ai/openlayer-python/commit/4166639bd2a0bfb87b429444ba9edeb15d1265fe))

## 0.2.0-alpha.68 (2025-07-11)

Full Changelog: [v0.2.0-alpha.67...v0.2.0-alpha.68](https://github.com/openlayer-ai/openlayer-python/compare/v0.2.0-alpha.67...v0.2.0-alpha.68)
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.68"
version = "0.2.0-alpha.69"
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.68" # x-release-please-version
__version__ = "0.2.0-alpha.69" # x-release-please-version
45 changes: 28 additions & 17 deletions src/openlayer/lib/tracing/tracer.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
"""Module with the logic to create and manage traces and steps."""

import time
import asyncio
import contextvars
import inspect
import logging
import contextvars
from typing import Any, Dict, List, Tuple, Optional, Awaitable, Generator
from functools import wraps
import time
import traceback
from contextlib import contextmanager
from functools import wraps
from typing import Any, Awaitable, Dict, Generator, List, Optional, Tuple

from . import enums, steps, traces
from .. import utils
from ..._client import Openlayer
from ..._base_client import DefaultHttpxClient
from ..._client import Openlayer
from ...types.inference_pipelines.data_stream_params import ConfigLlmData
from .. import utils
from . import enums, steps, traces

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -251,12 +252,14 @@ async def __anext__(self):
# Initialize tracing on first iteration only
if not self._trace_initialized:
self._original_gen = func(*func_args, **func_kwargs)
self._step, self._is_root_step, self._token = _create_and_initialize_step(
step_name=step_name,
step_type=enums.StepType.USER_CALL,
inputs=None,
output=None,
metadata=None,
self._step, self._is_root_step, self._token = (
_create_and_initialize_step(
step_name=step_name,
step_type=enums.StepType.USER_CALL,
inputs=None,
output=None,
metadata=None,
)
)
self._inputs = _extract_function_inputs(
func_signature=func_signature,
Expand Down Expand Up @@ -466,16 +469,25 @@ def _handle_trace_completion(
)
if _publish:
try:
inference_pipeline_id = inference_pipeline_id or utils.get_env_variable(
"OPENLAYER_INFERENCE_PIPELINE_ID"
)
client = _get_client()
if client:
client.inference_pipelines.data.stream(
inference_pipeline_id=inference_pipeline_id
or utils.get_env_variable("OPENLAYER_INFERENCE_PIPELINE_ID"),
inference_pipeline_id=inference_pipeline_id,
rows=[trace_data],
config=config,
)
except Exception as err: # pylint: disable=broad-except
logger.error("Could not stream data to Openlayer %s", err)
logger.error(traceback.format_exc())
logger.error(
"Could not stream data to Openlayer (pipeline_id: %s, base_url: %s)"
" Error: %s",
inference_pipeline_id,
client.base_url,
err,
)
else:
logger.debug("Ending step %s", step_name)

Expand Down Expand Up @@ -557,7 +569,6 @@ def _finalize_step_logging(
# ----------------------------- Async generator specific functions ----------------------------- #



def _finalize_async_generator_step(
step: steps.Step,
token: Any,
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy