MCPcopy Create free account
hub / github.com/cfiltnlp/MUStARD_Plus_Plus / Tee

Class Tee

MPP_Code/training/execute_classification_implicit.py:34–49  ·  view source on GitHub ↗

This class is not the part of execution. Object of this class is used for printing the log in file as well as oin Terminal

Source from the content-addressed store, hash-verified

32"""
33
34class Tee(object):
35 """
36 This class is not the part of execution.
37 Object of this class is used for printing the log in file as well as oin Terminal
38 """
39 def __init__(self, *files):
40 self.files = files
41
42 def write(self, obj):
43 for f in self.files:
44 f.write(obj)
45 f.flush() # If we want the output to be visible immediately
46
47 def flush(self):
48 for f in self.files:
49 f.flush()
50
51seed_dyn = 42 #Ignore seed_dyn if you are trying to randomize
52abl = "6" #To perform ablation in audio

Calls

no outgoing calls

Tested by

no test coverage detected