examples/tensorflow/benchmarking/plot_csv_file.py/Plot/__init__
class Plot:    def __init__(self, args):
        self.args = args
        self.result_dict = defaultdict(lambda: dict(bsz=[], seq_len=[], result={}))

        with open(self.args.csv_file, newline="") as csv_file:
            reader = csv.DictReader(csv_file)
            for row in reader:
                model_name = row["model"]
                self.result_dict[model_name]["bsz"].append(int(row["batch_size"]))
                self.result_dict[model_name]["seq_len"].append(int(row["sequence_length"]))
                if can_convert_to_int(row["result"]):
                    # value is not None
                    self.result_dict[model_name]["result"][
                        (int(row["batch_size"]), int(row["sequence_length"]))
                    ] = int(row["result"])
                elif can_convert_to_float(row["result"]):
                    # value is not None
                    self.result_dict[model_name]["result"][
                        (int(row["batch_size"]), int(row["sequence_length"]))
                    ] = float(row["result"])