Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
joserapa98 committed May 15, 2024
2 parents 7bcc65d + 3ad9032 commit d86b916
Show file tree
Hide file tree
Showing 62 changed files with 2,776 additions and 1,361 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
workflow_dispatch:

jobs:
tests:
tests_basics:

runs-on: ubuntu-latest

Expand All @@ -33,6 +33,21 @@ jobs:
- name: Test decompositions
if: always()
run: pytest tests/decompositions/test_svd_decompositions.py --cov=tensorkrowch

tests_models:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: python -m pip install --upgrade pip torch opt_einsum
- name: Install pytest
run: pip install pytest pytest-cov
- name: Test MPS
if: always()
run: pytest tests/models/test_mps.py --cov=tensorkrowch
Expand All @@ -44,4 +59,4 @@ jobs:
run: pytest tests/models/test_peps.py --cov=tensorkrowch
- name: Test Tree
if: always()
run: pytest tests/models/test_tree.py --cov=tensorkrowch
run: pytest tests/models/test_tree.py --cov=tensorkrow
158 changes: 79 additions & 79 deletions docs/_build/doctest/output.txt
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
Results of doctest builder run on 2024-05-13 15:19:16
Results of doctest builder run on 2024-05-14 21:33:03
=====================================================

Document: models
----------------
1 items passed all tests:
118 tests in default
118 tests in 1 items.
118 passed and 0 failed.
Test passed.

Document: embeddings
--------------------
1 items passed all tests:
45 tests in default
45 tests in 1 items.
45 passed and 0 failed.
Test passed.

