Last active
April 11, 2023 09:24
-
-
Save SubhadityaMukherjee/0d58b259e67d01029a47e96b373345bc to your computer and use it in GitHub Desktop.
tbimports
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
""" | |
Run result aggregator | |
- Read all tensorbord logs and save as a pandas dataframe for analysis | |
""" | |
import os | |
import pandas as pd | |
from tensorboard.backend.event_processing.event_accumulator import EventAccumulator | |
from tqdm import tqdm | |
from pathlib import Path | |
import matplotlib.pyplot as plt | |
from io import BytesIO | |
from PIL import Image | |
import pickle | |
import argparse | |
parser = argparse.ArgumentParser(description="Process some training options.") | |
parser.add_argument( | |
"-i", "--save_images", action="store_true", help="Save images to table" | |
) | |
args = parser.parse_args() | |
main_path = "./runs/" | |
def save_pickle(*args, fname="pickler.pkl") -> None: | |
with open(fname, "wb") as f: | |
pickle.dump(args, f) | |
def read_pickle(fname="pickler.pkl"): | |
with open(fname, "rb") as f: | |
obj = pickle.load(f) | |
return obj |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment