• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

MatthewGerber / rlai / 27471184649

13 Jun 2026 03:37PM UTC coverage: 0.0% (-79.4%) from 79.431%
27471184649

push

github

MatthewGerber
* Change machine type.
* Try xdist.

0 of 5484 relevant lines covered (0.0%)

0.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/rlai/state_value/function_approximation/models/__init__.py
1
from abc import ABC
×
2
from typing import Optional
×
3

4
from matplotlib import pyplot as plt
×
5
from matplotlib.backends.backend_pdf import PdfPages
×
6

7
from rlai.models import FunctionApproximationModel
×
8

9

10
class StateFunctionApproximationModel(FunctionApproximationModel, ABC):
×
11
    """
12
    Base class for models that approximate state-action value functions.
13
    """
14

15
    def plot(
×
16
            self,
17
            render: bool,
18
            pdf: Optional[PdfPages]
19
    ) -> Optional[plt.Figure]:
20
        """
21
        Plot the model. If called from the main thread and render is True, then a new plot will be generated. If called
22
        from a background thread, then the data used by the plot will be updated but a plot will not be generated or
23
        updated. This supports a pattern in which a background thread generates new plot data, and a UI thread (e.g., in
24
        a Jupyter notebook) periodically calls `update_plot` to redraw the plot with the latest data.
25

26
        :param render: Whether to render the plot data. If False, then plot data will be updated but nothing will
27
        be shown.
28
        :param pdf: PDF to plot to, or None to show directly.
29
        :return: Matplotlib figure, if one was generated and not plotting to PDF.
30
        """
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc