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
[hail][wip] Local ld prune ptype #6425
Conversation
@akotlar can you rebase and remove stacked tag? Let's get this in |
Yep, would like to issue the infer ptype wip PR first, targeting today |
rebased. one merge change in |
working on it now |
Still not satisfied with my understanding of the landscape (namely why my changes in LDPruneSuite prior to last commit were failing), but passes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small fixes
@@ -357,7 +356,7 @@ case class LocalLDPrune( | |||
it.map { rv => | |||
region.clear() | |||
rvb.set(region) | |||
rvb.start(tableType.rowType.physicalType) | |||
rvb.start(tableType.canonicalPType) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be bpvType I think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also the canonicalRVDType above should be RVDType(bpvType, Array("locus", "alleles"))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't yet understand this section of code well, but making the following changes results in an error in the r2 test
(added rvb.addFields(bpvType, rv, fieldIndicesToAdd)
, rvdLP.mapPartitions( RVDType(bpvType, Array("locus", "alleles")) )
val fieldIndicesToAdd = Array("locus", "alleles", "mean", "centered_length_rec")
.map(field => bpvType.fieldIdx(field))
val sitesOnly = rvdLP.mapPartitions(
RVDType(bpvType, Array("locus", "alleles"))
)({ it =>
val region = Region()
val rvb = new RegionValueBuilder(region)
val newRV = RegionValue(region)
it.map { rv =>
region.clear()
rvb.set(region)
rvb.start(bpvType)
rvb.startStruct()
rvb.addFields(bpvType, rv, fieldIndicesToAdd)
rvb.endStruct()
newRV.setOffset(rvb.end())
newRV
}
})
Gradle suite > Gradle test > is.hail.methods.LocalLDPruneSuite.testIsLocallyUncorrelated FAILED
java.lang.IllegalArgumentException at LocalLDPruneSuite.scala:355
Running test: Test method testR2(is.hail.methods.LocalLDPruneSuite)
Tired, not thinking clearly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will finish digging through tomorrow:
java.lang.IllegalArgumentException: requirement failed
at scala.Predef$.require(Predef.scala:212)
at is.hail.expr.ir.TableValue.<init>(TableValue.scala:45)
at is.hail.methods.LocalLDPrune.execute(LocalLDPrune.scala:368)
at is.hail.methods.LocalLDPrune$$anonfun$apply$3.apply(LocalLDPrune.scala:286)
at is.hail.methods.LocalLDPrune$$anonfun$apply$3.apply(LocalLDPrune.scala:284)
at is.hail.expr.ir.ExecuteContext$$anonfun$scoped$1.apply(ExecuteContext.scala:8)
at is.hail.expr.ir.ExecuteContext$$anonfun$scoped$1.apply(ExecuteContext.scala:7)
at is.hail.utils.package$.using(package.scala:596)
at is.hail.annotations.Region$.scoped(Region.scala:11)
at is.hail.expr.ir.ExecuteContext$.scoped(ExecuteContext.scala:7)
at is.hail.methods.LocalLDPrune$.apply(LocalLDPrune.scala:284)
at is.hail.methods.LocalLDPruneSuite.testIsLocallyUncorrelated(LocalLDPruneSuite.scala:355)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess
With this issue I think this PR is ok? |
needs a bump |
Tests not passing, not sure why yet. Errors are MatchError.
Stacked on #6421, will see if I can unwind
cc @tpoterba