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

Add/upgrade string indexing tests #294

Merged
merged 17 commits into from
Apr 18, 2019

Conversation

crupley
Copy link
Contributor

@crupley crupley commented Apr 17, 2019

Related issues
Improve test coverage for transformers & estimators #278

Describe the proposed solution

  • Separate tests for OpStringIndexer and OpStringIndexerNoFilter
  • Upgrade tests to use Op Transformer/Estimator Spec
    • OpStringIndexerNoFilterTest
    • OpIndexToStringNoFilterTest

Describe alternatives you've considered

Attempted to upgrade OpStringIndexerTest and OpIndexToStringTest but these both extend an wrapper-type class that is not compatible with the new test spec.

Additional context
None

@tovbinm
Copy link
Collaborator

tovbinm commented Apr 17, 2019

@crupley can you elaborate what's not working with the base specs and wrapper stages? (cc @snabar)

Copy link
Collaborator

@tovbinm tovbinm left a comment

Choose a reason for hiding this comment

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

lgtm

@crupley
Copy link
Contributor Author

crupley commented Apr 17, 2019

@tovbinm, The signature of the transformer spec is:

abstract class OpTransformerSpec[O <: FeatureType : WeakTypeTag : ClassTag,
TransformerType <: OpPipelineStage[O] with Transformer with OpTransformer : ClassTag]

The transformer passed must inherit from OpPipelineStage, Transformer, and OpTransformer. OpTransformerWrapper is missing the OpTransformer piece.

@codecov
Copy link

codecov bot commented Apr 17, 2019

Codecov Report

Merging #294 into master will increase coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #294      +/-   ##
==========================================
+ Coverage    86.4%   86.41%   +<.01%     
==========================================
  Files         319      319              
  Lines       10452    10452              
  Branches      346      346              
==========================================
+ Hits         9031     9032       +1     
+ Misses       1421     1420       -1
Impacted Files Coverage Δ
...ce/op/stages/impl/feature/OpOneHotVectorizer.scala 96.77% <ø> (ø) ⬆️
...scala/com/salesforce/op/test/OpEstimatorSpec.scala 93.33% <ø> (ø) ⬆️
...p/stages/impl/feature/TextMapPivotVectorizer.scala 100% <ø> (ø) ⬆️
...ages/impl/feature/MultiPickListMapVectorizer.scala 100% <ø> (ø) ⬆️
...force/op/stages/impl/feature/OpIndexToString.scala 100% <0%> (+50%) ⬆️

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 44ecb7a...17f7381. Read the comment docs.

@tovbinm
Copy link
Collaborator

tovbinm commented Apr 18, 2019

Ha! True. Its actually on purpose :) ok! So we need a new base class for testing wrapped stages then.

@tovbinm tovbinm merged commit ffb9521 into salesforce:master Apr 18, 2019
@tovbinm
Copy link
Collaborator

tovbinm commented Apr 18, 2019

@crupley here you go - #295

@crupley crupley deleted the cr/indextostringtests branch April 26, 2019 16:36
@Jauntbox Jauntbox mentioned this pull request May 2, 2019
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

2 participants