refactor(ingestion): Browse Paths Upgrade V2 Feast & Sagemaker (#6002)

This commit is contained in:
John Joyce 2022-12-21 08:02:59 -08:00 committed by GitHub
parent 9cb1eed6e7
commit 2e3a25123d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 24 additions and 32 deletions

View File

@ -91,7 +91,7 @@ class FeatureGroupProcessor:
feature_group_snapshot = MLFeatureTableSnapshot( feature_group_snapshot = MLFeatureTableSnapshot(
urn=builder.make_ml_feature_table_urn("sagemaker", feature_group_name), urn=builder.make_ml_feature_table_urn("sagemaker", feature_group_name),
aspects=[ aspects=[
BrowsePathsClass(paths=[f"/sagemaker/{feature_group_name}"]), BrowsePathsClass(paths=["/sagemaker"]),
], ],
) )

View File

@ -406,7 +406,7 @@ class JobProcessor:
"jobType": job_type.value, "jobType": job_type.value,
}, },
), ),
BrowsePathsClass(paths=[f"/{job_type.value}/{name}"]), BrowsePathsClass(paths=[f"/{job_type.value}"]),
], ],
) )

View File

@ -284,7 +284,7 @@ class ModelProcessor:
}, },
), ),
OwnershipClass(owners), OwnershipClass(owners),
BrowsePathsClass(paths=[f"/sagemaker/{group_name}"]), BrowsePathsClass(paths=["/sagemaker"]),
], ],
) )
@ -432,13 +432,11 @@ class ModelProcessor:
for x in model_group_names for x in model_group_names
] ]
model_browsepaths = [ model_browsepaths = [f"/sagemaker/{x}" for x in model_group_names]
f"/sagemaker/{x}/{model_details['ModelName']}" for x in model_group_names
]
# if model is not in any groups, set a single browsepath with the model as the first entity # if model is not in any groups, set a single browsepath with the model as the first entity
if not model_browsepaths: if not model_browsepaths:
model_browsepaths.append(f"/sagemaker/{model_details['ModelName']}") model_browsepaths.append("/sagemaker")
model_snapshot = MLModelSnapshot( model_snapshot = MLModelSnapshot(
urn=builder.make_ml_model_urn( urn=builder.make_ml_model_urn(

View File

@ -301,9 +301,7 @@ class FeastRepositorySource(Source):
feature_view_snapshot = MLFeatureTableSnapshot( feature_view_snapshot = MLFeatureTableSnapshot(
urn=builder.make_ml_feature_table_urn("feast", feature_view_name), urn=builder.make_ml_feature_table_urn("feast", feature_view_name),
aspects=[ aspects=[
BrowsePathsClass( BrowsePathsClass(paths=[f"/feast/{self.feature_store.project}"]),
paths=[f"/feast/{self.feature_store.project}/{feature_view_name}"]
),
StatusClass(removed=False), StatusClass(removed=False),
], ],
) )
@ -342,11 +340,7 @@ class FeastRepositorySource(Source):
on_demand_feature_view_snapshot = MLFeatureTableSnapshot( on_demand_feature_view_snapshot = MLFeatureTableSnapshot(
urn=builder.make_ml_feature_table_urn("feast", on_demand_feature_view_name), urn=builder.make_ml_feature_table_urn("feast", on_demand_feature_view_name),
aspects=[ aspects=[
BrowsePathsClass( BrowsePathsClass(paths=[f"/feast/{self.feature_store.project}"]),
paths=[
f"/feast/{self.feature_store.project}/{on_demand_feature_view_name}"
]
),
StatusClass(removed=False), StatusClass(removed=False),
], ],
) )

View File

@ -173,7 +173,7 @@
{ {
"com.linkedin.pegasus2avro.common.BrowsePaths": { "com.linkedin.pegasus2avro.common.BrowsePaths": {
"paths": [ "paths": [
"/feast/feature_store/feature_store.driver_hourly_stats" "/feast/feature_store"
] ]
} }
}, },
@ -286,7 +286,7 @@
{ {
"com.linkedin.pegasus2avro.common.BrowsePaths": { "com.linkedin.pegasus2avro.common.BrowsePaths": {
"paths": [ "paths": [
"/feast/feature_store/feature_store.transformed_conv_rate" "/feast/feature_store"
] ]
} }
}, },

View File

@ -77,7 +77,7 @@
{ {
"com.linkedin.pegasus2avro.common.BrowsePaths": { "com.linkedin.pegasus2avro.common.BrowsePaths": {
"paths": [ "paths": [
"/sagemaker/test-2" "/sagemaker"
] ]
} }
}, },
@ -193,7 +193,7 @@
{ {
"com.linkedin.pegasus2avro.common.BrowsePaths": { "com.linkedin.pegasus2avro.common.BrowsePaths": {
"paths": [ "paths": [
"/sagemaker/test-1" "/sagemaker"
] ]
} }
}, },
@ -290,7 +290,7 @@
{ {
"com.linkedin.pegasus2avro.common.BrowsePaths": { "com.linkedin.pegasus2avro.common.BrowsePaths": {
"paths": [ "paths": [
"/sagemaker/test" "/sagemaker"
] ]
} }
}, },
@ -904,7 +904,7 @@
{ {
"com.linkedin.pegasus2avro.common.BrowsePaths": { "com.linkedin.pegasus2avro.common.BrowsePaths": {
"paths": [ "paths": [
"/auto_ml/an-auto-ml-job" "/auto_ml"
] ]
} }
}, },
@ -986,7 +986,7 @@
{ {
"com.linkedin.pegasus2avro.common.BrowsePaths": { "com.linkedin.pegasus2avro.common.BrowsePaths": {
"paths": [ "paths": [
"/compilation/a-compilation-job" "/compilation"
] ]
} }
}, },
@ -1069,7 +1069,7 @@
{ {
"com.linkedin.pegasus2avro.common.BrowsePaths": { "com.linkedin.pegasus2avro.common.BrowsePaths": {
"paths": [ "paths": [
"/edge_packaging/an-edge-packaging-job" "/edge_packaging"
] ]
} }
}, },
@ -1149,7 +1149,7 @@
{ {
"com.linkedin.pegasus2avro.common.BrowsePaths": { "com.linkedin.pegasus2avro.common.BrowsePaths": {
"paths": [ "paths": [
"/hyper_parameter_tuning/a-hyper-parameter-tuning-job" "/hyper_parameter_tuning"
] ]
} }
}, },
@ -1229,7 +1229,7 @@
{ {
"com.linkedin.pegasus2avro.common.BrowsePaths": { "com.linkedin.pegasus2avro.common.BrowsePaths": {
"paths": [ "paths": [
"/labeling/a-labeling-job" "/labeling"
] ]
} }
}, },
@ -1318,7 +1318,7 @@
{ {
"com.linkedin.pegasus2avro.common.BrowsePaths": { "com.linkedin.pegasus2avro.common.BrowsePaths": {
"paths": [ "paths": [
"/processing/a-processing-job" "/processing"
] ]
} }
}, },
@ -1425,7 +1425,7 @@
{ {
"com.linkedin.pegasus2avro.common.BrowsePaths": { "com.linkedin.pegasus2avro.common.BrowsePaths": {
"paths": [ "paths": [
"/training/a-training-job" "/training"
] ]
} }
}, },
@ -1517,7 +1517,7 @@
{ {
"com.linkedin.pegasus2avro.common.BrowsePaths": { "com.linkedin.pegasus2avro.common.BrowsePaths": {
"paths": [ "paths": [
"/transform/a-transform-job" "/transform"
] ]
} }
}, },
@ -1641,7 +1641,7 @@
{ {
"com.linkedin.pegasus2avro.common.BrowsePaths": { "com.linkedin.pegasus2avro.common.BrowsePaths": {
"paths": [ "paths": [
"/sagemaker/a-model-package-group" "/sagemaker"
] ]
} }
} }
@ -1720,7 +1720,7 @@
{ {
"com.linkedin.pegasus2avro.common.BrowsePaths": { "com.linkedin.pegasus2avro.common.BrowsePaths": {
"paths": [ "paths": [
"/sagemaker/a-model-package-group/the-first-model" "/sagemaker/a-model-package-group"
] ]
} }
} }
@ -1802,7 +1802,7 @@
{ {
"com.linkedin.pegasus2avro.common.BrowsePaths": { "com.linkedin.pegasus2avro.common.BrowsePaths": {
"paths": [ "paths": [
"/sagemaker/a-model-package-group/the-second-model" "/sagemaker/a-model-package-group"
] ]
} }
} }
@ -1812,4 +1812,4 @@
"proposedDelta": null, "proposedDelta": null,
"systemMetadata": null "systemMetadata": null
} }
] ]