Skip to content

Commit 2e874f7

Browse files
aliafzalfacebook-github-bot
authored andcommitted
Add logger warning stacklevel (#3242)
Summary: Pull Request resolved: #3242 TSIA Reviewed By: SSYernar Differential Revision: D79149808 fbshipit-source-id: 3fc79db614571ad556798f70581c6e40c7b738f9
1 parent ea29cf6 commit 2e874f7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

torchrec/distributed/sharding_plan.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ def _get_block_size_for_cw_shard(
257257
f"Dim of {columns} cannot be evenly divided with column wise shard"
258258
"dim {column_wise_shard_dim}, overriding block_size to embedding_dim={columns}",
259259
UserWarning,
260+
stacklevel=2,
260261
)
261262
block_size = columns
262263
return block_size
@@ -281,6 +282,7 @@ def _calculate_cw_shard_sizes_and_offsets(
281282
f"Dim of {columns} cannot be evenly divided with column wise shard"
282283
"dim {col_wise_shard_dim}, overriding block_size to embedding_dim={columns}",
283284
UserWarning,
285+
stacklevel=2,
284286
)
285287
block_size = columns
286288

0 commit comments

Comments
 (0)