Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sporadic Failure of RXD. #2939

Open
1uc opened this issue Jun 25, 2024 · 5 comments
Open

Sporadic Failure of RXD. #2939

1uc opened this issue Jun 25, 2024 · 5 comments
Labels
bug CI Continuous Integration

Comments

@1uc
Copy link
Collaborator

1uc commented Jun 25, 2024

I've seen RXD fail sporadically for no obvious reason. I'd like to start collecting CI runs that failed. Please post any failures you notice so we can get a grip on how often it happens; and if it's always the same issue or multiple different issues.

Rerunning CI makes the issue "go away".

@1uc 1uc added bug CI Continuous Integration labels Jun 25, 2024
@1uc
Copy link
Collaborator Author

1uc commented Jun 25, 2024

Today we have:

test/rxd/test_pltvar.py:57: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../../lib/python/neuron/__init__.py:1357: in __call__
    return _do_plot_on_plotly(*args, **kwargs)
../../../lib/python/neuron/__init__.py:1330: in _do_plot_on_plotly
    col = _get_color(variable, val, cmap, lo, hi, val_range)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

variable = Species(regions=[Region(..., nrn_region='i', geometry=<neuron.rxd.geometry.RxDGeometry object at 0x1108d20f0>, dx=0.25...l=0)[Region(..., nrn_region='i', geometry=<neuron.rxd.geometry.RxDGeometry object at 0x1108d20f0>, dx=0.25, name=None)]
val = 0.0
cmap = <matplotlib.colors.LinearSegmentedColormap object at 0x11ffdcd40>
lo = nan, hi = 4.5899531198959383e-41, val_range = nan

    def _get_color(variable, val, cmap, lo, hi, val_range):
        if variable is None or val is None:
            col = "black"
        elif val_range == 0:
            if val < lo:
                col = color_to_hex(cmap(0))
            elif val > hi:
                col = color_to_hex(cmap(255))
            else:
                col = color_to_hex(cmap(128))
        else:
            col = color_to_hex(
>               cmap(int(255 * (min(max(val, lo), hi) - lo) / (val_range)))
            )
E           ValueError: cannot convert float NaN to integer

../../../lib/python/neuron/__init__.py:1223: ValueError
=============================== warnings summary ===============================

https://github.com/neuronsimulator/nrn/actions/runs/9663498233/job/26655821145#step:18:6160

@ramcdougal
Copy link
Member

We should also probably think about what PlotShape should do if it encounters a NaN. It shouldn't with any reasonable model... but it probably shouldn't crash either.

@1uc
Copy link
Collaborator Author

1uc commented Jun 25, 2024

Do you know why it occasionally generates nans during CI runs?

@ramcdougal
Copy link
Member

That was news to me. No clue as yet.

@1uc
Copy link
Collaborator Author

1uc commented Aug 12, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug CI Continuous Integration
Projects
None yet
Development

No branches or pull requests

2 participants