Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
vision
Commits
0fa747ee
Unverified
Commit
0fa747ee
authored
Nov 12, 2021
by
Philip Meier
Committed by
GitHub
Nov 12, 2021
Browse files
use better default decoder for prototype dataset tests (#4863)
parent
b9f4ed93
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
test/builtin_dataset_mocks.py
test/builtin_dataset_mocks.py
+7
-1
No files found.
test/builtin_dataset_mocks.py
View file @
0fa747ee
...
...
@@ -100,10 +100,16 @@ class DatasetMocks:
return
mock_resources
,
mock_info
def
_decoder
(
self
,
dataset_type
):
def
to_bytes
(
file
):
try
:
return
file
.
read
()
finally
:
file
.
close
()
if
dataset_type
==
datasets
.
utils
.
DatasetType
.
RAW
:
return
datasets
.
decoder
.
raw
else
:
return
lambda
file
:
file
.
close
()
return
to_bytes
def
load
(
self
,
name
:
str
,
decoder
=
DEFAULT_TEST_DECODER
,
split
=
"train"
,
**
options
:
Any
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment