Skip to content

Commit

Permalink
test pyre syntax (pytorch#1922)
Browse files Browse the repository at this point in the history
Summary: Pull Request resolved: pytorch#1922

Differential Revision: D56491510
  • Loading branch information
henrylhtsang authored and facebook-github-bot committed Apr 24, 2024
1 parent 76e854c commit 21a772c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion torchrec/distributed/tests/test_embedding_sharding.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

import random
import unittest
from typing import Any, Dict, List
from typing import Any, Dict, List, Optional
from unittest.mock import MagicMock

import hypothesis.strategies as st
Expand All @@ -36,6 +36,9 @@

class TestGetWeightedAverageCacheLoadFactor(unittest.TestCase):
def test_get_avg_cache_load_factor_hbm(self) -> None:
x: Optional[int | str] = None
_ = x or 1

cache_load_factors = [random.random() for _ in range(5)]
embedding_tables: List[ShardedEmbeddingTable] = [
ShardedEmbeddingTable(
Expand Down

0 comments on commit 21a772c

Please sign in to comment.