Commit d0b875ed authored by Mik Vyatskov's avatar Mik Vyatskov Committed by Facebook GitHub Bot
Browse files

Remove no longer needed method

Summary:
Pull Request resolved: https://github.com/facebookresearch/d2go/pull/315

This method is no longer needed given the there's a better
alternative: save/load_binary_output.

Reviewed By: tglik, wat3rBro

Differential Revision: D37307668

fbshipit-source-id: 598a6d7aeb68f65fa6b42a230175c37d19fd7798
parent 07eb7a1e
...@@ -98,26 +98,6 @@ def dump_trained_model_configs( ...@@ -98,26 +98,6 @@ def dump_trained_model_configs(
return trained_model_configs return trained_model_configs
# TODO: Remove once the interface for passing the result of training is figured out.
def read_trained_model_configs(output_dir: str) -> Dict[str, str]:
"""Reads trained model config files from output_dir.
Args:
output_dir: output directory.
Returns:
A map of model name to model config path.
"""
trained_model_config_dir = os.path.join(output_dir, TRAINED_MODEL_CONFIGS_DIR)
if not PathManager.exists(trained_model_config_dir):
return {}
return {
# model_name.yaml -> model_name
os.path.splitext(filename)[0]: os.path.join(trained_model_config_dir, filename)
for filename in PathManager.ls(trained_model_config_dir)
}
def save_binary_outputs(filename: str, outputs: Any) -> None: def save_binary_outputs(filename: str, outputs: Any) -> None:
"""Helper function to serialize and save function outputs in binary format.""" """Helper function to serialize and save function outputs in binary format."""
with PathManager.open(filename, "wb") as f: with PathManager.open(filename, "wb") as f:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment