Skip to content

Commit

Permalink
@W-8863563 bump major version (#24)
Browse files Browse the repository at this point in the history
major version bump because new feature added breaks backwards compatibility
  • Loading branch information
mrunfeldt authored and GitHub Enterprise committed Sep 27, 2021
1 parent dad8f94 commit fbfccb7
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,12 @@ class OpWorkflowModelReaderWriterTest
val jsonModel = parse(OpWorkflowModelWriter.toJson(wfM, saveModelPath))
}

trait OldVectorizedFlow extends UIDReset {
val cat = Seq(gender, boarded, height, age, description).transmogrify()
val catHead = cat.map[Real](new OpWorkflowModelReaderWriterTest.CatHeadFn)
val wf = new OpWorkflow().setParameters(workflowParams).setResultFeatures(catHead)
}

trait VectorizedFlow extends UIDReset {
val catHead = rawFeatures.transmogrify().map[Real](new OpWorkflowModelReaderWriterTest.CatHeadFn)
val wf = new OpWorkflow().setParameters(workflowParams).setResultFeatures(catHead)
Expand Down Expand Up @@ -331,6 +337,29 @@ class OpWorkflowModelReaderWriterTest
assert(copy, wfM)
}

ignore should "load a old version of a saved model" in new OldVectorizedFlow {
val wfM = wf.loadModel("src/test/resources/OldModelVersion",
modelStagingDir = modelStagingDir)
wfM.getBlocklist().isEmpty shouldBe true
}

ignore should "load an old version of a saved model (v0.5.1)" in new OldVectorizedFlow {
// note: in these old models, raw feature filter config will be set to the config defaults
// but we never re-initialize raw feature filter when loading a model (only scoring, no training)
val wfM = wf.loadModel("src/test/resources/OldModelVersion_0_5_1",
modelStagingDir = modelStagingDir)
wfM.getRawFeatureFilterResults().rawFeatureFilterMetrics shouldBe empty
wfM.getRawFeatureFilterResults().exclusionReasons shouldBe empty
}

ignore should "load an old version of a saved model (v0.7.1)" in new VectorizedFlow {
// note: in these old models, "blocklist" was still called "blacklist"
val wfM = wf.loadModel("src/test/resources/OldModelVersion_0_7_1",
modelStagingDir = modelStagingDir)
wfM.getBlocklistMapKeys() should not be empty
wfM.getBlocklist() should not be empty
}

def assert(f1: Array[OPFeature], f2: Array[OPFeature]): Unit = {
f1.length shouldBe f2.length
f1.sortBy(_.uid) should contain theSameElementsAs f2.sortBy(_.uid)
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version=0.8.0-sfdc-spark-3.1.1-20210901
version=1.0.0-sfdc-spark-3.1.1-20210927
group=com.salesforce.transmogrifai
org.gradle.caching=true
scalaVersions=2.12.13
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<groupId>com.salesforce.hawking.transmogrifai</groupId>
<artifactId>TransmogrifAI</artifactId>
<version>0.8.0-sfdc-spark-3.1.1-20210901</version>
<version>1.0.0-sfdc-spark-3.1.1-20210927</version>
<name>TransmogrifAI</name>
<description>AutoML library for building modular, reusable, strongly typed machine learning workflows on Spark with minimal hand tuning</description>
<url>https://github.com/salesforce/TransmogrifAI</url>
Expand Down

0 comments on commit fbfccb7

Please sign in to comment.