Skip to content

Commit

Permalink
Back out "[PyText] cache lm packed data" (facebookresearch#454)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: facebookresearch#454

Original commit changeset: 05b0880e6d0c

Reviewed By: borguz

Differential Revision: D14807451

fbshipit-source-id: dafbc76b4660eeb296f76eff9ce14b94528d6390
  • Loading branch information
chenyangyu1988 authored and facebook-github-bot committed Apr 8, 2019
1 parent 5f8250c commit 3dfc728
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
2 changes: 0 additions & 2 deletions pytext/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
export_saved_model_to_torchscript,
get_logits as workflow_get_logits,
prepare_task_metadata,
preprocess_task,
test_model_from_snapshot_path,
train_model,
)
Expand Down Expand Up @@ -314,7 +313,6 @@ def train(context):
if config.use_tensorboard:
metric_channels.append(TensorBoardChannel())
try:
preprocess_task(config)
if config.distributed_world_size == 1:
train_model(config, metric_channels=metric_channels)
else:
Expand Down
9 changes: 0 additions & 9 deletions pytext/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,6 @@ def prepare_task(
return task


def preprocess_task(config: PyTextConfig):
if hasattr(config.task, "data") and hasattr(config.task.data, "numberized_dir"):
if config.load_snapshot_path and os.path.isfile(config.load_snapshot_path):
task = load(config.load_snapshot_path)
else:
task = create_task(config.task)
task.data.initialize_numberized_data()


def save_and_export(
config: PyTextConfig, task: Task, metric_channels: Optional[List[Channel]] = None
) -> None:
Expand Down

0 comments on commit 3dfc728

Please sign in to comment.