Skip to content

Commit e19abee

Browse files
authored
Fix vestigial calls to apply.__default_rule__ (#336)
1 parent 5600ef6 commit e19abee

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

effectful/handlers/numpyro.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def _apply(op, *args, **kwargs):
8989
typ = op.__type_rule__(*args, **kwargs)
9090
if issubclass(typ, dist.Distribution):
9191
return defdata(op, *args, **kwargs)
92-
return apply.__default_rule__({}, op, *args, **kwargs)
92+
return op.__default_rule__(*args, **kwargs)
9393

9494
with runner({apply: _apply}):
9595
d = defterm(d)
@@ -137,7 +137,7 @@ def _apply(op, *args, **kwargs):
137137
typ = op.__type_rule__(*args, **kwargs)
138138
if issubclass(typ, dist.Distribution):
139139
return defdata(op, *args, **kwargs)
140-
return apply.__default_rule__({}, op, *args, **kwargs)
140+
return op.__default_rule__(*args, **kwargs)
141141

142142
with runner({apply: _apply}):
143143
d = defterm(d)

effectful/handlers/pyro.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ def _apply(op, *args, **kwargs):
377377
typ, pyro.distributions.torch_distribution.TorchDistributionMixin
378378
):
379379
return defdata(op, *args, **kwargs)
380-
return apply.__default_rule__({}, op, *args, **kwargs)
380+
return op.__default_rule__(*args, **kwargs)
381381

382382
with runner({apply: _apply}):
383383
d = defterm(d)
@@ -425,7 +425,7 @@ def _apply(op, *args, **kwargs):
425425
typ, pyro.distributions.torch_distribution.TorchDistributionMixin
426426
):
427427
return defdata(op, *args, **kwargs)
428-
return apply.__default_rule__({}, op, *args, **kwargs)
428+
return op.__default_rule__(*args, **kwargs)
429429

430430
with runner({apply: _apply}):
431431
d = defterm(d)

0 commit comments

Comments
 (0)