Problems with the `DEFINED_DIFFRULES` implementation
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 重构
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- julia
调研方向
首先阅读 DiffRules.jl 中的 DEFINED_DIFFRULES 实现,以及内省入口 DiffRules.diffrules 和 DiffRules.hasdiffrule。调查 @define_diffule 在分别预编译的包和扩展中的行为;完成的标准是选择并记录一个向后兼容的设计,该设计能够处理外部规则和基于模块的访问。
由索引模型根据 Issue 内容生成。
描述
Many "introspection" functions in DiffRules like DiffRules.diffrules look at the global variable DEFINED_DIFFRULES to collect information about what diff rules are defined. I think this has some issues:
- Only diff rules defined inside DiffRules.jl will be inside
DEFINED_DIFFRULES. Packages that use@define_diffulewill not be in that list. That is because side effects like adding to a global variable are not visible when modified during the time a package gets precompiled. You would have to add stuff to it in__init__for it to be visible. - Accesses are made with a symbol as an argument, for example,
DiffRules.hasdiffrule(:Base, :sin, 1). This feels to me like it should be made with a module as first argument.
I encounter this when I try to make e.g. LogExpFunctions into an extension (which makes it a separate module). I'm trying to think of ways to improve this that are backwards compatible.
- 主要语言
- Julia
- 星标
- 74
- 派生
- 36
- 平均合并
- 1 天 1 小时
- 30 天内合并 PR
- 1
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
JuliaDiff/DiffRules.jl 的其他 Issue
-
Package extensions可能已有人在做 @devmotion 于 26 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 48/100
JuliaDiff/DiffRules.jl#106 · 2 条评论 · 2 个 reaction ·
-
难度 3/5 1-2 天 新手友好度 35/100
JuliaDiff/DiffRules.jl#104 ·
-
难度 4/5 3-5 天 新手友好度 35/100
JuliaDiff/DiffRules.jl#102 · 2 条评论 ·
-
难度 5/5 一周以上 新手友好度 25/100
JuliaDiff/DiffRules.jl#68 · 2 条评论 ·
-
难度 5/5 一周以上 新手友好度 20/100
JuliaDiff/DiffRules.jl#65 · 1 条评论 ·
查看 JuliaDiff/DiffRules.jl 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
SciML/OrdinaryDiffEq.jl#4875 ·
维护者通常 3 天内回复
-
documentation
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
SciML/NonlinearSolve.jl#1372 ·
维护者通常 1 天内回复
-
Truncated discrete ccdf and logccdf return incorrect values at the lower atom可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
JuliaStats/Distributions.jl#2095 ·
-
documentation 📜 microphysics💧 ❄️
难度 2/5 1-3 小时 新手友好度 63/100
NumericalEarth/Breeze.jl#1073 ·
维护者通常 1 天内回复