Skip to content

Commit

Permalink
fixed: pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
yizhihenpidehou committed Jan 18, 2025
1 parent 564770d commit ca73fef
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -206,3 +206,4 @@ Temporary Items
.apdisk
tmp_test/allset_test.py
tmp_test/
RandomNetwork.txt
4 changes: 3 additions & 1 deletion easygraph/nn/tests/test_regularization.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
import pytest
import torch

from easygraph.nn.regularization import EmbeddingRegularization


def test_embedding_reg():
print("EmbeddingRegularization" in eg.__dir__())
emb_reg = eg.EmbeddingRegularization(p=2, weight_decay=1e-4)
emb_reg = EmbeddingRegularization(p=2, weight_decay=1e-4)
embs = [torch.randn(10, 3), torch.randn(10, 3)]
loss = emb_reg(*embs)
true_loss = 0
Expand Down
5 changes: 4 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@ pandas>=2.0.1
nose>=1.3.7
pybind11>=2.10.4
pydsge
torch-geometric
torch-sparse
torch-scatter
torch >= 1.12.1
requests
requests

0 comments on commit ca73fef

Please sign in to comment.