Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
bob.io.stream
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bob
bob.io.stream
Merge requests
!7
Fix: correctly handle buffering of filter computations (not relying on parent stream buffered data)
Code
Review changes
Check out branch
Download
Patches
Plain diff
Closed
Fix: correctly handle buffering of filter computations (not relying on parent stream buffered data)
fix_stream_filter_buffering
into
sliced_stream
Overview
1
Commits
1
Pipelines
1
Changes
1
Closed
Vincent POLLET
requested to merge
fix_stream_filter_buffering
into
sliced_stream
4 years ago
Overview
1
Commits
1
Pipelines
1
Changes
1
Expand
0
0
Merge request reports
Compare
sliced_stream
sliced_stream (base)
and
latest version
latest version
f2cdc116
1 commit,
4 years ago
1 file
+
5
−
6
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
bob/io/stream/stream.py
+
5
−
6
Options
@@ -249,7 +249,8 @@ def stream_filter(name):
class
StreamFilter
(
Stream
):
def
__init__
(
self
,
name
,
parent
):
super
().
__init__
(
name
=
name
,
parent
=
parent
)
pass
self
.
__loaded
=
None
self
.
__data
=
None
def
get_frame_indices
(
self
,
index
):
return
super
().
get_frame_indices
(
index
)
@@ -264,15 +265,13 @@ class StreamFilter(Stream):
# load one or several frames
def
load
(
self
,
index
=
None
):
indices
=
self
.
get_frame_indices
(
index
)
# return buffered data OR load from file OR process data
if
self
.
_Stream__loaded
==
indices
and
self
.
_Stream__data
is
not
None
:
# print('loaded', self.name)
# if data is buffered, do not do processing again !
if
self
.
__loaded
==
indices
and
self
.
__data
is
not
None
:
pass
else
:
self
.
__data
=
self
.
process
(
self
.
parent
.
load
(
indices
),
indices
)
self
.
__loaded
=
indices
# buffer and return data
self
.
__loaded
=
indices
return
self
.
__data
################################################################################
Loading