Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

loco test bug fix#423

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
AdamChit wants to merge15 commits intosalesforce:master
base:master
Choose a base branch
Loading
fromAdamChit:achit/LOCO-Test-Bug-Fix

Conversation

@AdamChit
Copy link
Collaborator

Related issues
test refactor made in#412 causes one of the test cases to fail.

Specially this test assumed that at-least 1 of the 4 features would be selectedhttps://github.com/salesforce/TransmogrifAI/blob/master/core/src/test/scala/com/salesforce/op/stages/impl/insights/RecordInsightsLOCOTest.scala#L236

Describe the proposed solution
Test should allow the case where none of the features are picked

Additional context
example of the test failing:
Screen Shot 2019-10-15 at 9 24 36 PM

@codecov
Copy link

codecovbot commentedOct 16, 2019
edited
Loading

Codecov Report

Merging#423 (b4a2116) intomaster (ac83ad7) willdecrease coverage by60.42%.
The diff coverage isn/a.

Impacted file tree graph

@@             Coverage Diff             @@##           master     #423       +/-   ##===========================================- Coverage   86.94%   26.52%   -60.43%===========================================  Files         340      337        -3       Lines       11388    11131      -257       Branches      363      593      +230     ===========================================- Hits         9901     2952     -6949- Misses       1487     8179     +6692
Impacted FilesCoverage Δ
...main/scala/com/salesforce/op/dsl/RichFeature.scala0.00% <0.00%> (-100.00%)⬇️
...main/scala/com/salesforce/op/filters/Summary.scala0.00% <0.00%> (-100.00%)⬇️
.../scala/com/salesforce/op/cli/gen/ProblemKind.scala0.00% <0.00%> (-100.00%)⬇️
...n/scala/com/salesforce/op/dsl/RichSetFeature.scala0.00% <0.00%> (-100.00%)⬇️
.../scala/com/salesforce/op/dsl/RichListFeature.scala0.00% <0.00%> (-100.00%)⬇️
.../scala/com/salesforce/op/stages/impl/package.scala0.00% <0.00%> (-100.00%)⬇️
...cala/com/salesforce/op/cli/gen/FileInProject.scala0.00% <0.00%> (-100.00%)⬇️
...scala/org/apache/spark/util/SparkThreadUtils.scala0.00% <0.00%> (-100.00%)⬇️
...cala/com/salesforce/op/OpWorkflowModelWriter.scala0.00% <0.00%> (-100.00%)⬇️
...cala/com/salesforce/op/evaluators/Evaluators.scala0.00% <0.00%> (-100.00%)⬇️
... and201 more

Continue to review full report at Codecov.

Legend -Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing data
Powered byCodecov. Last updateac83ad7...b6829fe. Read thecomment docs.

Copy link
Collaborator

@tovbinmtovbinm left a comment

Choose a reason for hiding this comment

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

Why would it not pick any features?

it("should pick between1 and 4 of the features") {
all(parsed.map(_.size)) should (be>=1 and be<=4)
it("should pick between0 and 4 features") {
all(parsed.map(_.size)) should (be>=0 and be<=4)
Copy link
Collaborator

Choose a reason for hiding this comment

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

this seems like it is not checking very much... can you do a check for the conditions described above and then do the size check?

AdamChit reacted with thumbs up emoji
@AdamChit
Copy link
CollaboratorAuthor

Why would it not pick any features?

So in the test the labels are generated based on the PickList feature:

        p.value match {          case Some("A") | Some("B") | Some("C") => RealNN(1.0)          case _ => RealNN(0.0)        }      )

And all the features have a chance of being empty:

      val countryData: Seq[Country] = RandomText.countries.withProbabilityOfEmpty(0.3).take(numRows).toList      val pickListData: Seq[PickList] = RandomText.pickLists(domain = List("A", "B", "C", "D", "E", "F", "G"))        .withProbabilityOfEmpty(0.1).limit(numRows)      val currencyData: Seq[Currency] = RandomReal.logNormal[Currency](mean = 10.0, sigma = 1.0)        .withProbabilityOfEmpty(0.3).limit(numRows)

One case that could happen:
2) All the feature are set to empty
3) LOCO changes the pickList from empty to non-empty and because it is not in the set {A,B,C} it isNOT a strong of a predictor
=> label wouldn't change => pickList would not have a strong insight => No feature is selected

Note: the chance of this happening is very low which explains why it doesn't always appear in the CI build.

@AdamChitAdamChit changed the titleAchit/loco test bug fixloco test bug fixOct 19, 2019
@tovbinm
Copy link
Collaborator

@AdamChit are you still working on adding a more robust test?

@tovbinm
Copy link
Collaborator

any updates?@AdamChit

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@tovbinmtovbinmtovbinm left review comments

@leahmcguireleahmcguireleahmcguire left review comments

@gerashegalovgerashegalovAwaiting requested review from gerashegalov

@JauntboxJauntboxAwaiting requested review from Jauntbox

@wsuchywsuchyAwaiting requested review from wsuchy

@crupleycrupleyAwaiting requested review from crupley

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@AdamChit@tovbinm@leahmcguire

[8]ページ先頭

©2009-2025 Movatter.jp