Batches from Python generator objects
还没有人认领这个 Issue。
评估
调研方向
首先阅读 Load.batch() 的实现以及相关的 iterate() 方法。使用临时迭代器对象的生成器重现该示例,然后确定批处理目前如何处理这些对象。当 altdss.Load.batch(objs=selected_load_objs) 无需 copy() 即可工作,同时保持预期的轻量行为时,即视为完成。
由索引模型根据 Issue 内容生成。
描述
Generating batches from Python generator objects would allow users to use complex and custom filtering in Python to create a high-performance batch object as a result.
This couples well with the new iterate() method, which reuses Python-side objects. This currently doesn't work without the copy:
from copy import copy
# Python generator object
selected_load_objs = (copy(load) for load in altdss.Load.iterate() if predicate_function(load))
selected_load_batch = altdss.Load.batch(objs=selected_load_objs)
The idea is to allow using the temporary iterator objects directly, since they are lightweight.
- 主要语言
- Python
- 星标
- 19
- 派生
- 2
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
dss-extensions/AltDSS-Python 的其他 Issue
-
documentation
难度 3/5 1-2 天 新手友好度 35/100
dss-extensions/AltDSS-Python#8 · 3 条评论 ·
-
documentation
难度 4/5 3-5 天 新手友好度 20/100
-
enhancement
难度 5/5 一周以上 新手友好度 20/100
dss-extensions/AltDSS-Python#6 · 1 个 reaction ·
-
enhancement
难度 5/5 一周以上 新手友好度 25/100
-
enhancement
难度 5/5 一周以上 新手友好度 28/100
查看 dss-extensions/AltDSS-Python 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
stephrobert/dsoxlab#238 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 75/100
sublimehq/package_control#1780 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
-
难度 2/5 1-3 小时 新手友好度 70/100
nwg-piotr/nwg-displays#145 ·