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

Skip writing empty stages & skip loading stages without uid-s #282

Merged
merged 2 commits into from
Apr 12, 2019

Conversation

tovbinm
Copy link
Collaborator

@tovbinm tovbinm commented Apr 12, 2019

Related issues
Follows up on #281.
Every stage must have a UID, if so some reason uid field is missing from the model json currently we fail miserably.

Describe the proposed solution
As precaution: 1) skip saving empty stages 2) skip reading stages without uid-s

@tovbinm tovbinm requested a review from leahmcguire as a code owner April 12, 2019 13:58
@tovbinm tovbinm changed the title As precaution - skip stages without uid-s Skip loading stages without uid-s Apr 12, 2019
@tovbinm tovbinm requested a review from wsuchy April 12, 2019 14:00
@codecov
Copy link

codecov bot commented Apr 12, 2019

Codecov Report

Merging #282 into master will increase coverage by 0.02%.
The diff coverage is 87.5%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #282      +/-   ##
==========================================
+ Coverage   86.39%   86.42%   +0.02%     
==========================================
  Files         319      319              
  Lines       10448    10450       +2     
  Branches      353      555     +202     
==========================================
+ Hits         9027     9031       +4     
+ Misses       1421     1419       -2
Impacted Files Coverage Δ
...cala/com/salesforce/op/OpWorkflowModelWriter.scala 100% <100%> (ø) ⬆️
...cala/com/salesforce/op/OpWorkflowModelReader.scala 94.44% <83.33%> (+0.1%) ⬆️
...es/src/main/scala/com/salesforce/op/OpParams.scala 89.79% <0%> (+4.08%) ⬆️

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 1b097d4...0ba2a49. Read the comment docs.

@tovbinm tovbinm changed the title Skip loading stages without uid-s Skip writing empty stages & skip loading stages without uid-s Apr 12, 2019
Copy link
Contributor

@wsuchy wsuchy left a comment

Choose a reason for hiding this comment

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

LGTM, as long as it is intended to silently omit stages without uid

@tovbinm
Copy link
Collaborator Author

tovbinm commented Apr 12, 2019

@wsuchy every Spark org.apache.spark.ml.PipelineStage extends Params, which extends Identifiable which requires val uid: String - https://github.com/apache/spark/blob/master/mllib/src/main/scala/org/apache/spark/ml/util/Identifiable.scala#L39

@tovbinm tovbinm merged commit 0e64ff6 into master Apr 12, 2019
@tovbinm tovbinm deleted the mt/precaution-for-missing-uids branch April 12, 2019 17:22
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.

2 participants