This is an automated email from the ASF dual-hosted git repository. wkcn pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git
The following commit(s) were added to refs/heads/master by this push: new 2b4c9c0 [fix] print `self` in warning. (#15614) 2b4c9c0 is described below commit 2b4c9c07c5f0039b93c51f7d9fb7123a0847c679 Author: kshitij12345 <kshitijkalambar...@gmail.com> AuthorDate: Sun Jul 21 07:48:29 2019 +0530 [fix] print `self` in warning. (#15614) * use format * make pylint happy * Update block.py --- python/mxnet/gluon/block.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python/mxnet/gluon/block.py b/python/mxnet/gluon/block.py index 3bac3c0..bd22cf8 100644 --- a/python/mxnet/gluon/block.py +++ b/python/mxnet/gluon/block.py @@ -842,8 +842,9 @@ class HybridBlock(Block): self._flags = list(kwargs.items()) self._clear_cached_op() if active and self._forward_hooks or self._forward_pre_hooks: - warnings.warn('"{}" is being hybridized while still having forward hook/pre-hook. ' - 'If "{}" is a child of HybridBlock, the hooks will not take effect.') + warnings.warn('"{block}" is being hybridized while still having forward hook/pre-hook. ' + 'If "{block}" is a child of HybridBlock, the hooks will not take effect.' + .format(block=self)) super(HybridBlock, self).hybridize(active, **kwargs) def cast(self, dtype):