Skip to content

Commit fd7708c

Browse files
authored
Support Python 3.11 for AgentIQ (#148)
- Downgrades Python requirement from `3.12` to `3.11` across all packages - Adds compatibility layer for `typing.override` decorator `type_utils.py` - Replaces all `@typing.override` instances with the compatible version ## By Submitting this PR I confirm: - I am familiar with the [Contributing Guidelines](https://github.com/NVIDIA/AgentIQ/blob/develop/docs/source/advanced/contributing.md). - We require that all contributors "sign-off" on their commits. This certifies that the contribution is your original work, or you have rights to submit it under the same license, or a compatible license. - Any contribution which contains commits that are not Signed-Off will not be accepted. - When the PR is ready for review, new or existing tests cover these changes. - When the PR is ready for review, the documentation is up to date with these changes. Authors: - Yuchen Zhang (https://github.com/yczhang-nv) Approvers: - Michael Demoret (https://github.com/mdemoret-nv) URL: #148
1 parent 3e08c76 commit fd7708c

File tree

28 files changed

+1497
-102
lines changed

28 files changed

+1497
-102
lines changed

‎README.md

+7
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ Before you begin using AgentIQ, ensure that you meet the following software prer
6060
- Install [Git](https://git-scm.com/)
6161
- Install [Git Large File Storage](https://git-lfs.github.com/) (LFS)
6262
- Install [uv](https://docs.astral.sh/uv/getting-started/installation/)
63+
- Install [Python (3.11 or above)](https://www.python.org/downloads/)
6364

6465
### Install From Source
6566

@@ -86,6 +87,12 @@ Before you begin using AgentIQ, ensure that you meet the following software prer
8687
uv venv --seed .venv
8788
source .venv/bin/activate
8889
```
90+
Make sure the environment is built with Python version `3.11` or above. If you have multiple Python versions installed,
91+
you can specify the desired version using the `--python` flag. For example, to use Python 3.11:
92+
```bash
93+
uv venv --seed .venv --python 3.11
94+
```
95+
You can replace `--python 3.11` with any other Python version (3.11 or above) that you have installed.
8996

9097
5. Install the AgentIQ library.
9198
To install the AgentIQ library along with all of the optional dependencies. Including developer tools (`--all-groups`) and all of the dependencies needed for profiling and plugins (`--all-extras`) in the source repository, run the following:

‎examples/agno_personal_finance/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ dependencies = [
1313
"openai~=1.66",
1414
"litellm~=1.63.14"
1515
]
16-
requires-python = ">=3.12"
16+
requires-python = ">=3.11"
1717
description = "Custom AgentIQ Workflow using Agno for personal finance"
1818
classifiers = ["Programming Language :: Python"]
1919

‎examples/automated_description_generation/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dynamic = ["version"]
1111
dependencies = [
1212
"aiqtoolkit[langchain]"
1313
]
14-
requires-python = ">=3.12"
14+
requires-python = ">=3.11"
1515
description = "Automated Generation Description AI-Q example"
1616
keywords = ["ai", "rag", "agents"]
1717
classifiers = ["Programming Language :: Python"]

‎examples/documentation_guides/workflows/text_file_ingest/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ dependencies = [
1010
"bs4==0.0.2",
1111
"faiss-cpu==1.9.0",
1212
]
13-
requires-python = ">=3.12"
13+
requires-python = ">=3.11"
1414
description = "Ingest data from text files"
1515
keywords = ["ai", "rag", "agents"]
1616
classifiers = ["Programming Language :: Python"]

‎examples/email_phishing_analyzer/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ dependencies = [
1515
"networkx~=3.4",
1616
"openinference-instrumentation-langchain==0.1.29",
1717
]
18-
requires-python = ">=3.12"
18+
requires-python = ">=3.11"
1919
description = "Simple Phishing Email Analyzer AgentIQ example"
2020
keywords = ["ai", "rag", "agents"]
2121
classifiers = ["Programming Language :: Python"]

‎examples/multi_frameworks/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ dependencies = [
1414
"markdown-it-py~=3.0",
1515
"nvidia-haystack==0.1.2",
1616
]
17-
requires-python = ">=3.12"
17+
requires-python = ">=3.11"
1818
description = "Custom AgentIQ Workflow"
1919
classifiers = ["Programming Language :: Python"]
2020

‎examples/plot_charts/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ dependencies = [
1313
"matplotlib==3.9.*",
1414
"seaborn==0.13.*",
1515
]
16-
requires-python = ">=3.12"
16+
requires-python = ">=3.11"
1717
description = "Simple AgentIQ example"
1818
keywords = ["ai", "rag", "agents"]
1919
classifiers = ["Programming Language :: Python"]

‎examples/semantic_kernel_demo/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ dependencies = [
1212
"aiqtoolkit[langchain,semantic-kernel]",
1313
"faiss-cpu==1.9.0",
1414
]
15-
requires-python = ">=3.12"
15+
requires-python = ">=3.11"
1616
description = "Simple AgentIQ example"
1717
keywords = ["ai", "rag", "agents"]
1818
classifiers = ["Programming Language :: Python"]

‎examples/simple/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ dependencies = [
1212
"aiqtoolkit[langchain]",
1313
"faiss-cpu==1.9.0",
1414
]
15-
requires-python = ">=3.12"
15+
requires-python = ">=3.11"
1616
description = "Simple AgentIQ example"
1717
keywords = ["ai", "rag", "agents"]
1818
classifiers = ["Programming Language :: Python"]

‎examples/simple_calculator/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dynamic = ["version"]
1111
dependencies = [
1212
"aiqtoolkit[langchain]",
1313
]
14-
requires-python = ">=3.12"
14+
requires-python = ">=3.11"
1515
description = "Simple Calculator AgentIQ example"
1616
keywords = ["ai", "rag", "agents"]
1717
classifiers = ["Programming Language :: Python"]

‎examples/swe_bench/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ dependencies = [
1212
"aiqtoolkit[langchain]",
1313
"swebench==3.0.3"
1414
]
15-
requires-python = ">=3.12"
15+
requires-python = ">=3.11"
1616
description = "Example for solving SWE bench problems"
1717
classifiers = ["Programming Language :: Python"]
1818

‎packages/aiqtoolkit_agno/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ dependencies = [
2424
"openai~=1.66",
2525
"google-search-results~=2.4.2",
2626
]
27-
requires-python = ">=3.12"
27+
requires-python = ">=3.11"
2828
readme = "src/aiq/meta/pypi.md"
2929
description = "Subpackage for Agno integration in AIQToolkit"
3030
keywords = ["ai", "rag", "agents"]

‎packages/aiqtoolkit_crewai/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ dependencies = [
2222
"aiqtoolkit",
2323
"crewai~=0.95.0",
2424
]
25-
requires-python = ">=3.12"
25+
requires-python = ">=3.11"
2626
readme = "src/aiq/meta/pypi.md"
2727
description = "Subpackage for CrewAI integration in AIQToolkit"
2828
keywords = ["ai", "rag", "agents"]

‎packages/aiqtoolkit_langchain/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ dependencies = [
2727
"langgraph~=0.2.50",
2828
"langchain-milvus~=0.1.8"
2929
]
30-
requires-python = ">=3.12"
30+
requires-python = ">=3.11"
3131
description = "Subpackage for Langchain/Langgraph integration in AIQToolkit"
3232
readme = "src/aiq/meta/pypi.md"
3333
keywords = ["ai", "rag", "agents"]

‎packages/aiqtoolkit_llama_index/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ dependencies = [
2828
"llama-index-readers-file==0.4.4",
2929
"llama-index==0.12.15",
3030
]
31-
requires-python = ">=3.12"
31+
requires-python = ">=3.11"
3232
description = "Subpackage for Llama-Index integration in AIQToolkit"
3333
readme = "src/aiq/meta/pypi.md"
3434
keywords = ["ai", "rag", "agents"]

‎packages/aiqtoolkit_mem0ai/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ dependencies = [
2222
"aiqtoolkit",
2323
"mem0ai~=0.1.30",
2424
]
25-
requires-python = ">=3.12"
25+
requires-python = ">=3.11"
2626
description = "Subpackage for Mem0 memory integration in AIQToolkit"
2727
readme = "src/aiq/meta/pypi.md"
2828
keywords = ["ai", "agents", "memory"]

‎packages/aiqtoolkit_semantic_kernel/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ dependencies = [
2222
"aiqtoolkit",
2323
"semantic-kernel~=1.24.0",
2424
]
25-
requires-python = ">=3.12"
25+
requires-python = ">=3.11"
2626
description = "Subpackage for Semantic-Kernel integration in AIQToolkit"
2727
readme = "src/aiq/meta/pypi.md"
2828
keywords = ["ai", "rag", "agents"]

‎packages/aiqtoolkit_test/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ dependencies = [
2222
"aiqtoolkit",
2323
"pytest~=8.3",
2424
]
25-
requires-python = ">=3.12"
25+
requires-python = ">=3.11"
2626
description = "Testing utilities for AIQToolkit"
2727
readme = "src/aiq/meta/pypi.md"
2828
keywords = ["ai", "rag", "agents"]

‎packages/aiqtoolkit_zep_cloud/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ dependencies = [
2222
"aiqtoolkit",
2323
"zep-cloud~=2.2.0",
2424
]
25-
requires-python = ">=3.12"
25+
requires-python = ">=3.11"
2626
description = "Subpackage for Zep memory integration in AIQToolkit"
2727
readme = "src/aiq/meta/pypi.md"
2828
keywords = ["ai", "agents", "memory"]

‎pyproject.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ dependencies = [
4343
"uvicorn[standard]~=0.32.0",
4444
"wikipedia~=1.4",
4545
]
46-
requires-python = "==3.12.*"
46+
requires-python = ">=3.11"
4747
description = "Agent Intelligence Toolkit (AIQ Toolkit)"
4848
readme = "src/aiq/meta/pypi.md"
4949
license = { file = "LICENSE.md" }
@@ -275,7 +275,7 @@ persistent = true
275275

276276
# Minimum Python version to use for version dependent checks. Will default to the
277277
# version used to run pylint.
278-
py-version = "3.12"
278+
py-version = "3.11"
279279

280280
# Discover python modules and packages in the file system subtree.
281281
# recursive =

‎src/aiq/builder/eval_builder.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
import dataclasses
1717
import logging
18-
import typing
1918
from contextlib import asynccontextmanager
2019
from pathlib import Path
2120

@@ -28,6 +27,7 @@
2827
from aiq.data_models.config import GeneralConfig
2928
from aiq.data_models.evaluate import EvalGeneralConfig
3029
from aiq.data_models.evaluator import EvaluatorBaseConfig
30+
from aiq.utils.type_utils import override
3131

3232
logger = logging.getLogger(__name__)
3333

@@ -48,7 +48,7 @@ def __init__(self,
4848
self.eval_general_config = eval_general_config
4949
self._evaluators: dict[str, ConfiguredEvaluator] = {}
5050

51-
@typing.override
51+
@override
5252
async def add_evaluator(self, name: str, config: EvaluatorBaseConfig):
5353
if name in self._evaluators:
5454
raise ValueError(f"Evaluator `{name}` already exists in the list of evaluators")
@@ -63,15 +63,15 @@ async def add_evaluator(self, name: str, config: EvaluatorBaseConfig):
6363
logger.error("Error %s adding evaluator `%s` with config `%s`", e, name, config, exc_info=True)
6464
raise
6565

66-
@typing.override
66+
@override
6767
def get_evaluator(self, evaluator_name: str) -> EvaluatorInfo:
6868

6969
if (evaluator_name not in self._evaluators):
7070
raise ValueError(f"Evaluator `{evaluator_name}` not found")
7171

7272
return self._evaluators[evaluator_name].instance
7373

74-
@typing.override
74+
@override
7575
def get_evaluator_config(self, evaluator_name: str) -> EvaluatorBaseConfig:
7676

7777
if evaluator_name not in self._evaluators:
@@ -80,15 +80,15 @@ def get_evaluator_config(self, evaluator_name: str) -> EvaluatorBaseConfig:
8080
# Return the tool configuration object
8181
return self._evaluators[evaluator_name].config
8282

83-
@typing.override
83+
@override
8484
def get_max_concurrency(self) -> int:
8585
return self.eval_general_config.max_concurrency
8686

87-
@typing.override
87+
@override
8888
def get_output_dir(self) -> Path:
8989
return self.eval_general_config.output_dir
9090

91-
@typing.override
91+
@override
9292
def get_all_tools(self, wrapper_type: LLMFrameworkEnum | str):
9393
tools = []
9494
tool_wrapper_reg = self._registry.get_tool_wrapper(llm_framework=wrapper_type)

0 commit comments

Comments
 (0)