Skip to content

Commit

Permalink
pass doctest
Browse files Browse the repository at this point in the history
  • Loading branch information
ordabayevy committed Dec 16, 2023
1 parent f96df2c commit 24ea976
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pyro/poutine/indep_messenger.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
# SPDX-License-Identifier: Apache-2.0

import numbers
from typing import Iterator, NamedTuple, Optional, Tuple
from dataclasses import dataclass
from typing import Iterator, Optional, Tuple

import torch
from typing_extensions import Self
Expand All @@ -12,7 +13,8 @@
from pyro.util import ignore_jit_warnings


class CondIndepStackFrame(NamedTuple):
@dataclass
class CondIndepStackFrame:
name: str
dim: Optional[int]
size: int
Expand Down Expand Up @@ -97,7 +99,6 @@ def __enter__(self) -> Self:
self._vectorized = True

if self._vectorized is True:
assert self.dim is not None
self.dim = _DIM_ALLOCATOR.allocate(self.name, self.dim)

return super().__enter__()
Expand Down

0 comments on commit 24ea976

Please sign in to comment.