Skip to content

Commit

Permalink
4.36 conflict resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
Cemberk committed Apr 24, 2024
2 parents 72a0aeb + a7cab3c commit 4090297
Show file tree
Hide file tree
Showing 54 changed files with 60 additions and 89 deletions.
2 changes: 1 addition & 1 deletion examples/flax/question-answering/run_qa.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
logger = logging.getLogger(__name__)

# Will error if the minimal version of Transformers is not installed. Remove at your own risks.
check_min_version("4.37.0.dev0")
check_min_version("4.36.0")

Array = Any
Dataset = datasets.arrow_dataset.Dataset
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@


# Will error if the minimal version of Transformers is not installed. Remove at your own risk.
check_min_version("4.37.0.dev0")
check_min_version("4.36.0")

require_version("datasets>=2.14.0", "To fix: pip install -r examples/flax/speech-recogintion/requirements.txt")

Expand Down
2 changes: 1 addition & 1 deletion examples/flax/text-classification/run_flax_glue.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@

logger = logging.getLogger(__name__)
# Will error if the minimal version of Transformers is not installed. Remove at your own risks.
check_min_version("4.37.0.dev0")
check_min_version("4.36.0")

Array = Any
Dataset = datasets.arrow_dataset.Dataset
Expand Down
2 changes: 1 addition & 1 deletion examples/flax/token-classification/run_flax_ner.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@

logger = logging.getLogger(__name__)
# Will error if the minimal version of Transformers is not installed. Remove at your own risks.
check_min_version("4.37.0.dev0")
check_min_version("4.36.0")

require_version("datasets>=1.8.0", "To fix: pip install -r examples/pytorch/token-classification/requirements.txt")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
logger = logging.getLogger(__name__)

# Will error if the minimal version of Transformers is not installed. Remove at your own risks.
check_min_version("4.37.0.dev0")
check_min_version("4.36.0")

require_version("datasets>=1.14.0", "To fix: pip install -r examples/pytorch/audio-classification/requirements.txt")

Expand Down
2 changes: 1 addition & 1 deletion examples/pytorch/contrastive-image-text/run_clip.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
logger = logging.getLogger(__name__)

# Will error if the minimal version of Transformers is not installed. Remove at your own risks.
check_min_version("4.37.0.dev0")
check_min_version("4.36.0")

require_version("datasets>=1.8.0", "To fix: pip install -r examples/pytorch/contrastive-image-text/requirements.txt")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
logger = logging.getLogger(__name__)

# Will error if the minimal version of Transformers is not installed. Remove at your own risks.
check_min_version("4.37.0.dev0")
check_min_version("4.36.0")

require_version("datasets>=1.8.0", "To fix: pip install -r examples/pytorch/image-classification/requirements.txt")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@


# Will error if the minimal version of Transformers is not installed. Remove at your own risks.
check_min_version("4.37.0.dev0")
check_min_version("4.36.0")

logger = get_logger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion examples/pytorch/image-pretraining/run_mae.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
logger = logging.getLogger(__name__)

# Will error if the minimal version of Transformers is not installed. Remove at your own risks.
check_min_version("4.37.0.dev0")
check_min_version("4.36.0")

require_version("datasets>=1.8.0", "To fix: pip install -r examples/pytorch/image-pretraining/requirements.txt")

Expand Down
2 changes: 1 addition & 1 deletion examples/pytorch/image-pretraining/run_mim.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
logger = logging.getLogger(__name__)

# Will error if the minimal version of Transformers is not installed. Remove at your own risks.
check_min_version("4.37.0.dev0")
check_min_version("4.36.0")

require_version("datasets>=1.8.0", "To fix: pip install -r examples/pytorch/image-pretraining/requirements.txt")

Expand Down
2 changes: 1 addition & 1 deletion examples/pytorch/image-pretraining/run_mim_no_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
logger = logging.getLogger(__name__)

# Will error if the minimal version of Transformers is not installed. Remove at your own risks.
check_min_version("4.37.0.dev0")
check_min_version("4.36.0")

