Skip to content

Commit

Permalink
Revert "Add a template for examples and apply it for mlm and plm exam…
Browse files Browse the repository at this point in the history
…ples (huggingface#8153)"

This reverts commit 72f8bd1.
  • Loading branch information
fabiocapsouza authored Nov 15, 2020
1 parent b9bb9b3 commit bedb9a9
Show file tree
Hide file tree
Showing 12 changed files with 1,741 additions and 1,000 deletions.
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,9 @@ jobs:
key: v0.4-code_quality-{{ checksum "setup.py" }}
paths:
- '~/.cache/pip'
- run: black --check examples tests src utils
- run: isort --check-only examples tests src utils
- run: flake8 examples tests src utils
- run: black --check examples templates tests src utils
- run: isort --check-only examples templates tests src utils
- run: flake8 examples templates tests src utils
- run: python utils/style_doc.py src/transformers docs/source --max_len 119 --check_only
- run: python utils/check_copies.py
- run: python utils/check_dummies.py
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.PHONY: modified_only_fixup extra_quality_checks quality style fixup fix-copies test test-examples docs


check_dirs := examples tests src utils
check_dirs := examples templates tests src utils

# get modified files since the branch was made
fork_point_sha := $(shell git merge-base --fork-point master)
Expand Down
4 changes: 2 additions & 2 deletions examples/language-modeling/run_clm.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
Here is the full list of checkpoints on the hub that can be fine-tuned by this script:
https://huggingface.co/models?filter=causal-lm
"""
# You can also adapt this script on your own causal language modeling task. Pointers for this are left as comments.
# You can also adapt this script on your own text classification task. Pointers for this are left as comments.

import logging
import math
Expand Down Expand Up @@ -325,7 +325,7 @@ def group_texts(examples):
perplexity = math.exp(eval_output["eval_loss"])
results["perplexity"] = perplexity

output_eval_file = os.path.join(training_args.output_dir, "eval_results_clm.txt")
output_eval_file = os.path.join(training_args.output_dir, "eval_results_lm.txt")
if trainer.is_world_process_zero():
with open(output_eval_file, "w") as writer:
logger.info("***** Eval results *****")
Expand Down
310 changes: 0 additions & 310 deletions examples/language-modeling/run_mlm.py

This file was deleted.

Loading

0 comments on commit bedb9a9

Please sign in to comment.