Skip to content

Commit

Permalink
Fix unreachable branch
Browse files Browse the repository at this point in the history
  • Loading branch information
aarmey committed Aug 15, 2024
1 parent 78a45f6 commit c4d63a7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ jobs:
BACKEND: ['numpy', 'pytorch', 'paddle']
python-version: ['3.12']
include:
- BACKEND: 'numpy'
python-version: '3.8'
- BACKEND: 'numpy'
python-version: '3.9'
TENSORLY_TENALG_BACKEND: ['einsum']
Expand Down Expand Up @@ -67,7 +65,7 @@ jobs:
TENSORLY_BACKEND=${{matrix.BACKEND}} pytest -vv --cov tensorly --cov-report xml --durations=10 tensorly
- name: Check coverage with CodeCov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
verbose: true
9 changes: 3 additions & 6 deletions tensorly/backend/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,11 @@ class dynamically_dispatched_class_attribute(object):

__slots__ = ["name"]

def __init__(self, name):
def __init__(self, name: str):
self.name = name

def __get__(self, instance, cls=None):
if isinstance is None:
return getattr(cls.current_backend(), self.name)
else:
return getattr(instance.current_backend(), self.name)
def __get__(self, instance: types.ModuleType):
return getattr(instance.current_backend(), self.name)


class BackendManager(types.ModuleType):
Expand Down
2 changes: 1 addition & 1 deletion tensorly/decomposition/tests/test_tr_als.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def test_tensor_ring_als_sampled_large_decomp(uniform_sampling, randomized_error

# Some decomposition properties
n_samples = 2000 # Note: The smallest least squares problem has 17160 rows
n_iter_max = 100
n_iter_max = 60

# Generate random tensor which has exact tensor ring decomposition
tensor = random_tr(
Expand Down

0 comments on commit c4d63a7

Please sign in to comment.