Skip to content

Release 1.1.0: port integration logging fixes from whitebox-xai-azure/sdk - #7

Merged
dewitt4 merged 1 commit into
mainfrom
feature/release-1-1
Jul 30, 2026
Merged

Release 1.1.0: port integration logging fixes from whitebox-xai-azure/sdk#7
dewitt4 merged 1 commit into
mainfrom
feature/release-1-1

Conversation

@dewitt4

@dewitt4 dewitt4 commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Ports the two commits (34ba0ee2, c1d4aaa0) that landed in the whitebox-xai-azure monorepo's sdk/ folder after the v1.0.0 cut but were never synced to this repo.
  • Fixes predict()/wrap_*_model() auto-logging in the XGBoost, LightGBM, TensorFlow/Keras, and Hugging Face Transformers integrations — all previously called ModelMonitor.log_prediction()/log_batch() with keyword arguments that don't match the real signatures, raising TypeError/AttributeError on the primary documented usage path of each integration in the published v1.0.0 package.
  • Fixes LangChainMonitor's 5 convenience-logging methods (same class of bug: prediction= instead of output=).
  • Fixes wrap_transformers_pipeline() silently never logging anything — it reassigned pipeline.__call__ on an instance, which Python never actually invokes (dunder lookup happens on the type).
  • Adds langchain_core-first import resolution (with legacy langchain fallback) so the LangChain integrations work with modern langchain-core-only installs.
  • Adds optional labels to ModelMonitor.set_baseline() — also fixes a live TypeError in KerasMonitor/TransformersMonitor.set_baseline(), which already called the parent method with 2 positional args against a signature that only accepted 1.
  • Fixes an off-by-one boundary in OfflineQueue.clear_completed().
  • Version bump 1.0.01.1.0, CHANGELOG entry, and a footer link fix (existing links pointed at nonexistent v-prefixed tags).

Test plan

  • black --check, isort --check-only, flake8 all clean across the full repo
  • pytest tests/unit — 139 passed, 1 skipped (baseline 135 passed + 4 new tests)
  • pytest tests/integration — 35 passed (unchanged from baseline)
  • pytest tests/e2e — 0 collected (expected)
  • mkdocs build --strict passes
  • Manual subprocess verification that the langchain_core-only import path resolves correctly (the scenario this fix targets) and that the fully-installed path still works via the full test suite
  • Added regression tests for ModelMonitor.set_baseline(labels=...) and the OfflineQueue.clear_completed() boundary fix (tests/unit/test_monitor.py, new tests/unit/test_offline.py)

🤖 Generated with Claude Code

…/sdk

Fixes broken predict()/wrap_*_model() auto-logging in the XGBoost,
LightGBM, TensorFlow/Keras, and Hugging Face Transformers integrations,
and broken LangChainMonitor convenience-logging methods, all of which
called ModelMonitor.log_prediction()/log_batch() with keyword arguments
that don't match the real signatures (raising TypeError/AttributeError
on the primary documented usage path of each integration). Also fixes
wrap_transformers_pipeline() silently never logging anything (dunder
__call__ reassignment on an instance is a no-op in Python), adds
langchain_core-first import resolution for modern langchain-core-only
installs, adds optional baseline labels to ModelMonitor.set_baseline(),
and fixes an off-by-one boundary in OfflineQueue.clear_completed().

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
4.4% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@dewitt4
dewitt4 merged commit ff535ff into main Jul 30, 2026
9 of 10 checks passed
@dewitt4
dewitt4 deleted the feature/release-1-1 branch July 30, 2026 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant