fairo 25.6.1__tar.gz → 25.6.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.

Files changed (45) hide show
  1. {fairo-25.6.1 → fairo-25.6.2}/PKG-INFO +1 -1
  2. {fairo-25.6.1 → fairo-25.6.2}/fairo/core/execution/executor.py +33 -3
  3. {fairo-25.6.1 → fairo-25.6.2}/fairo.egg-info/PKG-INFO +1 -1
  4. {fairo-25.6.1 → fairo-25.6.2}/README.md +0 -0
  5. {fairo-25.6.1 → fairo-25.6.2}/fairo/__init__.py +0 -0
  6. {fairo-25.6.1 → fairo-25.6.2}/fairo/core/__init__.py +0 -0
  7. {fairo-25.6.1 → fairo-25.6.2}/fairo/core/agent/__init__.py +0 -0
  8. {fairo-25.6.1 → fairo-25.6.2}/fairo/core/agent/base_agent.py +0 -0
  9. {fairo-25.6.1 → fairo-25.6.2}/fairo/core/agent/code_analysis_agent.py +0 -0
  10. {fairo-25.6.1 → fairo-25.6.2}/fairo/core/agent/output/__init__.py +0 -0
  11. {fairo-25.6.1 → fairo-25.6.2}/fairo/core/agent/output/base_output.py +0 -0
  12. {fairo-25.6.1 → fairo-25.6.2}/fairo/core/agent/output/google_drive.py +0 -0
  13. {fairo-25.6.1 → fairo-25.6.2}/fairo/core/agent/tools/__init__.py +0 -0
  14. {fairo-25.6.1 → fairo-25.6.2}/fairo/core/agent/tools/base_tools.py +0 -0
  15. {fairo-25.6.1 → fairo-25.6.2}/fairo/core/agent/tools/code_analysis.py +0 -0
  16. {fairo-25.6.1 → fairo-25.6.2}/fairo/core/agent/tools/utils.py +0 -0
  17. {fairo-25.6.1 → fairo-25.6.2}/fairo/core/agent/utils.py +0 -0
  18. {fairo-25.6.1 → fairo-25.6.2}/fairo/core/chat/__init__.py +0 -0
  19. {fairo-25.6.1 → fairo-25.6.2}/fairo/core/chat/chat.py +0 -0
  20. {fairo-25.6.1 → fairo-25.6.2}/fairo/core/client/__init__.py +0 -0
  21. {fairo-25.6.1 → fairo-25.6.2}/fairo/core/client/client.py +0 -0
  22. {fairo-25.6.1 → fairo-25.6.2}/fairo/core/exceptions.py +0 -0
  23. {fairo-25.6.1 → fairo-25.6.2}/fairo/core/execution/__init__.py +0 -0
  24. {fairo-25.6.1 → fairo-25.6.2}/fairo/core/execution/env_finder.py +0 -0
  25. {fairo-25.6.1 → fairo-25.6.2}/fairo/core/models/__init__.py +0 -0
  26. {fairo-25.6.1 → fairo-25.6.2}/fairo/core/models/custom_field_value.py +0 -0
  27. {fairo-25.6.1 → fairo-25.6.2}/fairo/core/models/resources.py +0 -0
  28. {fairo-25.6.1 → fairo-25.6.2}/fairo/core/runnable/__init__.py +0 -0
  29. {fairo-25.6.1 → fairo-25.6.2}/fairo/core/runnable/runnable.py +0 -0
  30. {fairo-25.6.1 → fairo-25.6.2}/fairo/core/workflow/__init__.py +0 -0
  31. {fairo-25.6.1 → fairo-25.6.2}/fairo/core/workflow/base_workflow.py +0 -0
  32. {fairo-25.6.1 → fairo-25.6.2}/fairo/core/workflow/dependency.py +0 -0
  33. {fairo-25.6.1 → fairo-25.6.2}/fairo/core/workflow/utils.py +0 -0
  34. {fairo-25.6.1 → fairo-25.6.2}/fairo/metrics/__init__.py +0 -0
  35. {fairo-25.6.1 → fairo-25.6.2}/fairo/metrics/fairness_object.py +0 -0
  36. {fairo-25.6.1 → fairo-25.6.2}/fairo/metrics/metrics.py +0 -0
  37. {fairo-25.6.1 → fairo-25.6.2}/fairo/settings.py +0 -0
  38. {fairo-25.6.1 → fairo-25.6.2}/fairo/tests/__init__.py +0 -0
  39. {fairo-25.6.1 → fairo-25.6.2}/fairo/tests/test_metrics.py +0 -0
  40. {fairo-25.6.1 → fairo-25.6.2}/fairo.egg-info/SOURCES.txt +0 -0
  41. {fairo-25.6.1 → fairo-25.6.2}/fairo.egg-info/dependency_links.txt +0 -0
  42. {fairo-25.6.1 → fairo-25.6.2}/fairo.egg-info/requires.txt +0 -0
  43. {fairo-25.6.1 → fairo-25.6.2}/fairo.egg-info/top_level.txt +0 -0
  44. {fairo-25.6.1 → fairo-25.6.2}/pyproject.toml +0 -0
  45. {fairo-25.6.1 → fairo-25.6.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fairo
3
- Version: 25.6.1
3
+ Version: 25.6.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
@@ -7,9 +7,13 @@ import logging
7
7
 
8
8
  import mlflow
9
9
 
10
+ from mlflow.models.signature import ModelSignature
11
+ from mlflow.types.schema import Schema, ColSpec
12
+ from fairo.core.agent.base_agent import SimpleAgent
10
13
  from fairo.core.client.client import BaseClient
11
14
  from fairo.core.execution.env_finder import read_variables
12
15
  from fairo.core.runnable.runnable import Runnable
16
+ from fairo.core.workflow.utils import output_workflow_process_graph
13
17
  from fairo.settings import get_fairo_api_key, get_fairo_api_secret, get_mlflow_experiment_name, get_mlflow_server, get_fairo_base_url
14
18
 
15
19
  # Optional interfaces/types
@@ -95,25 +99,51 @@ class FairoExecutor:
95
99
  runnables.append(
96
100
  self._wrap_agent_runnable(agent, agent.input_key, agent.output_key)
97
101
  )
98
-
102
+ first_input_key = self.agents[0].input_key
103
+ last_output_key = self.agents[-1].output_key
99
104
  # Build RunnableSequence from all steps
100
105
  pipeline = runnables[0]
101
106
  for r in runnables[1:]:
102
107
  pipeline = pipeline | r # chaining
103
108
 
109
+ def save_process_graph():
110
+ process_graph = (
111
+ output_workflow_process_graph(self.agents)
112
+ if all(isinstance(agent, SimpleAgent) for agent in self.agents)
113
+ else None
114
+ )
115
+ if len(self.agents) > 1:
116
+ type = "Workflow"
117
+ else:
118
+ type = "Agent"
119
+ fairo_settings = {
120
+ "type": type,
121
+ "process_graph": process_graph,
122
+ }
123
+ if process_graph:
124
+ mlflow.log_text(json.dumps(fairo_settings, ensure_ascii=False, indent=2), artifact_file="fairo_settings.txt")
125
+ save_process_graph()
104
126
  try:
105
127
  # Find environment variables used in the project
106
128
  all_env_vars = read_variables()
107
129
  # Log the file as an artifact
108
- mlflow.log_text(all_env_vars, artifact_file="environment/variables.txt")
130
+ mlflow.log_text(all_env_vars, artifact_file="environment/variables.txt")
109
131
  if self.verbose:
110
132
  logger.info(f"Logged {len(all_env_vars)} environment variables as artifact")
111
133
  except Exception as e:
112
134
  logger.warning(f"Failed to log environment variables: {str(e)}")
113
135
 
136
+ input_schema = Schema([
137
+ ColSpec(type="string", name=first_input_key),
138
+ ])
139
+
140
+ output_schema = Schema([
141
+ ColSpec(type="string", name=last_output_key),
142
+ ])
114
143
  model_info = mlflow.langchain.log_model(
115
144
  pipeline,
116
- artifact_path="agent",
145
+ artifact_path="",
146
+ signature=ModelSignature(inputs=input_schema, outputs=output_schema)
117
147
  )
118
148
  # If runnable object was added, check if it exists, if yes, just set tags for the trace, otherwise create it
119
149
  if self.runnable:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fairo
3
- Version: 25.6.1
3
+ Version: 25.6.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
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