From 8c878d4ee332362549fdd1394ad2cee88d2ebae8 Mon Sep 17 00:00:00 2001 From: hejinlang Date: Tue, 20 Aug 2024 20:19:29 +0800 Subject: [PATCH 1/2] fixed issue for large traning logs --- .../cv/classification/EfficientNetV2_for_PyTorch/train.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/PyTorch/built-in/cv/classification/EfficientNetV2_for_PyTorch/train.py b/PyTorch/built-in/cv/classification/EfficientNetV2_for_PyTorch/train.py index 9d5ec2e8e3..919ac738c2 100644 --- a/PyTorch/built-in/cv/classification/EfficientNetV2_for_PyTorch/train.py +++ b/PyTorch/built-in/cv/classification/EfficientNetV2_for_PyTorch/train.py @@ -68,6 +68,9 @@ from timm.scheduler import create_scheduler from timm.utils import ApexScaler, NativeScaler from timm.optim.optim_factory import add_weight_decay from fused_ema import ModelEmaV2Npu +import warnings +warnings.filterwarnings('ignore', category=ResourceWarning) +warnings.filterwarnings('ignore', category=DeprecationWarning) try: import apex -- Gitee From 471095cf416e28003b31b60f0c509e56031854e5 Mon Sep 17 00:00:00 2001 From: hejinlang Date: Wed, 21 Aug 2024 15:30:37 +0800 Subject: [PATCH 2/2] fixed issue with py3.11+pt2.4 --- .../built-in/nlp/Bert-CRF_for_PyTorch/bert4torch/snippets.py | 4 ++++ PyTorch/built-in/nlp/Bert-CRF_for_PyTorch/requirements.txt | 1 + 2 files changed, 5 insertions(+) diff --git a/PyTorch/built-in/nlp/Bert-CRF_for_PyTorch/bert4torch/snippets.py b/PyTorch/built-in/nlp/Bert-CRF_for_PyTorch/bert4torch/snippets.py index bca9b12381..8cc4363d96 100644 --- a/PyTorch/built-in/nlp/Bert-CRF_for_PyTorch/bert4torch/snippets.py +++ b/PyTorch/built-in/nlp/Bert-CRF_for_PyTorch/bert4torch/snippets.py @@ -33,6 +33,10 @@ import torch.nn.functional as F import random from datetime import datetime from typing import List, Tuple, Dict, Union, Optional +if not hasattr(inspect, 'getargspec'): + inspect.getargspec = inspect.getfullargspec + +from invoke import task import warnings import os diff --git a/PyTorch/built-in/nlp/Bert-CRF_for_PyTorch/requirements.txt b/PyTorch/built-in/nlp/Bert-CRF_for_PyTorch/requirements.txt index e69de29bb2..73f02e90e1 100644 --- a/PyTorch/built-in/nlp/Bert-CRF_for_PyTorch/requirements.txt +++ b/PyTorch/built-in/nlp/Bert-CRF_for_PyTorch/requirements.txt @@ -0,0 +1 @@ +invoke \ No newline at end of file -- Gitee