New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scala yaml parsing #17
Conversation
… *want* the proto builder to be doing.
…_building_update_wip
…th required=False
…ference signature
jvm/ml4ir-inference/src/main/scala/ml4ir/inference/tensorflow/data/FeaturePreprocessor.scala
Show resolved
Hide resolved
jvm/ml4ir-inference/src/main/scala/ml4ir/inference/tensorflow/data/FeatureProcessors.scala
Outdated
Show resolved
Hide resolved
jvm/ml4ir-inference/src/main/scala/ml4ir/inference/tensorflow/data/FeaturesConfigHelper.scala
Outdated
Show resolved
Hide resolved
case class FeatureConfig(@JsonProperty("node_name") nodeName: String, | ||
@JsonProperty("dtype") dTypeString: String, | ||
@JsonProperty("serving_info") servingConfig: ServingConfig, | ||
@JsonProperty("default_value") defaultValue: String, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With this, we are NOT moving default_value under serving_info. Is this something we stick with for now? We can update it in v2 but this will have a cascading effect later on (i.e. changes to yaml and backward compatibility).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, we can do either way - what did we say we wanted to do? I can change it to whatever way we want the config to be. I didn't want to break any current configs.
We don't need to worry about backwards compatibility until this ships, and even then, until a major version of ml4ir ships, we can change, as long as we know models go out with new jars as needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's move this under serving_info to make it future safe as we may have defaults during training time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also update the model_features.yaml to move the default_value under serving_info.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jakemannix I have reviewed this code and left some comments. It looks in good shape. One thing to update is the ModelExecutorConfig and also both poms (make it 0.0.2-SNAPSHOT so that I can publish 0.0.2 and send a PR for 0.0.3-SNAPSHOT). Otherwise, you can also merge #11 in your branch.
…e python side, then these unit tests should pass.
jvm/ml4ir-inference/pom.xml
Outdated
@@ -10,6 +10,10 @@ | |||
<artifactId>ml4ir-inference</artifactId> | |||
<packaging>jar</packaging> | |||
|
|||
<properties> | |||
<jackson.version>2.7.5</jackson.version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update this to 2.10.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can re-use the jackson version from parent's pom instead of mentioning it here again. But we have to use 2.10.0 (as this version is not compatible with spring)
jvm/pom.xml
Outdated
@@ -13,6 +13,7 @@ | |||
<scala.version>2.11.8</scala.version> | |||
<scala.artifact.suffix>2.11</scala.artifact.suffix> | |||
<tensorflow.version>1.15.0</tensorflow.version> | |||
<jackson.version>2.7.5</jackson.version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2.10.0 here as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@darshshah this now hopefully has all of your suggestions, plus is rebased against master. Try building it and seeing how it works for you?
jvm/ml4ir-inference/src/main/scala/ml4ir/inference/tensorflow/data/SequenceExampleBuilder.scala
Outdated
Show resolved
Hide resolved
jvm/ml4ir-inference/src/main/scala/ml4ir/inference/tensorflow/data/TFRecordIO.scala
Outdated
Show resolved
Hide resolved
Some of the code in GenericSequenceExampleBuildingTest.scala is not used in any tests. E.g. serializeTestData/sampleSequenceExamples, etc. Ideally, we should remove such code but I think we are planning to create a test case using this in the next iteration. So we can keep it for now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR has code/changes from all the currently open JVM PRs. Approving this. Great job @jakemannix !
I can remove it and put it on another branch. Cleaner that way |
Sounds good. Let's do that so that we have a clean 0.0.2 |
scala makes simple data structs very concise, and it plays nicely with jackson, including the nice:
annotation!