Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -194,3 +194,8 @@ quote-style = "double"
[tool.ty.src]
include = ["src", "tests"]
exclude = ["src/torchjd/aggregation/_nash_mtl.py"]

[tool.ty.rules]
# nn.Module declares `forward` as a mutable `Callable[..., Any]` attribute, so every
# `forward` override would be flagged.
invalid-mutable-override = "ignore"
4 changes: 2 additions & 2 deletions tests/trajectories/_plotters.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import matplotlib.patheffects as pe
import numpy as np
from matplotlib import cm as cm, colors as mcolors, pyplot as plt
from matplotlib import colormaps, colors as mcolors, pyplot as plt
from numpy.lib.stride_tricks import sliding_window_view

Color: TypeAlias = str | tuple[float, float, float] | tuple[float, float, float, float]
Expand Down Expand Up @@ -128,7 +128,7 @@ class ContourCirclesPlotter(MultiPlotter):

def __init__(self) -> None:
radiuses = [1.0, 2.5, 4, 5.5, 7, 8.5]
colormap = cm.inferno_r
colormap = colormaps["inferno_r"]
norm = mcolors.Normalize(vmin=-1, vmax=max(radiuses))
plotters = tuple(CirclePlotter(radius, colormap(norm(radius))) for radius in radiuses)
super().__init__(plotters)
Expand Down
Loading