Unverified Commit 74c9d27d authored by Hongzhi (Steve), Chen's avatar Hongzhi (Steve), Chen Committed by GitHub
Browse files

[Misc] Auto-format tests. (#5313)



* [Misc] Auto-format tests.

* more

---------
Co-authored-by: default avatarUbuntu <ubuntu@ip-172-31-28-63.ap-northeast-1.compute.internal>
parent 86193c26
......@@ -264,7 +264,6 @@ def test_csc_to_csr(dense_dim, indptr, indices, shape):
@pytest.mark.parametrize("col", [(0, 1, 2, 2), (1, 3, 3, 4)])
@pytest.mark.parametrize("shape", [None, (5, 5), (5, 6)])
def test_coo_to_csc(dense_dim, row, col, shape):
val_shape = (len(row),)
if dense_dim is not None:
val_shape += (dense_dim,)
......
......@@ -2,12 +2,12 @@ import unittest
from statistics import mean
import backend as F
import numpy as np
import torch
import dgl
import dgl.ndarray as nd
import dgl.ops as OPS
import numpy as np
import torch
from dgl import rand_graph
from dgl._ffi.streams import _dgl_get_stream, to_dgl_stream_handle
from dgl.utils import to_dgl_context
......@@ -138,6 +138,7 @@ def test_record_stream_graph_positive():
stream = torch.cuda.Stream()
results2 = torch.zeros_like(result)
# Performs the computing in a background stream
def perform_computing():
with torch.cuda.stream(stream):
......@@ -172,6 +173,7 @@ def test_record_stream_graph_negative():
stream = torch.cuda.Stream()
results2 = torch.zeros_like(result)
# Performs the computing in a background stream
def perform_computing():
with torch.cuda.stream(stream):
......
import io
import pickle
import dgl
import networkx as nx
import torch
import dgl
def _reconstruct_pickle(obj):
f = io.BytesIO()
......
import os
import unittest
import dgl
import torch as th
import torch.multiprocessing as mp
import dgl
def sub_ipc(g):
print(g)
......
import backend as F
import pytest
import torch
import dgl
import pytest
import torch
@pytest.mark.skipif(
......
from copy import deepcopy
import backend as F
import dgl
import dgl.function as fn
import dgl.nn.tensorflow as nn
import networkx as nx
import numpy as np
import pytest
......@@ -15,10 +19,6 @@ from test_utils.graph_cases import (
random_graph,
)
import dgl
import dgl.function as fn
import dgl.nn.tensorflow as nn
def _AXWb(A, X, W, b):
X = tf.matmul(X, W)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment