pymor / pymor/pymor

Samdp likes to fail with InversionError when theta approaches pole

Open
#2,366 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
346
Forks
123
Avg merge
1d 11h
Merged PRs (30d)
32

Description

The issue pops up in CI periodically, like here.

The following code snippet reproduces the issue for me on Linux with PyPI packages:

import numpy as np
from pymortests.algorithms.samdp import conv_diff_1d_fd
from pymor.algorithms.samdp import samdp
from pymor.operators.numpy import NumpyMatrixOperator

def test_samdp(n, m, k, wanted, which, rng):
    A = conv_diff_1d_fd(n, 1, 1)
    Eop = None

    B = rng.standard_normal((n, m))
    C = rng.standard_normal((k, n))

    Aop = NumpyMatrixOperator(A)
    Bva = Aop.source.from_numpy(B.T)
    Cva = Aop.source.from_numpy(C)

    return samdp(Aop, Eop, Bva, Cva, wanted, which=which)

rng = np.random.default_rng(595)
test_samdp(50, 1, 3, 15, 'NR', rng)

@lbalicki, any ideas?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure with the supplied example and inspect pymor.algorithms.samdp.samdp, using pymortests.algorithms.samdp.conv_diff_1d_fd and NumpyMatrixOperator as shown. Trace why the NR case raises InversionError when theta approaches a pole, then add regression coverage demonstrating that the supplied case no longer fails.

Written by the indexing model from the issue text.

Assessment

Tech stack
numpy, python
Domain
backend, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.