Skip to content

Commit

Permalink
Update torch dependency in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ffl096 committed Jul 8, 2024
1 parent 04d9437 commit 1e250ac
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 32 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/test_codebase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ jobs:
matrix:
os: [ubuntu-latest]
python-version: ["3.10", "3.11"]
torch-version: [2.0.1]
include:
- torch-version: 2.0.1
torch-version: ["2.3"]

steps:
- uses: actions/checkout@v3
Expand Down
16 changes: 4 additions & 12 deletions .github/workflows/test_tutorials.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ jobs:
matrix:
os: [ubuntu-latest]
python-version: ["3.10", "3.11"]
torch-version: [2.0.1]
include:
- torch-version: 2.0.1
torch-version: ["2.3"]
test-group: [1, 2, 3, 4]

steps:
Expand Down Expand Up @@ -68,9 +66,7 @@ jobs:
matrix:
os: [ubuntu-latest]
python-version: ["3.10", "3.11"]
torch-version: [2.0.1]
include:
- torch-version: 2.0.1
torch-version: ["2.3"]
test-group: [1, 2, 3]

steps:
Expand Down Expand Up @@ -104,9 +100,7 @@ jobs:
matrix:
os: [ubuntu-latest]
python-version: ["3.10", "3.11"]
torch-version: [2.0.1]
include:
- torch-version: 2.0.1
torch-version: ["2.3"]

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -139,9 +133,7 @@ jobs:
matrix:
os: [ubuntu-latest]
python-version: ["3.10", "3.11"]
torch-version: [2.0.1]
include:
- torch-version: 2.0.1
torch-version: ["2.3"]

steps:
- uses: actions/checkout@v3
Expand Down
34 changes: 17 additions & 17 deletions tutorials/combinatorial/hmc_train.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {
"ExecuteTime": {
"end_time": "2023-08-24T06:49:28.758850145Z",
Expand All @@ -149,7 +149,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -178,7 +178,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"metadata": {
"ExecuteTime": {
"end_time": "2023-08-24T06:49:28.810114967Z",
Expand Down Expand Up @@ -237,16 +237,16 @@
" b2 = []\n",
"\n",
" for cc in self.complexes:\n",
" a0.append(torch.from_numpy(cc.adjacency_matrix(0, 1).todense()).to_sparse())\n",
" a1.append(torch.from_numpy(cc.adjacency_matrix(1, 2).todense()).to_sparse())\n",
" a0.append(torch.from_numpy(cc.adjacency_matrix(0, 1).todense()))\n",
" a1.append(torch.from_numpy(cc.adjacency_matrix(1, 2).todense()))\n",
"\n",
" B = cc.incidence_matrix(rank=1, to_rank=2)\n",
" A = B.T @ B\n",
" A.setdiag(0)\n",
" coa2.append(torch.from_numpy(A.todense()).to_sparse())\n",
" coa2.append(torch.from_numpy(A.todense()))\n",
"\n",
" b1.append(torch.from_numpy(cc.incidence_matrix(0, 1).todense()).to_sparse())\n",
" b2.append(torch.from_numpy(cc.incidence_matrix(1, 2).todense()).to_sparse())\n",
" b1.append(torch.from_numpy(cc.incidence_matrix(0, 1).todense()))\n",
" b2.append(torch.from_numpy(cc.incidence_matrix(1, 2).todense()))\n",
"\n",
" return a0, a1, coa2, b1, b2\n",
"\n",
Expand Down Expand Up @@ -315,7 +315,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"metadata": {
"ExecuteTime": {
"end_time": "2023-08-24T06:49:29.818662234Z",
Expand Down Expand Up @@ -350,7 +350,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"metadata": {
"ExecuteTime": {
"end_time": "2023-08-24T06:50:47.902394227Z",
Expand All @@ -372,7 +372,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": null,
"metadata": {
"ExecuteTime": {
"end_time": "2023-08-24T06:55:26.795250682Z",
Expand Down Expand Up @@ -422,7 +422,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": null,
"metadata": {
"ExecuteTime": {
"end_time": "2023-08-24T06:55:26.814069014Z",
Expand Down Expand Up @@ -614,7 +614,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -681,7 +681,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": null,
"metadata": {
"ExecuteTime": {
"end_time": "2023-08-24T06:55:28.220563261Z",
Expand Down Expand Up @@ -712,7 +712,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -770,7 +770,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": null,
"metadata": {
"ExecuteTime": {
"end_time": "2023-08-24T07:01:54.496249166Z",
Expand Down Expand Up @@ -820,7 +820,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": null,
"metadata": {
"ExecuteTime": {
"end_time": "2023-08-24T07:13:58.198454432Z",
Expand Down

0 comments on commit 1e250ac

Please sign in to comment.