Skip to content

[Bug] Invalid escape sequence #3450

Description

@AdrianSosic

Issue Description

The docstring of energy_score_empirical (https://github.com/pyro-ppl/pyro/blob/1.9.1/pyro/ops/stats.py#L527) uses \ge (LaTeX for ≥) inside a regular (non-raw) string literal, which is an invalid Python escape sequence:

Environment

  • OS: macOS
  • Python version: tested 3.10-3.14
  • PyTorch version: 2.9.1
  • Pyro version: 1.9.1

Code Snippet

import warnings

warnings.filterwarnings("error")

import pyro.ops.stats
SyntaxError: invalid escape sequence '\g'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions