fairo 25.8.1__tar.gz → 25.8.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of fairo might be problematic. Click here for more details.
- {fairo-25.8.1 → fairo-25.8.2}/PKG-INFO +2 -2
- fairo-25.8.2/fairo/__init__.py +1 -0
- {fairo-25.8.1 → fairo-25.8.2}/fairo/core/execution/executor.py +24 -3
- {fairo-25.8.1 → fairo-25.8.2}/fairo/core/workflow/utils.py +29 -1
- {fairo-25.8.1 → fairo-25.8.2}/fairo.egg-info/PKG-INFO +2 -2
- {fairo-25.8.1 → fairo-25.8.2}/fairo.egg-info/requires.txt +1 -1
- {fairo-25.8.1 → fairo-25.8.2}/pyproject.toml +1 -1
- fairo-25.8.1/fairo/__init__.py +0 -1
- {fairo-25.8.1 → fairo-25.8.2}/README.md +0 -0
- {fairo-25.8.1 → fairo-25.8.2}/fairo/core/__init__.py +0 -0
- {fairo-25.8.1 → fairo-25.8.2}/fairo/core/agent/__init__.py +0 -0
- {fairo-25.8.1 → fairo-25.8.2}/fairo/core/agent/base_agent.py +0 -0
- {fairo-25.8.1 → fairo-25.8.2}/fairo/core/agent/code_analysis_agent.py +0 -0
- {fairo-25.8.1 → fairo-25.8.2}/fairo/core/agent/output/__init__.py +0 -0
- {fairo-25.8.1 → fairo-25.8.2}/fairo/core/agent/output/base_output.py +0 -0
- {fairo-25.8.1 → fairo-25.8.2}/fairo/core/agent/output/google_drive.py +0 -0
- {fairo-25.8.1 → fairo-25.8.2}/fairo/core/agent/tools/__init__.py +0 -0
- {fairo-25.8.1 → fairo-25.8.2}/fairo/core/agent/tools/base_tools.py +0 -0
- {fairo-25.8.1 → fairo-25.8.2}/fairo/core/agent/tools/code_analysis.py +0 -0
- {fairo-25.8.1 → fairo-25.8.2}/fairo/core/agent/tools/utils.py +0 -0
- {fairo-25.8.1 → fairo-25.8.2}/fairo/core/agent/utils.py +0 -0
- {fairo-25.8.1 → fairo-25.8.2}/fairo/core/chat/__init__.py +0 -0
- {fairo-25.8.1 → fairo-25.8.2}/fairo/core/chat/chat.py +0 -0
- {fairo-25.8.1 → fairo-25.8.2}/fairo/core/client/__init__.py +0 -0
- {fairo-25.8.1 → fairo-25.8.2}/fairo/core/client/client.py +0 -0
- {fairo-25.8.1 → fairo-25.8.2}/fairo/core/exceptions.py +0 -0
- {fairo-25.8.1 → fairo-25.8.2}/fairo/core/execution/__init__.py +0 -0
- {fairo-25.8.1 → fairo-25.8.2}/fairo/core/execution/agent_serializer.py +0 -0
- {fairo-25.8.1 → fairo-25.8.2}/fairo/core/execution/env_finder.py +0 -0
- {fairo-25.8.1 → fairo-25.8.2}/fairo/core/execution/model_log_helper.py +0 -0
- {fairo-25.8.1 → fairo-25.8.2}/fairo/core/models/__init__.py +0 -0
- {fairo-25.8.1 → fairo-25.8.2}/fairo/core/models/custom_field_value.py +0 -0
- {fairo-25.8.1 → fairo-25.8.2}/fairo/core/models/resources.py +0 -0
- {fairo-25.8.1 → fairo-25.8.2}/fairo/core/runnable/__init__.py +0 -0
- {fairo-25.8.1 → fairo-25.8.2}/fairo/core/runnable/runnable.py +0 -0
- {fairo-25.8.1 → fairo-25.8.2}/fairo/core/workflow/__init__.py +0 -0
- {fairo-25.8.1 → fairo-25.8.2}/fairo/core/workflow/base_workflow.py +0 -0
- {fairo-25.8.1 → fairo-25.8.2}/fairo/core/workflow/dependency.py +0 -0
- {fairo-25.8.1 → fairo-25.8.2}/fairo/metrics/__init__.py +0 -0
- {fairo-25.8.1 → fairo-25.8.2}/fairo/metrics/fairness_object.py +0 -0
- {fairo-25.8.1 → fairo-25.8.2}/fairo/metrics/metrics.py +0 -0
- {fairo-25.8.1 → fairo-25.8.2}/fairo/settings.py +0 -0
- {fairo-25.8.1 → fairo-25.8.2}/fairo/tests/__init__.py +0 -0
- {fairo-25.8.1 → fairo-25.8.2}/fairo/tests/test_metrics.py +0 -0
- {fairo-25.8.1 → fairo-25.8.2}/fairo.egg-info/SOURCES.txt +0 -0
- {fairo-25.8.1 → fairo-25.8.2}/fairo.egg-info/dependency_links.txt +0 -0
- {fairo-25.8.1 → fairo-25.8.2}/fairo.egg-info/top_level.txt +0 -0
- {fairo-25.8.1 → fairo-25.8.2}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fairo
|
|
3
|
-
Version: 25.8.
|
|
3
|
+
Version: 25.8.2
|
|
4
4
|
Summary: SDK for interfacing with Fairo SaaS platform.
|
|
5
5
|
Author-email: "Fairo Systems, Inc." <support@fairo.ai>
|
|
6
6
|
License: Apache-2.0
|
|
@@ -11,7 +11,7 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
11
11
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
12
12
|
Classifier: Operating System :: OS Independent
|
|
13
13
|
Description-Content-Type: text/markdown
|
|
14
|
-
Requires-Dist: mlflow<=3.
|
|
14
|
+
Requires-Dist: mlflow<=3.2.0,>=3.1.0
|
|
15
15
|
Requires-Dist: langchain<0.4.0,>=0.3.20
|
|
16
16
|
Requires-Dist: langchain-aws<0.3.0,>=0.2.18
|
|
17
17
|
Requires-Dist: langchain-community<0.4.0,>=0.3.20
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "25.8.2"
|
|
@@ -23,6 +23,7 @@ logger = logging.getLogger(__name__)
|
|
|
23
23
|
class FairoExecutor:
|
|
24
24
|
def __init__(
|
|
25
25
|
self,
|
|
26
|
+
input_schema,
|
|
26
27
|
agent_type: str = "Langchain",
|
|
27
28
|
agents: List[Any] = [],
|
|
28
29
|
verbose: bool = False,
|
|
@@ -37,6 +38,7 @@ class FairoExecutor:
|
|
|
37
38
|
raise ValueError("FairoExecutor cannot be initialized with both 'agents' and 'runnable'. Please provide only one.")
|
|
38
39
|
if not input_fields:
|
|
39
40
|
raise ValueError("Missing input_fields")
|
|
41
|
+
self.input_schema = input_schema
|
|
40
42
|
self.agents = agents
|
|
41
43
|
self.agent_type = agent_type
|
|
42
44
|
self.verbose = verbose
|
|
@@ -67,8 +69,26 @@ class FairoExecutor:
|
|
|
67
69
|
pipeline = mlflow.pyfunc.load_model(self.runnable.artifact_path)
|
|
68
70
|
else:
|
|
69
71
|
pipeline = AgentChainWrapper(chain_class=self.chain_class, agent_functions_list=self.agents)
|
|
70
|
-
|
|
71
|
-
input_schema
|
|
72
|
+
# Convert Pydantic schema to MLflow Schema
|
|
73
|
+
if hasattr(self.input_schema, 'model_json_schema'):
|
|
74
|
+
# Extract field names from Pydantic schema
|
|
75
|
+
pydantic_schema = self.input_schema.model_json_schema()
|
|
76
|
+
properties = pydantic_schema.get('properties', {})
|
|
77
|
+
cols = []
|
|
78
|
+
for field_name, field_info in properties.items():
|
|
79
|
+
field_type = field_info.get('type', 'string')
|
|
80
|
+
# Map Pydantic types to MLflow types
|
|
81
|
+
mlflow_type = 'string' # Default to string
|
|
82
|
+
if field_type in ['integer', 'number']:
|
|
83
|
+
mlflow_type = 'double'
|
|
84
|
+
elif field_type == 'boolean':
|
|
85
|
+
mlflow_type = 'boolean'
|
|
86
|
+
cols.append(ColSpec(type=mlflow_type, name=field_name))
|
|
87
|
+
input_schema = Schema(cols)
|
|
88
|
+
else:
|
|
89
|
+
# Fallback to input_fields if schema is not Pydantic
|
|
90
|
+
cols = [ColSpec(type="string", name=field) for field in self.input_fields]
|
|
91
|
+
input_schema = Schema(cols)
|
|
72
92
|
|
|
73
93
|
output_schema = Schema([
|
|
74
94
|
ColSpec(type="string", name="output"),
|
|
@@ -97,7 +117,8 @@ class FairoExecutor:
|
|
|
97
117
|
fairo_settings = {
|
|
98
118
|
"type": type,
|
|
99
119
|
"process_graph": process_graph,
|
|
100
|
-
"
|
|
120
|
+
"schema": self.input_schema.model_json_schema(),
|
|
121
|
+
"input_fields": list(self.input_schema.model_fields.keys()),
|
|
101
122
|
}
|
|
102
123
|
if process_graph:
|
|
103
124
|
mlflow.log_text(json.dumps(fairo_settings, ensure_ascii=False, indent=2), artifact_file="fairo_settings.txt")
|
|
@@ -278,6 +278,7 @@ def output_langchain_process_graph(agents):
|
|
|
278
278
|
"prompt": get_agent_prompt(agent),
|
|
279
279
|
"prefix": agent_kwargs.get("prefix", ""),
|
|
280
280
|
"suffix": agent_kwargs.get("suffix", ""),
|
|
281
|
+
"schema": get_agent_schema(agent),
|
|
281
282
|
}
|
|
282
283
|
)
|
|
283
284
|
|
|
@@ -457,4 +458,31 @@ def get_agent_prompt(agent) -> str:
|
|
|
457
458
|
search_queue.append(child)
|
|
458
459
|
|
|
459
460
|
# Nothing found – return empty string
|
|
460
|
-
return ""
|
|
461
|
+
return ""
|
|
462
|
+
|
|
463
|
+
|
|
464
|
+
def get_agent_schema(agent):
|
|
465
|
+
"""
|
|
466
|
+
Returns a JSON schema dict when available, otherwise None.
|
|
467
|
+
Checks common attributes across SimpleAgent and LangChain agents.
|
|
468
|
+
"""
|
|
469
|
+
candidate_attrs = ("args_schema", "input_schema", "agent_schema", "schema")
|
|
470
|
+
for attr in candidate_attrs:
|
|
471
|
+
obj = getattr(agent, attr, None)
|
|
472
|
+
if obj is None:
|
|
473
|
+
continue
|
|
474
|
+
try:
|
|
475
|
+
if isinstance(obj, dict):
|
|
476
|
+
return obj
|
|
477
|
+
if hasattr(obj, "model_json_schema") and callable(getattr(obj, "model_json_schema")):
|
|
478
|
+
return obj.model_json_schema()
|
|
479
|
+
if hasattr(obj, "schema") and callable(getattr(obj, "schema")):
|
|
480
|
+
return obj.schema()
|
|
481
|
+
except Exception as e:
|
|
482
|
+
pass
|
|
483
|
+
|
|
484
|
+
inner = getattr(agent, "agent", None)
|
|
485
|
+
if inner is not None and inner is not agent:
|
|
486
|
+
return get_agent_schema(inner)
|
|
487
|
+
|
|
488
|
+
return None
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fairo
|
|
3
|
-
Version: 25.8.
|
|
3
|
+
Version: 25.8.2
|
|
4
4
|
Summary: SDK for interfacing with Fairo SaaS platform.
|
|
5
5
|
Author-email: "Fairo Systems, Inc." <support@fairo.ai>
|
|
6
6
|
License: Apache-2.0
|
|
@@ -11,7 +11,7 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
11
11
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
12
12
|
Classifier: Operating System :: OS Independent
|
|
13
13
|
Description-Content-Type: text/markdown
|
|
14
|
-
Requires-Dist: mlflow<=3.
|
|
14
|
+
Requires-Dist: mlflow<=3.2.0,>=3.1.0
|
|
15
15
|
Requires-Dist: langchain<0.4.0,>=0.3.20
|
|
16
16
|
Requires-Dist: langchain-aws<0.3.0,>=0.2.18
|
|
17
17
|
Requires-Dist: langchain-community<0.4.0,>=0.3.20
|
fairo-25.8.1/fairo/__init__.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "25.8.1"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|