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

rand_cat returns Java exception #13693

Closed
jigold opened this issue Sep 22, 2023 · 0 comments · Fixed by #13702
Closed

rand_cat returns Java exception #13693

jigold opened this issue Sep 22, 2023 · 0 comments · Fixed by #13702
Assignees
Labels

Comments

@jigold
Copy link
Collaborator

jigold commented Sep 22, 2023

What happened?

This works:

foo = foo.annotate(csq=foo.gene.map(lambda _: 1))
foo.show()

This fails:

foo = foo.annotate(csq=foo.gene.map(lambda _: hl.rand_cat([0.3, 0.2, 0.5], seed=0)))
foo.show()
FatalError: ClassCastException: null

Java stack trace:
java.lang.RuntimeException: typ: inference failure:
	at is.hail.expr.ir.IR.typ(IR.scala:38)
	at is.hail.expr.ir.IR.typ$(IR.scala:33)
	at is.hail.expr.ir.ToStream.typ(IR.scala:300)
	at is.hail.expr.ir.IRParser$.$anonfun$ir_value_expr_1$81(Parser.scala:1111)
	at is.hail.utils.StackSafe$More.advance(StackSafe.scala:60)
	at is.hail.utils.StackSafe$.run(StackSafe.scala:16)
	at is.hail.utils.StackSafe$StackFrame.run(StackSafe.scala:32)
	at is.hail.expr.ir.IRParser$.$anonfun$parse_value_ir$1(Parser.scala:2157)
	at is.hail.expr.ir.IRParser$.parse(Parser.scala:2153)
	at is.hail.expr.ir.IRParser$.parse_value_ir(Parser.scala:2157)
	at is.hail.backend.spark.SparkBackend.$anonfun$parse_value_ir$2(SparkBackend.scala:691)
	at is.hail.backend.ExecuteContext$.$anonfun$scoped$3(ExecuteContext.scala:76)
	at is.hail.utils.package$.using(package.scala:637)
	at is.hail.backend.ExecuteContext$.$anonfun$scoped$2(ExecuteContext.scala:76)
	at is.hail.utils.package$.using(package.scala:637)
	at is.hail.annotations.RegionPool$.scoped(RegionPool.scala:17)
	at is.hail.backend.ExecuteContext$.scoped(ExecuteContext.scala:62)
	at is.hail.backend.spark.SparkBackend.$anonfun$withExecuteContext$1(SparkBackend.scala:345)
	at is.hail.backend.spark.SparkBackend.$anonfun$parse_value_ir$1(SparkBackend.scala:690)
	at is.hail.utils.ExecutionTimer$.time(ExecutionTimer.scala:52)
	at is.hail.utils.ExecutionTimer$.logTime(ExecutionTimer.scala:59)
	at is.hail.backend.spark.SparkBackend.parse_value_ir(SparkBackend.scala:689)
	at sun.reflect.GeneratedMethodAccessor193.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:244)
	at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)
	at py4j.Gateway.invoke(Gateway.java:282)
	at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)
	at py4j.commands.CallCommand.execute(CallCommand.java:79)
	at py4j.ClientServerConnection.waitForCommands(ClientServerConnection.java:182)
	at py4j.ClientServerConnection.run(ClientServerConnection.java:106)
	at java.lang.Thread.run(Thread.java:750)

java.lang.ClassCastException: null
	at 




Hail version: 0.2.123-a21b8ad2f534
Error summary: ClassCastException: null

Version

0.2.123

Relevant log output

No response

@jigold jigold added the needs-triage A brand new issue that needs triaging. label Sep 22, 2023
@patrick-schultz patrick-schultz self-assigned this Sep 25, 2023
@patrick-schultz patrick-schultz added bug and removed needs-triage A brand new issue that needs triaging. labels Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants