Skip to content

Classifier Integration Test Tooling (Python) #217

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

giusedroid
Copy link

Issue number: #76

Summary

Changes

Added comprehensive classification testing framework including:

  • Configuration-driven test setup with JSON files
  • Confidence level validation
  • Detailed test reporting
  • Documentation for test setup and execution

User experience

Before:

  • No structured way to test classification accuracy
  • Manual testing required for routing validation
  • No confidence level tracking
  • Difficult to maintain and reproduce tests

After:

  • Clear, configuration-based test setup
  • Automated validation of routing decisions
  • Confidence level tracking and thresholds
  • Detailed test reports with success rates
  • Easy to add new test cases via JSON files

Checklist

  • I have performed a self-review of this change
  • Changes have been tested
  • Changes are documented
Is this a breaking change?

RFC issue number: N/A

Checklist:

  • Migration process documented
  • Implement warnings (if it can live side by side)

This is not a breaking change as it adds new testing capabilities without modifying existing functionality.

Acknowledgment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

@giusedroid
Copy link
Author

Failed checks:

  • the security check is failing because it's missing a license token. That is probably something the maintainers need to fix
  • I might have to move this script from tests/integration to somewhere else where it doesn't break the build pipeline or make these tests optional (in the git workflow)

Other considerations:

  • there's a branch named "testing" which has a cookbook to implement similar tests. Should we merge?

```
2. Run all unit tests
```bash
pytest python/src/tests --ignore-glob='*/integration/*'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you should remove python from python/src/tests because we are in the pythonfolder when running this.

### How to run Integration Tests

```bash
pytest python/src/tests/integration
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the same ase above, and I tried to execute pytest src/tests/integrationbut I have other errors like

FileNotFoundError: Configuration file not found: python/src/tests/integration/classifier/orchestrator_config.json

The file seems to be there but it must be related to a path somewhere.

```

2. Install the build dependencies:
```bash
python -m pip install build
python3.11 -m pip install build
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should keep it generic like python -m ...

```bash
cd python
python3.11 -m venv venv
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should use python instead of python3.11

1. Install pytest and pytest-asyncio
```bash
source venv/bin/activate
pip3.11 install -r test_requirements.txt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use pip install... instead of pip3.11, keep it generic.

This guide explains how to set up and run classification tests for the Multi-Agent Orchestrator. These tests verify that user inputs are correctly routed to the appropriate agents with the expected confidence levels.

## Required Files
You need three JSON configuration files in the `python/src/tests/integration/classifier/` directory:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since we are in the python version remove python from the path.

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.

2 participants