This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from torch.utils.tensorboard import SummaryWriter | |
from accelerate.tracking import GeneralTracker, on_main_process | |
import os | |
from typing import Union, Optional | |
# 0. 自定义追踪器 | |
class MyCustomTracker(GeneralTracker): | |
""" | |
my custom `Tracker` class that supports `tensorboard`. Should be initialized at the start of your script. |