Skip to content

Commit 944b03f

Browse files
feat: add eval metrics types to get_experiment_df (#1648)
Co-authored-by: sina chavoshi <[email protected]>
1 parent 83da8c5 commit 944b03f

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

google/cloud/aiplatform/metadata/constants.py

+3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
SYSTEM_PIPELINE = "system.Pipeline"
2323
SYSTEM_PIPELINE_RUN = "system.PipelineRun"
2424
SYSTEM_METRICS = "system.Metrics"
25+
GOOGLE_CLASSIFICATION_METRICS = "google.ClassificationMetrics"
26+
GOOGLE_REGRESSION_METRICS = "google.RegressionMetrics"
27+
GOOGLE_FORECASTING_METRICS = "google.ForecastingMetrics"
2528

2629
_EXPERIMENTS_V2_TENSORBOARD_RUN = "google.VertexTensorboardRun"
2730

google/cloud/aiplatform/pipeline_jobs.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -639,10 +639,14 @@ def _query_experiment_row(
639639
credentials=node.credentials,
640640
filter=metadata_utils._make_filter_string(
641641
in_context=[node.resource_name],
642-
schema_title=metadata_constants.SYSTEM_METRICS,
642+
schema_title=[
643+
metadata_constants.SYSTEM_METRICS,
644+
metadata_constants.GOOGLE_CLASSIFICATION_METRICS,
645+
metadata_constants.GOOGLE_REGRESSION_METRICS,
646+
metadata_constants.GOOGLE_FORECASTING_METRICS,
647+
],
643648
),
644649
)
645-
646650
row = experiment_resources._ExperimentRow(
647651
experiment_run_type=node.schema_title, name=node.display_name
648652
)

tests/unit/aiplatform/test_metadata.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -1352,7 +1352,12 @@ def test_get_experiment_df(
13521352

13531353
expected_filter = metadata_utils._make_filter_string(
13541354
in_context=[_TEST_PIPELINE_CONTEXT.name],
1355-
schema_title=constants.SYSTEM_METRICS,
1355+
schema_title=[
1356+
constants.SYSTEM_METRICS,
1357+
constants.GOOGLE_CLASSIFICATION_METRICS,
1358+
constants.GOOGLE_REGRESSION_METRICS,
1359+
constants.GOOGLE_FORECASTING_METRICS,
1360+
],
13561361
)
13571362

13581363
list_artifact_mock_for_experiment_dataframe.assert_has_calls(

0 commit comments

Comments
 (0)