Skip to content
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

Merged
merged 50 commits into from Apr 10, 2020
Merged

Scala yaml parsing #17

merged 50 commits into from Apr 10, 2020

Conversation

jakemannix
Copy link
Contributor

scala makes simple data structs very concise, and it plays nicely with jackson, including the nice:

@JsonIgnoreProperties(ignoreUnknown = true)

annotation!

darshshah and others added 30 commits March 11, 2020 14:07
case class FeatureConfig(@JsonProperty("node_name") nodeName: String,
@JsonProperty("dtype") dTypeString: String,
@JsonProperty("serving_info") servingConfig: ServingConfig,
@JsonProperty("default_value") defaultValue: String,
Copy link
Contributor

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).

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Contributor

@darshshah darshshah left a 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.

@@ -10,6 +10,10 @@
<artifactId>ml4ir-inference</artifactId>
<packaging>jar</packaging>

<properties>
<jackson.version>2.7.5</jackson.version>
Copy link
Contributor

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

Copy link
Contributor

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>
Copy link
Contributor

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

@jakemannix jakemannix changed the base branch from model_features_parsing_cleanup to master April 10, 2020 02:40
Copy link
Contributor Author

@jakemannix jakemannix left a 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?

@darshshah
Copy link
Contributor

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.

Copy link
Contributor

@darshshah darshshah left a 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 !

@jakemannix
Copy link
Contributor Author

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.

I can remove it and put it on another branch. Cleaner that way

@darshshah
Copy link
Contributor

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.

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

@jakemannix jakemannix merged commit bdf1355 into master Apr 10, 2020
@lastmansleeping lastmansleeping deleted the scala_yaml_parsing branch February 15, 2022 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants