From b836e6f3213a52c0ba62750fee01b3e014e131a8 Mon Sep 17 00:00:00 2001 From: William Falcon Date: Wed, 24 Jul 2019 15:43:10 -0400 Subject: [PATCH] removed dead code in model save --- pytorch_lightning/root_module/model_saving.py | 29 ------------------- setup.cfg | 2 ++ 2 files changed, 2 insertions(+), 29 deletions(-) diff --git a/pytorch_lightning/root_module/model_saving.py b/pytorch_lightning/root_module/model_saving.py index 818c194748..0569c89022 100644 --- a/pytorch_lightning/root_module/model_saving.py +++ b/pytorch_lightning/root_module/model_saving.py @@ -184,32 +184,3 @@ class TrainerIO(object): return max(ckpt_vs) - -def load_hparams_from_tags_csv(tags_csv): - from argparse import Namespace - import pandas as pd - - tags_df = pd.read_csv(tags_csv) - dic = tags_df.to_dict(orient='records') - - ns_dict = {row['key']: convert(row['value']) for row in dic} - - ns = Namespace(**ns_dict) - return ns - - -def convert(val): - constructors = [int, float, str] - - if type(val) is str: - if val.lower() == 'true': - return True - if val.lower() == 'false': - return False - - for c in constructors: - try: - return c(val) - except ValueError: - pass - return val diff --git a/setup.cfg b/setup.cfg index 268362a152..8aea30d4ad 100644 --- a/setup.cfg +++ b/setup.cfg @@ -30,3 +30,5 @@ exclude_lines = raise NotImplementedError if 0: if __name__ == .__main__.: + pt_callbacks.py +