World Age Issues with TensorCast JuliaPy
还没有人认领这个 Issue。
评估
调研方向
复现 Julia 调用与包含 testfunction.jl 的 Python 脚本之间的差异,重点关注 @cast 调用以及从 TransmuteDims.jl:372 报告的 _trex 错误。追踪 Python 到 Julia 的调用如何创建 world-age 上下文;完成标准是确定可靠的解决方案,并确认 testfunc() 可通过 Python API 工作。
由索引模型根据 Issue 内容生成。
描述
I am getting a world age bug when running TensorCast in JuliaPy, but not when using it normally.
If I run an example function such as
function testfunc()
V = [10,20,30]
M = collect(reshape(1:12, 3,4))
@cast A[j,i] := M[i,j] + 10 * V[i]
return A
end
it works when I call it in Julia via
A = testfunc()
However, when I run the Python script
from julia.api import Julia
jl = Julia(compiled_modules=False)
from julia import Main
Main.include("testfunction.jl")
from julia.Main import testfunc
A = testfunc()
I get the error
<PyCall.jlwrap (in a Julia function called from Python)
JULIA: MethodError: no method matching _trex(::Symbol, ::Type{Matrix{Int64}}, ::Tuple{Int64, Int64})
The applicable method may be too new: running in world age 32486, while current world is 38140.
Closest candidates are:
_trex(::Any, ::Any, ::Any) at /home/andrewhardy/.julia/packages/TransmuteDims/mGkQB/src/TransmuteDims.jl:372 (method too new to be called from this world context.)
which only occurs for the @cast call. What can I do?
- 主要语言
- Julia
- 星标
- 1.5k
- 派生
- 186
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
JuliaPy/PyCall.jl 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 5/5 一周以上 新手友好度 20/100
-
难度 4/5 3-5 天 新手友好度 35/100
-
难度 3/5 1-2 天 新手友好度 35/100
-
难度 4/5 3-5 天 新手友好度 45/100
查看 JuliaPy/PyCall.jl 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
Sienna-Platform/PowerSystemCaseBuilder.jl#239 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
JuliaPluto/Malt.jl#114 ·
-
enhancement
难度 2/5 1-3 小时 新手友好度 85/100
QuantumSavory/QuantumSavory.jl#592 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 85/100
JuliaQUBO/QUBOTools.jl#136 ·