Skip to content

Commit 1919e4c

Browse files
rakeshkashyap123Rakesh Kashyap Hanasoge Padmanabha
andauthored
Suppressed exceptions api (#1152)
* Add another API for accessing doJoinObsAndFeatures which suppresses exceptions * version bump --------- Co-authored-by: Rakesh Kashyap Hanasoge Padmanabha <rkashyap@rkashyap-mn3.linkedin.biz>
1 parent bbc2af9 commit 1919e4c

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

feathr-impl/src/main/scala/com/linkedin/feathr/offline/client/FeathrClient.scala

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,22 @@ class FeathrClient private[offline] (sparkSession: SparkSession, featureGroups:
8484
-> SuppressedExceptionHandlerUtils.missingDataSuppressedExceptionMsgs))
8585
}
8686

87+
88+
/**
89+
* API which joins features and also returns any suppressed exception msgs.
90+
*
91+
* @param joinConfig feathr offline's [[FeatureJoinConfig]]
92+
* @param obsData Observation data taken in as a [[SparkFeaturizedDataset]].
93+
* @param jobContext [[JoinJobContext]]
94+
* @return Joined observation and feature data as a SparkFeaturizedDataset and a map of suppressed exceptions along with
95+
* type of exception.
96+
*/
97+
def doJoinObsAndFeaturesWithSuppressedExceptions(joinConfig: FeatureJoinConfig, obsData: SparkFeaturizedDataset,
98+
jobContext: JoinJobContext = JoinJobContext()): (SparkFeaturizedDataset, Map[String, String]) = {
99+
(joinFeatures(joinConfig, obsData, jobContext), Map(SuppressedExceptionHandlerUtils.MISSING_DATA_EXCEPTION
100+
-> SuppressedExceptionHandlerUtils.missingDataSuppressedExceptionMsgs))
101+
}
102+
87103
/**
88104
* Generates features by extracting feature data from its source. It returns generated features, the DataFrame for feature data
89105
* and the feature related metadata. The API takes in [[FeatureGenSpec]] as the input, which is expected to contain all the

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
version=1.0.2-rc7
1+
version=1.0.2-rc8
22
SONATYPE_AUTOMATIC_RELEASE=true
33
POM_ARTIFACT_ID=feathr_2.12

0 commit comments

Comments
 (0)