AgentFlow v0.1.1 Release Notes
π Major Updates
1. Workflow Transform Functions
Core Updates
- β¨ Updated transform functions to accept both step and context parameters
- π§ Added feature engineering transform with StandardScaler support
- π οΈ Added outlier removal transform with IsolationForest support
Testing Improvements
- β Added comprehensive unit tests for transform functions
- π Added performance tests for workflow execution
- π Enhanced test coverage and error handling tests
2. Documentation Updates
- π Updated all README files with latest version information
- π‘ Added detailed examples for transform functions
- π Improved API documentation and usage guides
3. Error Handling
- β‘ Enhanced validation for transform function parameters
- π Improved error messages and debugging information
- π Added retry policies for workflow steps
π Breaking Changes
Transform functions now require both step and context parameters:
async def your_transform(
step: WorkflowStep,
context: Dict[str, Any]
) -> Dict[str, Any]:
"""Transform function with new parameter structure.
Args:
step: The workflow step being executed
context: The execution context containing the data
Returns:
Dict containing the transformed data
"""
return {"data": transformed_data}π Migration Guide
- Update your transform functions:
# Before
async def old_transform(data: Dict[str, Any]) -> Dict[str, Any]:
return {"data": process(data)}
# After
async def new_transform(step: WorkflowStep, context: Dict[str, Any]) -> Dict[str, Any]:
data = context["data"]
return {"data": process(data)}- Update your workflow configurations:
# Before
workflow_config = WorkflowConfig(
steps=[
WorkflowStep(
id="step-1",
type=WorkflowStepType.TRANSFORM,
config={"strategy": "standard"}
)
]
)
# After
workflow_config = WorkflowConfig(
steps=[
WorkflowStep(
id="step-1",
type=WorkflowStepType.TRANSFORM,
config=StepConfig(
strategy="standard",
params={"execute": new_transform}
)
)
]
)π― Examples
Feature Engineering Transform
async def feature_engineering_transform(step: WorkflowStep, context: Dict[str, Any]) -> Dict[str, Any]:
data = context["data"]
scaler = StandardScaler(
with_mean=step.config.params["with_mean"],
with_std=step.config.params["with_std"]
)
transformed_data = scaler.fit_transform(data)
return {"data": transformed_data}Outlier Removal Transform
async def outlier_removal_transform(step: WorkflowStep, context: Dict[str, Any]) -> Dict[str, Any]:
data = context["data"]
iso_forest = IsolationForest(
contamination=step.config.params["threshold"],
random_state=42
)
predictions = iso_forest.fit_predict(data)
filtered_data = data[predictions == 1]
return {"data": filtered_data}π Additional Notes
- All tests have been updated to reflect the new parameter structure
- Documentation has been updated with new examples
- Error messages now provide more context about parameter requirements