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
Commits
f2cdc116
Commit
f2cdc116
authored
4 years ago
by
Vincent POLLET
Browse files
Options
Downloads
Patches
Plain Diff
Fix: correctly handle buffering of filter computations (not relying on parent stream buffered data)
parent
005f889d
No related branches found
No related tags found
1 merge request
!7
Fix: correctly handle buffering of filter computations (not relying on parent stream buffered data)
Pipeline
#42490
failed
4 years ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bob/io/stream/stream.py
+5
-6
5 additions, 6 deletions
bob/io/stream/stream.py
with
5 additions
and
6 deletions
bob/io/stream/stream.py
+
5
−
6
View file @
f2cdc116
...
...
@@ -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
################################################################################
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment