Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Arrow Example
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Simulation and Data Lab Applied Machine Learning
Arrow Example
Commits
c65a3167
Commit
c65a3167
authored
Oct 17, 2024
by
Jan Ebert
Browse files
Options
Downloads
Patches
Plain Diff
Support Arrow reader not requiring closing
parent
f9c6cff6
Branches
master
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
fixlength_arrow.py
+1
-1
1 addition, 1 deletion
fixlength_arrow.py
varlength_arrow.py
+1
-1
1 addition, 1 deletion
varlength_arrow.py
with
2 additions
and
2 deletions
fixlength_arrow.py
+
1
−
1
View file @
c65a3167
...
...
@@ -60,7 +60,7 @@ class FixlengthArrow(torch.utils.data.Dataset):
return
img
,
target
def
__del__
(
self
):
if
self
.
reader
is
not
None
:
if
self
.
reader
is
not
None
and
hasattr
(
self
.
reader
,
'
close
'
)
:
self
.
reader
.
close
()
if
self
.
arrowfile
is
not
None
:
self
.
arrowfile
.
close
()
...
...
...
...
This diff is collapsed.
Click to expand it.
varlength_arrow.py
+
1
−
1
View file @
c65a3167
...
...
@@ -59,7 +59,7 @@ class VarlengthArrow(torch.utils.data.Dataset):
return
img
,
target
def
__del__
(
self
):
if
self
.
reader
is
not
None
:
if
self
.
reader
is
not
None
and
hasattr
(
self
.
reader
,
'
close
'
)
:
self
.
reader
.
close
()
if
self
.
arrowfile
is
not
None
:
self
.
arrowfile
.
close
()
...
...
...
...
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
sign in
to comment