Skip to content

Commit

Permalink
change functools.cache to lru_cache
Browse files Browse the repository at this point in the history
  • Loading branch information
irenaby committed Sep 18, 2024
1 parent 32bce48 commit d7f6609
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
from functools import cache
from functools import lru_cache
from typing import Callable

from tqdm import tqdm


@cache
@lru_cache
def get_total_grad_steps(representative_data_gen: Callable) -> int:
# dry run on the representative dataset to count number of batches
num_batches = 0
Expand Down

0 comments on commit d7f6609

Please sign in to comment.