Skip to content

Commit

Permalink
update metric test
Browse files Browse the repository at this point in the history
Signed-off-by: mgqa34 <mgq3374541@163.com>
  • Loading branch information
mgqa34 committed Jun 21, 2023
1 parent 4634de6 commit a21b9d7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions python/fate/components/components/multi_model_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
@cpn.json_model_outputs("json_model_outputs", roles=[LOCAL])
@cpn.model_directory_output("model_directory_output", roles=[LOCAL])
@cpn.model_directory_outputs("model_directory_outputs", roles=[LOCAL])
@cpn.json_metric_output("json_metric_output", roles=[LOCAL])
@cpn.json_metric_outputs("json_metric_outputs", roles=[LOCAL])
def multi_model_test(
ctx,
role: Role,
Expand All @@ -36,6 +38,8 @@ def multi_model_test(
json_model_outputs,
model_directory_output,
model_directory_outputs,
json_metric_output,
json_metric_outputs,
):
dataframe_input = dataframe_input + 1

Expand All @@ -61,3 +65,8 @@ def multi_model_test(
fw.write("test for model directory output\n")

directory_output.write_metadata({f"model_directory_output_{i}_metadata": f"test_directory_{i}"})

json_metric_output.write({"metric_single": {"data": [1, 2, 3]}}, metadata={"bbb": 2})
for i in range(4):
metric_output = next(json_metric_outputs)
metric_output.write({f"metric_multi_{i}": {"data": [0] for _ in range(i * 10)}}, metadata={"bbb": 2})

0 comments on commit a21b9d7

Please sign in to comment.