[Test] Add basic flex flow e2e test #3173
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Please add an informative description that covers that changes made by the pull request and link all relevant issues.
This pull request primarily introduces a new end-to-end test flow for the
promptflow
package. The changes include the creation of a new class-based model configuration, the addition of a new YAML file to specify the entry point for the flow, and the creation of several JSON and JSONL files to define the inputs and test configurations for the flow.New class-based model configuration:
src/promptflow/tests/test_configs/e2e_test_flows/class_based_flex_flow_with_model_config/class_based_model_config.py
: Introduced a new classEvalFlow
that takes anAzureOpenAIModelConfiguration
as an argument. The class includes a__call__
method to evaluate if an expected word is present in a given answer and an__aggregate__
method to calculate the total number of correct results.New YAML file:
src/promptflow/tests/test_configs/e2e_test_flows/class_based_flex_flow_with_model_config/flow.flex.yaml
: Added a new YAML file to specifyEvalFlow
fromclass_based_model_config
as the entry point for the flow.New JSON and JSONL files:
src/promptflow/tests/test_configs/e2e_test_flows/class_based_flex_flow_with_model_config/init.json
: Created a new JSON file to define themodel_config
for the flow, which includes the connection and Azure deployment details.src/promptflow/tests/test_configs/e2e_test_flows/class_based_flex_flow_with_model_config/inputs.jsonl
: Added a new JSONL file to provide the inputs for the flow, which include an answer and an expected word.src/promptflow/tests/test_configs/e2e_test_flows/class_based_flex_flow_with_model_config/test_configs/batch_run_config_1.json
: Created a new JSON file to define the test configurations for a batch run of the flow. The file includes details about the run configurations, assertions, and expected outputs.All Promptflow Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines