This file contains 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
""" Generates a random dataset. """ | |
import argparse | |
import os | |
import shutil | |
import numpy as np | |
import pandas as pd | |
import torch |
This file contains 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
import logging | |
import os | |
import random | |
from itertools import cycle | |
import torch | |
import pandas as pd | |
import numpy as np | |
from types import FunctionType |
This file contains 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
def run_one_epoch(data, conn): | |
epoch_start = time.time() | |
for batch in data: | |
pass | |
epoch_end = time.time() | |
conn.send(round(epoch_end - epoch_start, 6)) | |
def measure_data_load_speed(data, num_epochs): |
This file contains 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 pytorch_lightning.callbacks.base import Callback | |
from torch import lt, gt | |
from pytorch_lightning.utilities.exceptions import MisconfigurationException | |
class MetricTrackerCallback(Callback): | |
"""A callback outline that takes action each time a tracked variable improves.""" |