Don't maintain state for some objects
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- python
- Lĩnh vực
- stream-processing
Hướng nghiên cứu
Start by reading how stream objects store and propagate state, then compare that behavior with the saveStreamState and restoreStreamState examples in the issue. Define the native behavior around temporarily using current data for predictions without accumulating it, and verify that normal feature rows still update rolling state.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Hey, thanks for this library, it's great. I'm building an ML application that is learning in an online way. So, it's constantly acquiring new feature rows, but also having to serve up predictions at the same time. I want to use Streamz to accumulate data, however, for my real feature rows, I want the accumulators to maintain state (say, a rolling mean). But for my predictions, I don't want the state to get accumulated into the roller.
As an example, let's say i'm recording temperature measurements once every 15 seconds. Every 15 seconds I want to generate a new feature vector that contains the rolling mean of the last 25 temperatures. However, inside of that 15 second window, I may get asked to serve up a prediction, for which I want to use the current temperature in the rolling mean, but I don't want the current temperature to be accumulated into the roller's state.
Is there a straightforward way to do this currently?
EDIT: For now i'm doing this:
state = None
if hasattr(stream, 'state'):
state = stream.state
return {
'state': state,
'children': [saveStreamState(s) for s in stream.downstreams]
}
def restoreStreamState(stream, stateTree):
stream.state = stateTree['state']
for subStream, subTree in zip(stream.downstreams, stateTree['children']):
restoreStreamState(subStream, subTree)
Which seems to work. It'd be cool if there was some way to do it natively, though.
- Ngôn ngữ chính
- Python
- Star
- 1.3k
- Fork
- 149
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của python-streamz/streamz
-
pkg_resources warning Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
python-streamz/streamz#481 · 4 bình luận ·
-
Combining the streamz.Stream.filenames() and streamz.Stream.from_textfile() using dask scatter? Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
python-streamz/streamz#480 · 2 bình luận ·
-
Compile the code into c++ Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
python-streamz/streamz#479 · 1 bình luận ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
python-streamz/streamz#478 · 6 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 10/100
python-streamz/streamz#476 · 17 bình luận · 2 reaction ·
Tất cả issue của python-streamz/streamz
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100