Skip to content

Conversation

@AnilSorathiya
Copy link
Contributor

@AnilSorathiya AnilSorathiya commented Jan 23, 2026

Pull Request Description

What and why?

Several dependencies within the validmind-libs repository currently lack explicit version assignments.
This task involves defining fixed versions for these libraries to ensure environment stability and consistent system functionality.
Other changes:

How to test

  • run demo notebooks and unit tests

What needs special review?

Dependencies, breaking changes, and deployment notes

Release notes

Checklist

  • What and why
  • Screenshots or videos (Frontend)
  • How to test
  • What needs special review
  • Dependencies, breaking changes, and deployment notes
  • Labels applied
  • PR linked to Shortcut
  • [] Unit tests added (Backend)
  • Tested locally
  • Documentation updated (if required)
  • Environment variable additions/changes documented (if required)

@AnilSorathiya AnilSorathiya added internal Not to be externalized in the release notes chore Chore tasks that aren't bugs or new features labels Jan 23, 2026
@github-actions
Copy link
Contributor

PR Summary

This PR makes several functional changes to improve reliability and workaround external library bugs. First, the GitHub Actions workflow for dependency testing has been updated to use official actions for installing Poetry and uv, replacing manual installation commands. This ensures reliable and reproducible setup by pinning Poetry to version 2.0.1 and enabling cache for uv.

Further, the notebook sample now explicitly installs a specific version of the "langgraph" package alongside the main package, ensuring better compatibility.

In the dependency lock file and pyproject.toml, version pins for multiple dependencies (e.g., ipywidgets, polars, python-dotenv, scikit-learn, seaborn, evaluate, tiktoken, tqdm, anywidget, beautifulsoup4, pycocoevalcap, scipy, statsmodels, langdetect, arch, etc.) have been modified to enforce more predictable behavior and avoid breaking changes from upstream updates.

Several modifications in test files address issues stemming from bugs in the evaluate library (v0.4.3), particularly around the toxicity and regard metrics. Workarounds bypass the compute() method in favor of directly invoking classifier functions. These updates include conversion of numpy strings to Python strings to avoid type issues, dynamic calculation of expected figure counts in regard tests, and improved error messages.

Minor adjustments in the package source (e.g., in init.py and scorers modules) expose new module naming while still supporting backward compatibility.

Test Suggestions

  • Run the GitHub Actions workflow to verify that the new dependency installation steps work as expected.
  • Execute the updated unit tests for ToxicityScore and RegardScore to ensure the workarounds for evaluate library bugs function correctly.
  • Perform integration tests to verify that the pinned dependency versions do not conflict with other parts of the system.
  • Manually install the package in a clean virtual environment to test installation and runtime behavior with new version pins.

@cachafla
Copy link
Contributor

Let's close this PR and open a new one once we get more clear requirements around individual dependencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Chore tasks that aren't bugs or new features internal Not to be externalized in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants