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

fix: Unable to run saveNativeModel for VWRegressionModel #1364 #1366

Merged
merged 2 commits into from
Jan 28, 2022

Conversation

memoryz
Copy link
Contributor

@memoryz memoryz commented Jan 26, 2022

No description provided.

@memoryz memoryz linked an issue Jan 26, 2022 that may be closed by this pull request
@memoryz
Copy link
Contributor Author

memoryz commented Jan 26, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@@ -228,7 +228,7 @@ class BinaryOutputWriter(val path: String,
override def write(row: InternalRow): Unit = {
val bytes = row.getBinary(bytesCol)
val filename = row.getString(pathCol)
val nonTempPath = new Path(path).getParent.getParent.getParent.getParent.getParent
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bunch of .getParent calls are unnecessary. Spark's output committer will move the files to the main output directory. Having these calls doesn't work in cloud environment.

Comment on lines +67 to 78
@annotation.tailrec
private def catchFlakiness[T](times: Int)(f: => Option[T]): Option[T] = {
try {
Try {
f
} catch {
case e: NullPointerException if times >= 1 =>
logWarning("caught null pointer exception due to jvm bug", e)
} match {
case Success(x) => x
case Failure(exception: NullPointerException) if times >= 1 =>
logWarning("caught null pointer exception due to jvm bug", exception)
catchFlakiness(times - 1)(f)
case _: Exception =>
None
case _ => None
}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not related to the bug fix, but changed the function into functional style and add tailrec annotation.

@codecov-commenter
Copy link

codecov-commenter commented Jan 26, 2022

Codecov Report

Merging #1366 (cd54085) into master (be49658) will increase coverage by 0.07%.
The diff coverage is 70.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1366      +/-   ##
==========================================
+ Coverage   84.77%   84.85%   +0.07%     
==========================================
  Files         287      287              
  Lines       14230    14230              
  Branches      732      731       -1     
==========================================
+ Hits        12064    12075      +11     
+ Misses       2166     2155      -11     
Impacted Files Coverage Δ
...spark/ml/source/image/PatchedImageFileFormat.scala 88.88% <57.14%> (ø)
.../azure/synapse/ml/io/binary/BinaryFileFormat.scala 98.86% <100.00%> (ø)
...ft/azure/synapse/ml/vw/VowpalWabbitBaseModel.scala 100.00% <100.00%> (ø)
.../execution/streaming/continuous/HTTPSourceV2.scala 92.80% <0.00%> (+0.71%) ⬆️
...osoft/azure/synapse/ml/core/utils/AsyncUtils.scala 80.00% <0.00%> (+5.00%) ⬆️
...crosoft/azure/synapse/ml/io/http/HTTPClients.scala 80.00% <0.00%> (+6.66%) ⬆️
...ala/org/apache/spark/ml/param/DataFrameParam.scala 87.50% <0.00%> (+16.66%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update be49658...cd54085. Read the comment docs.

Copy link
Collaborator

@eisber eisber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VW changes look good to me. Assume this ran through a unit test?

@memoryz
Copy link
Contributor Author

memoryz commented Jan 26, 2022

VW changes look good to me. Assume this ran through a unit test?

yes. The function is covered by unit test and gets run in CI build.

@memoryz
Copy link
Contributor Author

memoryz commented Jan 26, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@memoryz
Copy link
Contributor Author

memoryz commented Jan 26, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@memoryz
Copy link
Contributor Author

memoryz commented Jan 26, 2022

@eisber Markus, the merge is blocked because it requires Mark's approval as well and he's out of office. Can you force merge?

@eisber
Copy link
Collaborator

eisber commented Jan 26, 2022

unfortunately I cannot. maybe @serena-ruan can help?

@mhamilton723 mhamilton723 merged commit 865d189 into microsoft:master Jan 28, 2022
@memoryz memoryz deleted the jasowang/iss1364 branch July 21, 2022 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to run saveNativeModel for VWRegressionModel
4 participants