Skip to content

Commit 100ddc1

Browse files
Routhleckclaude
andcommitted
Fix runners.py to use functools.partial instead of removed unroll_kwargs
The unroll_kwargs parameter was removed from bm.for_loop() as it was never actually implemented. Updated runners.py to use functools.partial() to bind shared_args to _step_func_predict, following the pattern already used in train/online.py. Changes: - Added functools import - Changed for_loop call to use functools.partial(self._step_func_predict, shared_args=shared_args) - Removed unroll_kwargs={'shared_args': shared_args} which was non-functional 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 1c70d4a commit 100ddc1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

brainpy/runners.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
# ==============================================================================
16+
import functools
1617
import inspect
1718
import time
1819
import warnings
@@ -662,8 +663,7 @@ def _fun_predict(self, indices, *inputs, shared_args=None):
662663
return outs, None
663664

664665
else:
665-
return bm.for_loop(self._step_func_predict,
666+
return bm.for_loop(functools.partial(self._step_func_predict, shared_args=shared_args),
666667
(indices, *inputs),
667668
jit=self.jit['predict'],
668-
unroll_kwargs={'shared_args': shared_args},
669669
progress_bar=self.progress_bar)

0 commit comments

Comments
 (0)