require_version("datasets>=1.8.0", "To fix: pip install -r examples/pytorch/image-pretraining/requirements.txt")

Expand Down
2 changes: 1 addition & 1 deletion examples/pytorch/language-modeling/run_clm.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@


# Will error if the minimal version of Transformers is not installed. Remove at your own risks.
check_min_version("4.37.0.dev0")
check_min_version("4.36.0")

require_version("datasets>=1.8.0", "To fix: pip install -r examples/pytorch/language-modeling/requirements.txt")

Expand Down
2 changes: 1 addition & 1 deletion examples/pytorch/language-modeling/run_clm_no_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@


# Will error if the minimal version of Transformers is not installed. Remove at your own risks.
check_min_version("4.37.0.dev0")
check_min_version("4.36.0")

logger = get_logger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion examples/pytorch/language-modeling/run_mlm.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@


# Will error if the minimal version of Transformers is not installed. Remove at your own risks.
check_min_version("4.37.0.dev0")
check_min_version("4.36.0")

require_version("datasets>=1.8.0", "To fix: pip install -r examples/pytorch/language-modeling/requirements.txt")

Expand Down
2 changes: 1 addition & 1 deletion examples/pytorch/language-modeling/run_mlm_no_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@


# Will error if the minimal version of Transformers is not installed. Remove at your own risks.
check_min_version("4.37.0.dev0")
check_min_version("4.36.0")

logger = get_logger(__name__)
require_version("datasets>=1.8.0", "To fix: pip install -r examples/pytorch/language-modeling/requirements.txt")
Expand Down
2 changes: 1 addition & 1 deletion examples/pytorch/language-modeling/run_plm.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@


# Will error if the minimal version of Transformers is not installed. Remove at your own risks.
check_min_version("4.37.0.dev0")
check_min_version("4.36.0")

require_version("datasets>=1.8.0", "To fix: pip install -r examples/pytorch/language-modeling/requirements.txt")

Expand Down
2 changes: 1 addition & 1 deletion examples/pytorch/multiple-choice/run_swag.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@


# Will error if the minimal version of Transformers is not installed. Remove at your own risks.
check_min_version("4.37.0.dev0")
check_min_version("4.36.0")

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion examples/pytorch/multiple-choice/run_swag_no_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@


# Will error if the minimal version of Transformers is not installed. Remove at your own risks.
check_min_version("4.37.0.dev0")
check_min_version("4.36.0")

logger = get_logger(__name__)
# You should update this to your particular problem to have better documentation of `model_type`
Expand Down
2 changes: 1 addition & 1 deletion examples/pytorch/question-answering/run_qa.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@


# Will error if the minimal version of Transformers is not installed. Remove at your own risks.
check_min_version("4.37.0.dev0")
check_min_version("4.36.0")

require_version("datasets>=1.8.0", "To fix: pip install -r examples/pytorch/question-answering/requirements.txt")

Expand Down
2 changes: 1 addition & 1 deletion examples/pytorch/question-answering/run_qa_beam_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@


# Will error if the minimal version of Transformers is not installed. Remove at your own risks.
check_min_version("4.37.0.dev0")
check_min_version("4.36.0")

require_version("datasets>=1.8.0", "To fix: pip install -r examples/pytorch/question-answering/requirements.txt")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@


# Will error if the minimal version of Transformers is not installed. Remove at your own risks.
check_min_version("4.37.0.dev0")
check_min_version("4.36.0")

require_version("datasets>=1.8.0", "To fix: pip install -r examples/pytorch/question-answering/requirements.txt")

Expand Down
2 changes: 1 addition & 1 deletion examples/pytorch/question-answering/run_qa_no_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@


# Will error if the minimal version of Transformers is not installed. Remove at your own risks.
check_min_version("4.37.0.dev0")
check_min_version("4.36.0")

require_version("datasets>=1.8.0", "To fix: pip install -r examples/pytorch/question-answering/requirements.txt")

Expand Down
2 changes: 1 addition & 1 deletion examples/pytorch/question-answering/run_seq2seq_qa.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@


# Will error if the minimal version of Transformers is not installed. Remove at your own risks.
check_min_version("4.37.0.dev0")
check_min_version("4.36.0")

require_version("datasets>=1.8.0", "To fix: pip install -r examples/pytorch/question-answering/requirements.txt")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
logger = logging.getLogger(__name__)

# Will error if the minimal version of Transformers is not installed. Remove at your own risks.
check_min_version("4.37.0.dev0")
check_min_version("4.36.0")

require_version("datasets>=2.0.0", "To fix: pip install -r examples/pytorch/semantic-segmentation/requirements.txt")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@


# Will error if the minimal version of Transformers is not installed. Remove at your own risks.
check_min_version("4.37.0.dev0")
check_min_version("4.36.0")

logger = get_logger(__name__)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@


# Will error if the minimal version of Transformers is not installed. Remove at your own risks.
check_min_version("4.37.0.dev0")
check_min_version("4.36.0")

require_version("datasets>=1.18.0", "To fix: pip install -r examples/pytorch/speech-recognition/requirements.txt")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@


# Will error if the minimal version of Transformers is not installed. Remove at your own risks.
check_min_version("4.37.0.dev0")
check_min_version("4.36.0")

require_version("datasets>=1.18.0", "To fix: pip install -r examples/pytorch/speech-recognition/requirements.txt")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@


# Will error if the minimal version of Transformers is not installed. Remove at your own risks.
check_min_version("4.37.0.dev0")
check_min_version("4.36.0")

require_version("datasets>=1.18.0", "To fix: pip install -r examples/pytorch/speech-recognition/requirements.txt")

Expand Down
2 changes: 1 addition & 1 deletion examples/pytorch/summarization/run_summarization.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@


# Will error if the minimal version of Transformers is not installed. Remove at your own risks.
check_min_version("4.37.0.dev0")
check_min_version("4.36.0")

require_version("datasets>=1.8.0", "To fix: pip install -r examples/pytorch/summarization/requirements.txt")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@


# Will error if the minimal version of Transformers is not installed. Remove at your own risks.
check_min_version("4.37.0.dev0")
check_min_version("4.36.0")

logger = get_logger(__name__)
require_version("datasets>=1.8.0", "To fix: pip install -r examples/pytorch/summarization/requirements.txt")
Expand Down
20 changes: 4 additions & 16 deletions examples/pytorch/test_accelerate_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,9 @@ def setUpClass(cls):
def tearDownClass(cls):
shutil.rmtree(cls.tmpdir)

<<<<<<< HEAD

@pytest.mark.skip(reason="rocm skip")
@mock.patch.dict(os.environ, {"WANDB_MODE": "offline"})
=======
@mock.patch.dict(os.environ, {"WANDB_MODE": "offline", "DVCLIVE_TEST": "true"})
>>>>>>> main
def test_run_glue_no_trainer(self):
tmp_dir = self.get_auto_remove_tmp_dir()
testargs = f"""
Expand Down Expand Up @@ -155,12 +152,9 @@ def test_run_mlm_no_trainer(self):
self.assertTrue(os.path.exists(os.path.join(tmp_dir, "epoch_0")))
self.assertTrue(os.path.exists(os.path.join(tmp_dir, "mlm_no_trainer")))

<<<<<<< HEAD

@pytest.mark.skip(reason="rocm skip")
@mock.patch.dict(os.environ, {"WANDB_MODE": "offline"})
=======
@mock.patch.dict(os.environ, {"WANDB_MODE": "offline", "DVCLIVE_TEST": "true"})
>>>>>>> main
def test_run_ner_no_trainer(self):
# with so little data distributed training needs more epochs to get the score on par with 0/1 gpu
epochs = 7 if backend_device_count(torch_device) > 1 else 2
Expand Down Expand Up @@ -216,12 +210,9 @@ def test_run_squad_no_trainer(self):
self.assertTrue(os.path.exists(os.path.join(tmp_dir, "epoch_0")))
self.assertTrue(os.path.exists(os.path.join(tmp_dir, "qa_no_trainer")))

<<<<<<< HEAD

@pytest.mark.skip(reason="rocm skip")
@mock.patch.dict(os.environ, {"WANDB_MODE": "offline"})
=======
@mock.patch.dict(os.environ, {"WANDB_MODE": "offline", "DVCLIVE_TEST": "true"})
>>>>>>> main
def test_run_swag_no_trainer(self):
tmp_dir = self.get_auto_remove_tmp_dir()
testargs = f"""
Expand Down Expand Up @@ -326,12 +317,9 @@ def test_run_semantic_segmentation_no_trainer(self):
result = get_results(tmp_dir)
self.assertGreaterEqual(result["eval_overall_accuracy"], 0.10)

<<<<<<< HEAD

@pytest.mark.skip(reason="rocm skip")
@mock.patch.dict(os.environ, {"WANDB_MODE": "offline"})
=======
@mock.patch.dict(os.environ, {"WANDB_MODE": "offline", "DVCLIVE_TEST": "true"})
>>>>>>> main
def test_run_image_classification_no_trainer(self):
tmp_dir = self.get_auto_remove_tmp_dir()
testargs = f"""
Expand Down
2 changes: 1 addition & 1 deletion examples/pytorch/text-classification/run_classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@


# Will error if the minimal version of Transformers is not installed. Remove at your own risks.
check_min_version("4.37.0.dev0")
check_min_version("4.36.0")

require_version("datasets>=1.8.0", "To fix: pip install -r examples/pytorch/text-classification/requirements.txt")

Expand Down
2 changes: 1 addition & 1 deletion examples/pytorch/text-classification/run_glue.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@


# Will error if the minimal version of Transformers is not installed. Remove at your own risks.
check_min_version("4.37.0.dev0")
check_min_version("4.36.0")

require_version("datasets>=1.8.0", "To fix: pip install -r examples/pytorch/text-classification/requirements.txt")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@


# Will error if the minimal version of Transformers is not installed. Remove at your own risks.
check_min_version("4.37.0.dev0")
check_min_version("4.36.0")

logger = get_logger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion examples/pytorch/text-classification/run_xnli.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@


# Will error if the minimal version of Transformers is not installed. Remove at your own risks.
check_min_version("4.37.0.dev0")
check_min_version("4.36.0")

require_version("datasets>=1.8.0", "To fix: pip install -r examples/pytorch/text-classification/requirements.txt")

Expand Down
2 changes: 1 addition & 1 deletion examples/pytorch/token-classification/run_ner.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@


# Will error if the minimal version of Transformers is not installed. Remove at your own risks.
check_min_version("4.37.0.dev0")
check_min_version("4.36.0")

require_version("datasets>=1.8.0", "To fix: pip install -r examples/pytorch/token-classification/requirements.txt")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@


# Will error if the minimal version of Transformers is not installed. Remove at your own risks.
check_min_version("4.37.0.dev0")
check_min_version("4.36.0")

logger = get_logger(__name__)
require_version("datasets>=1.8.0", "To fix: pip install -r examples/pytorch/token-classification/requirements.txt")
Expand Down
2 changes: 1 addition & 1 deletion examples/pytorch/translation/run_translation.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@


# Will error if the minimal version of Transformers is not installed. Remove at your own risks.
check_min_version("4.37.0.dev0")
check_min_version("4.36.0")

require_version("datasets>=1.8.0", "To fix: pip install -r examples/pytorch/translation/requirements.txt")

Expand Down
2 changes: 1 addition & 1 deletion examples/pytorch/translation/run_translation_no_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@


# Will error if the minimal version of Transformers is not installed. Remove at your own risks.
check_min_version("4.37.0.dev0")
check_min_version("4.36.0")

logger = get_logger(__name__)
require_version("datasets>=1.8.0", "To fix: pip install -r examples/pytorch/translation/requirements.txt")
Expand Down
Loading

0 comments on commit 4090297

Please sign in to comment.