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
dgl
Commits
7a976098
Unverified
Commit
7a976098
authored
Jan 31, 2024
by
Muhammed Fatih BALIN
Committed by
GitHub
Jan 31, 2024
Browse files
[GraphBolt] Eliminate test warning (#7044)
parent
f051a5cc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
python/dgl/graphbolt/impl/torch_based_feature_store.py
python/dgl/graphbolt/impl/torch_based_feature_store.py
+1
-1
No files found.
python/dgl/graphbolt/impl/torch_based_feature_store.py
View file @
7a976098
...
@@ -72,6 +72,7 @@ class TorchBasedFeature(Feature):
...
@@ -72,6 +72,7 @@ class TorchBasedFeature(Feature):
def
__init__
(
self
,
torch_feature
:
torch
.
Tensor
,
metadata
:
Dict
=
None
):
def
__init__
(
self
,
torch_feature
:
torch
.
Tensor
,
metadata
:
Dict
=
None
):
super
().
__init__
()
super
().
__init__
()
self
.
_is_inplace_pinned
=
set
()
assert
isinstance
(
torch_feature
,
torch
.
Tensor
),
(
assert
isinstance
(
torch_feature
,
torch
.
Tensor
),
(
f
"torch_feature in TorchBasedFeature must be torch.Tensor, "
f
"torch_feature in TorchBasedFeature must be torch.Tensor, "
f
"but got
{
type
(
torch_feature
)
}
."
f
"but got
{
type
(
torch_feature
)
}
."
...
@@ -83,7 +84,6 @@ class TorchBasedFeature(Feature):
...
@@ -83,7 +84,6 @@ class TorchBasedFeature(Feature):
# Make sure the tensor is contiguous.
# Make sure the tensor is contiguous.
self
.
_tensor
=
torch_feature
.
contiguous
()
self
.
_tensor
=
torch_feature
.
contiguous
()
self
.
_metadata
=
metadata
self
.
_metadata
=
metadata
self
.
_is_inplace_pinned
=
set
()
def
__del__
(
self
):
def
__del__
(
self
):
# torch.Tensor.pin_memory() is not an inplace operation. To make it
# torch.Tensor.pin_memory() is not an inplace operation. To make it
...
...
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