Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

HOTFIX: BUG-419: Fix finetune test #433

Open
wants to merge 24 commits into
base: test
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
b3974eb
Update return type so it works with python 3.8 (#390)
lucas-aixplain Feb 7, 2025
5096031
ENG-1557: model params are now available for designer assets (#387)
kadirpekel Feb 7, 2025
cb7f809
ENG-1559: Fixed designer tests (#388)
kadirpekel Feb 7, 2025
1870dea
Use input api key to list models when given (#395)
thiago-aixplain Feb 10, 2025
2b5c9ec
BUG-375 new functional test regarding ensuring failure (#396)
kadirpekel Feb 10, 2025
168f2f5
Role 2 Instructions (#393)
thiago-aixplain Feb 10, 2025
f74a27f
added validate check when s3 link (#399)
ahmetgunduz Feb 13, 2025
9133b78
Merge branch 'test' into development
ikxplain Feb 13, 2025
b7d3538
ENG-1392: SQL tool in Agents (#400)
thiago-aixplain Feb 17, 2025
e53e7af
Eng 1627: Enable mentalist without inspector (#408)
OsujiCC Feb 19, 2025
c9a0f2b
overwrited the data field of parameters with s3 path (#405)
ahmetgunduz Feb 19, 2025
411f04d
ENG-791: Pipeline Response Changes (#282)
xainaz Feb 19, 2025
463beca
BUG-400: pipeline_test tests fixed (#409)
kadirpekel Feb 24, 2025
1acce59
BUG-382: Fixing validation of team and agents (#406)
kadirpekel Feb 24, 2025
d84a606
Setting the version of the pipeline appropriately (#410)
thiago-aixplain Feb 25, 2025
a48fc2d
BUG-382 tests fixed (#415)
kadirpekel Feb 25, 2025
3abe609
Fix ModelFactory.get() calls in agent/team_agent.create() (#411)
lucas-aixplain Feb 26, 2025
78dde57
'tatus ->status bug fixed ' (#416)
ahmetgunduz Feb 26, 2025
1891040
BUG-382: fixed tests (#418)
kadirpekel Feb 26, 2025
3720f64
Merge branch 'test' into development
thiago-aixplain Feb 27, 2025
a4ba161
removed pipeline test file (#425)
xainaz Mar 7, 2025
11001ea
Eng 1392 sqllite (#421)
ahmetgunduz Mar 7, 2025
43a516c
Bug 431 (#429)
kadirpekel Mar 12, 2025
e041dd3
Update finetune functional tests
lucas-aixplain Mar 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
ENG-1557: model params are now available for designer assets (#387)
  • Loading branch information
kadirpekel authored Feb 7, 2025
commit 5096031902cb82ecb14875835c4dcf595f2609da
67 changes: 46 additions & 21 deletions aixplain/modules/pipeline/designer/nodes.py
Original file line number Diff line number Diff line change
@@ -79,17 +79,13 @@ def populate_asset(self):

if self.function:
if self.asset.function.value != self.function:
raise ValueError(f"Function {self.function} is not supported by asset {self.asset_id}")

# Despite function field has been set, we should still dynamically
# populate parameters for Utility functions
if self.function == Function.UTILITIES:
self._auto_populate_params()

raise ValueError(
f"Function {self.function} is not supported by asset {self.asset_id}"
)
else:
self.function = self.asset.function.value
self._auto_populate_params()

self._auto_populate_params()
self._auto_set_params()

def _auto_populate_params(self):
@@ -108,18 +104,29 @@ def _auto_populate_params(self):
)
else:
for item in spec["params"]:
self.inputs.create_param(
if item["code"] not in self.inputs:
self.inputs.create_param(
code=item["code"],
data_type=item["dataType"],
is_required=item["required"],
)

if self.asset.model_params:
for code, param in self.asset.model_params.parameters.items():
if code not in self.inputs:
self.inputs.create_param(
code=code,
is_required=param.required,
value=param.value,
)

for item in spec["output"]:
if item["code"] not in self.outputs:
self.outputs.create_param(
code=item["code"],
data_type=item["dataType"],
is_required=item["required"],
)

for item in spec["output"]:
self.outputs.create_param(
code=item["code"],
data_type=item["dataType"],
)

def _auto_set_params(self):
for k, v in self.asset.additional_info["parameters"].items():
if k not in self.inputs:
@@ -236,7 +243,12 @@ class Output(Node[OutputInputs, OutputOutputs]):
inputs_class: Type[TI] = OutputInputs
outputs_class: Type[TO] = OutputOutputs

def __init__(self, data_types: Optional[List[DataType]] = None, pipeline: "DesignerPipeline" = None, **kwargs):
def __init__(
self,
data_types: Optional[List[DataType]] = None,
pipeline: "DesignerPipeline" = None,
**kwargs
):
super().__init__(pipeline=pipeline, **kwargs)
self.data_types = data_types or []

@@ -297,7 +309,14 @@ class Route(Serializable):
operation: Operation
type: RouteType

def __init__(self, value: DataType, path: List[Union[Node, int]], operation: Operation, type: RouteType, **kwargs):
def __init__(
self,
value: DataType,
path: List[Union[Node, int]],
operation: Operation,
type: RouteType,
**kwargs
):
"""
Post init method to convert the nodes to node numbers if they are
nodes.
@@ -312,7 +331,9 @@ def __init__(self, value: DataType, path: List[Union[Node, int]], operation: Ope
# raise ValueError("Path is not valid, should be a list of nodes")

# convert nodes to node numbers if they are nodes
self.path = [node.number if isinstance(node, Node) else node for node in self.path]
self.path = [
node.number if isinstance(node, Node) else node for node in self.path
]

def serialize(self) -> dict:
return {
@@ -350,7 +371,9 @@ class Router(Node[RouterInputs, RouterOutputs], LinkableMixin):
inputs_class: Type[TI] = RouterInputs
outputs_class: Type[TO] = RouterOutputs

def __init__(self, routes: List[Route], pipeline: "DesignerPipeline" = None, **kwargs):
def __init__(
self, routes: List[Route], pipeline: "DesignerPipeline" = None, **kwargs
):
super().__init__(pipeline=pipeline, **kwargs)
self.routes = routes

@@ -389,7 +412,9 @@ class Decision(Node[DecisionInputs, DecisionOutputs], LinkableMixin):
inputs_class: Type[TI] = DecisionInputs
outputs_class: Type[TO] = DecisionOutputs

def __init__(self, routes: List[Route], pipeline: "DesignerPipeline" = None, **kwargs):
def __init__(
self, routes: List[Route], pipeline: "DesignerPipeline" = None, **kwargs
):
super().__init__(pipeline=pipeline, **kwargs)
self.routes = routes