INNER CODE UNIT · Python

__getattr__

huggingface/large_language_model_training_playbook · debug/NicerTrace.py:169

    def __getattr__(self, attr):
        return getattr(self.stdout, attr)

    def write(self, msg):
        # comment out the next line if you don't want to write to stdout
        self.stdout.write(msg)
        self.file.write(msg)
        self.file.flush()

    def flush(self):
        # comment out the next line if you don't want to write to stdout
        self.stdout.flush()
        self.file.flush()


# -------------------------------- #

import time

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…