Skip to content

Commit

Permalink
made function interface consistent with underlying delegation call (#…
Browse files Browse the repository at this point in the history
…1156)

Co-authored-by: Anirudh Agarwal <aniagarwal@linkedin.biz>
  • Loading branch information
anirudhagar13 and Anirudh Agarwal committed Apr 28, 2023
1 parent 1b117d3 commit fb114c9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,23 +84,6 @@ class FeathrClient private[offline] (sparkSession: SparkSession, featureGroups:
-> SuppressedExceptionHandlerUtils.missingDataSuppressedExceptionMsgs))
}


/**
* API which joins features and also returns any suppressed exception msgs.
*
* @param joinConfig feathr offline's [[FeatureJoinConfig]]
* @param obsData Observation data taken in as a [[SparkFeaturizedDataset]].
* @param jobContext [[JoinJobContext]]
* @return Joined observation and feature data as a SparkFeaturizedDataset and a map of suppressed exceptions along with
* type of exception.
*/
def doJoinObsAndFeaturesWithSuppressedExceptions(joinConfig: FeatureJoinConfig, obsData: SparkFeaturizedDataset,
jobContext: JoinJobContext = JoinJobContext()): (DataFrame, Header, Map[String, String]) = {
val res = doJoinObsAndFeatures(joinConfig, jobContext, obsData.data)
(res._1, res._2, Map(SuppressedExceptionHandlerUtils.MISSING_DATA_EXCEPTION
-> SuppressedExceptionHandlerUtils.missingDataSuppressedExceptionMsgs))
}

/**
* Generates features by extracting feature data from its source. It returns generated features, the DataFrame for feature data
* and the feature related metadata. The API takes in [[FeatureGenSpec]] as the input, which is expected to contain all the
Expand Down Expand Up @@ -232,6 +215,23 @@ class FeathrClient private[offline] (sparkSession: SparkSession, featureGroups:
(joinedDF, header)
}

/**
* API which joins features and also returns any suppressed exception msgs.
*
* @param joinConfig feathr offline's [[FeatureJoinConfig]]
* @param obsData Observation data taken in as a [[SparkFeaturizedDataset]].
* @param jobContext [[JoinJobContext]]
* @return Joined observation and feature data as a SparkFeaturizedDataset and a map of suppressed exceptions along with
* type of exception.
*/
private[offline] def doJoinObsAndFeaturesWithSuppressedExceptions(joinConfig: FeatureJoinConfig, jobContext: JoinJobContext,
obsData: DataFrame): (DataFrame, Header, Map[String, String]) = {

val (joinedDF, header) = doJoinObsAndFeatures(joinConfig, jobContext, obsData)
(joinedDF, header, Map(SuppressedExceptionHandlerUtils.MISSING_DATA_EXCEPTION
-> SuppressedExceptionHandlerUtils.missingDataSuppressedExceptionMsgs))
}

/**
* Find feature names that are the same as the field names (from observation data)
* @param keyTaggedFeatures request features
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
version=1.0.2-rc9
version=1.0.2-rc10
SONATYPE_AUTOMATIC_RELEASE=true
POM_ARTIFACT_ID=feathr_2.12

0 comments on commit fb114c9

Please sign in to comment.