Document: components
--------------------
**********************************************************************
Expand All @@ -27,24 +11,24 @@ Expected:
tensor([[-0.2799, -0.4383, -0.8387],
[ 1.6225, -0.3370, -1.2316]])
Got:
tensor([[-0.3491, 1.6723, 0.1550],
[-1.2811, 1.7880, 1.4058]])
tensor([[-1.0631, -0.4740, 0.1857],
[ 0.1684, 0.9431, -0.5282]])
**********************************************************************
File "../tensorkrowch/components.py", line ?, in default
Failed example:
node.sum()
Expected:
tensor(-1.5029)
Got:
tensor(3.3910)
tensor(-0.7681)
**********************************************************************
File "../tensorkrowch/components.py", line ?, in default
Failed example:
node.sum('left')
Expected:
tensor([ 1.3427, -0.7752, -2.0704])
Got:
tensor([-1.6301, 3.4603, 1.5608])
tensor([-0.8947, 0.4691, -0.3424])
**********************************************************************
File "../tensorkrowch/components.py", line ?, in default
Failed example:
Expand All @@ -53,24 +37,24 @@ Expected:
tensor([[ 1.4005, -0.0521, -1.2091],
[ 1.9844, 0.3513, -0.5920]])
Got:
tensor([[ 0.1392, -1.0223, -1.4595],
[-0.8048, 0.5959, -0.3506]])
tensor([[ 0.7595, 0.6039, -0.3528],
[-0.9391, 0.5732, -0.1683]])
**********************************************************************
File "../tensorkrowch/components.py", line ?, in default
Failed example:
node.mean()
Expected:
tensor(0.3139)
Got:
tensor(-0.4837)
tensor(0.0794)
**********************************************************************
File "../tensorkrowch/components.py", line ?, in default
Failed example:
node.mean('left')
Expected:
tensor([ 1.6925, 0.1496, -0.9006])
Got:
tensor([-0.3328, -0.2132, -0.9050])
tensor([-0.0898, 0.5886, -0.2606])
**********************************************************************
File "../tensorkrowch/components.py", line ?, in default
Failed example:
Expand All @@ -79,24 +63,24 @@ Expected:
tensor([[ 0.2111, -0.9551, -0.7812],
[ 0.2254, 0.3381, -0.2461]])
Got:
tensor([[-1.0223, -0.8771, -2.0712],
[-0.8749, -0.0445, 0.0772]])
tensor([[-0.5163, -1.9652, 0.5784],
[ 1.1581, 1.1339, -0.2820]])
**********************************************************************
File "../tensorkrowch/components.py", line ?, in default
Failed example:
node.std()
Expected:
tensor(0.5567)
Got:
tensor(0.7768)
tensor(1.1973)
**********************************************************************
File "../tensorkrowch/components.py", line ?, in default
Failed example:
node.std('left')
Expected:
tensor([0.0101, 0.9145, 0.3784])
Got:
tensor([0.1042, 0.5887, 1.5192])
tensor([1.1840, 2.1914, 0.6084])
**********************************************************************
File "../tensorkrowch/components.py", line ?, in default
Failed example:
Expand All @@ -105,24 +89,24 @@ Expected:
tensor([[ 1.5570, 1.8441, -0.0743],
[ 0.4572, 0.7592, 0.6356]])
Got:
tensor([[-0.5176, -0.2405, -0.4334],
[-0.5865, -0.3753, 0.4047]])
tensor([[ 0.4585, -0.9622, -1.3563],
[ 1.5910, -1.6511, 1.4884]])
**********************************************************************
File "../tensorkrowch/components.py", line ?, in default
Failed example:
node.norm()
Expected:
tensor(2.6495)
Got:
tensor(1.0781)
tensor(3.2324)
**********************************************************************
File "../tensorkrowch/components.py", line ?, in default
Failed example:
node.norm(axis='left')
Expected:
tensor([1.6227, 1.9942, 0.6399])
Got:
tensor([0.7822, 0.4458, 0.5930])
tensor([1.6557, 1.9110, 2.0137])
**********************************************************************
File "../tensorkrowch/components.py", line ?, in default
Failed example:
Expand Down Expand Up @@ -153,17 +137,17 @@ Got:
Node(
name: my_node
tensor:
tensor([[[-0.6988, -1.1643],
[-0.4288, 1.4445],
[ 0.3650, 0.1796],
[-0.7360, -0.4975],
[ 0.2338, -0.2614]],
tensor([[[ 0.0756, 0.2978],
[-0.9519, -0.6720],
[-0.5188, -0.1702],
[-0.5977, 0.7331],
[ 0.2803, -0.6546]],

[[ 1.4763, -0.5471],
[ 0.1191, 0.6986],
[ 0.4719, 0.6936],
[-0.3989, -0.9837],
[-0.7574, -0.4083]]])
[[ 0.1922, -1.1753],
[ 0.1176, 0.1418],
[ 0.3928, 0.8509],
[-0.5760, 0.9210],
[ 2.1306, -1.1455]]])
axes:
[left
input
Expand Down Expand Up @@ -202,17 +186,17 @@ Got:
Node(
name: node
tensor:
tensor([[[ 5.5549e-01, -7.1141e-01],
[ 1.3587e-02, -7.7982e-01],
[-2.4167e-01, 3.1204e-01],
[ 1.2386e-03, -4.0765e-02],
[ 1.2701e-01, -1.3453e-01]],
tensor([[[ 1.0910, -0.5809],
[ 0.1853, 0.3664],
[-0.0117, 0.5005],
[-0.0661, 0.0234],
[-0.8290, 1.9922]],

[[-1.8415e+00, 3.0231e-01],
[-1.0302e+00, 1.9352e+00],
[-2.3677e+00, 9.1492e-01],
[ 1.0165e+00, -4.1301e-01],
[-1.0887e+00, 2.1221e-01]]])
[[ 0.1525, 0.9578],
[ 0.7693, 0.5078],
[ 0.1810, -1.0350],
[ 0.3174, -0.2801],
[ 0.4202, -0.4585]]])
axes:
[axis_0
axis_1
Expand Down Expand Up @@ -264,17 +248,17 @@ Got:
name: my_paramnode
tensor:
Parameter containing:
tensor([[[-0.7826, 0.0821],
[ 0.3175, 0.7941],
[ 1.5045, -0.8090],
[ 0.3632, -0.3924],
[ 1.7720, 2.3521]],
tensor([[[ 0.7591, 0.2141],
[ 0.4399, -2.5171],
[-3.7951, 0.2628],
[-0.2629, 2.4291],
[ 1.8276, 0.2167]],

[[ 0.7189, 0.9170],
[ 0.0166, 0.3871],
[ 1.1382, -1.4283],
[-0.7954, 0.0954],
[-0.3044, 0.9413]]], requires_grad=True)
[[-0.4733, 1.6149],
[ 0.0621, 0.6297],
[ 0.4117, 0.4973],
[-0.1463, -0.2648],
[-1.0274, -1.1514]]], requires_grad=True)
axes:
[left
input
Expand Down Expand Up @@ -315,17 +299,17 @@ Got:
name: paramnode
tensor:
Parameter containing:
tensor([[[-0.2850, -0.0664],
[-0.2535, 1.0285],
[-0.4207, 0.8395],
[-0.7933, 0.1413],
[-1.4896, -0.7656]],
tensor([[[-1.3839, -1.1648],
[-0.2835, -0.6608],
[ 0.1896, -0.8977],
[-1.0581, 0.9863],
[-1.2442, -0.7461]],

[[-0.4232, 0.1107],
[-0.5041, -1.5471],
[ 0.6676, 1.5313],
[ 1.4140, -1.2289],
[ 1.2960, -1.4492]]], requires_grad=True)
[[ 0.2663, -0.2669],
[-0.9733, 1.0781],
[ 0.2842, -0.3121],
[-0.9311, -0.5546],
[ 0.4118, 1.2157]]], requires_grad=True)
axes:
[axis_0
axis_1
Expand All @@ -344,8 +328,8 @@ Expected:
[ 1.3371, 1.4761, 0.6551]], requires_grad=True)
Got:
Parameter containing:
tensor([[ 0.5249, 0.1834, 1.2888],
[-0.4819, 0.8874, 0.0728]], requires_grad=True)
tensor([[-0.4446, 0.2519, 1.6840],
[ 1.2981, -0.4704, -0.1416]], requires_grad=True)
**********************************************************************
File "../tensorkrowch/components.py", line ?, in default
Failed example:
Expand Down Expand Up @@ -396,11 +380,19 @@ Got:
data_0[feature] <-> nodeA[input]])
**********************************************************************
1 items had failures:
21 of 398 in default
398 tests in 1 items.
377 passed and 21 failed.
21 of 401 in default
401 tests in 1 items.
380 passed and 21 failed.
***Test Failed*** 21 failures.

Document: embeddings
--------------------
1 items passed all tests:
45 tests in default
45 tests in 1 items.
45 passed and 0 failed.
Test passed.

Document: operations
--------------------
1 items passed all tests:
Expand All @@ -409,9 +401,17 @@ Document: operations
214 passed and 0 failed.
Test passed.

Document: models
----------------
1 items passed all tests:
118 tests in default
118 tests in 1 items.
118 passed and 0 failed.
Test passed.

Doctest summary
===============
775 tests
778 tests
21 failures in tests
0 failures in setup code
0 failures in cleanup code
Binary file modified docs/_build/doctrees/components.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/_build/doctrees/models.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/tutorials/0_first_steps.doctree
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/_build/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: e4485bdccc4a9ef1ab7141439481b17d
config: c711dcb750f5eb023ece44b19b251e46
tags: 645f666f9bcd5a90fca523b33c5a78b7
2 changes: 1 addition & 1 deletion docs/_build/html/_modules/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Overview: module code &#8212; TensorKrowch 1.1.2 documentation</title>
<title>Overview: module code &#8212; TensorKrowch 1.1.3 documentation</title>

<!-- Loaded before other Sphinx assets -->
<link href="../_static/styles/theme.css?digest=1999514e3f237ded88cf" rel="stylesheet">
Expand Down
Loading

0 comments on commit d86b916

Please sign in to comment.