We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5510d3f commit 1988b65Copy full SHA for 1988b65
pymc/backends/__init__.py
@@ -75,7 +75,7 @@
75
76
HAS_MCB = False
77
try:
78
- from mcbackend import Backend, Run
+ from mcbackend import Backend, NumPyBackend, Run
79
80
from pymc.backends.mcbackend import init_chain_adapters
81
@@ -123,6 +123,8 @@ def init_traces(
123
model: Model,
124
) -> Tuple[Optional[RunType], Sequence[IBaseTrace]]:
125
"""Initializes a trace recorder for each chain."""
126
+ if HAS_MCB and backend is None:
127
+ backend = NumPyBackend(preallocate=expected_length)
128
if HAS_MCB and isinstance(backend, Backend):
129
return init_chain_adapters(
130
backend=backend,
0 commit comments