Skip to content

Commit

Permalink
Updated patch for NNCF integration to the latest transformers release…
Browse files Browse the repository at this point in the history
… v4.23.1 (openvinotoolkit#1328)
  • Loading branch information
ljaljushkin authored Oct 19, 2022
1 parent 60f713f commit 66f2681
Show file tree
Hide file tree
Showing 3 changed files with 316 additions and 389 deletions.
6 changes: 4 additions & 2 deletions tests/torch/test_sanity_third_party.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from tests.common.helpers import PROJECT_ROOT
from tests.torch.helpers import Command

TRANSFORMERS_COMMIT = "bff1c71e84e392af9625c345f9ea71f7b6d75fb3"
TRANSFORMERS_COMMIT = "bd469c40659ce76c81f69c7726759d249b4aef49"
INSTALL_PATH = PROJECT_ROOT.parent
DATASET_PATH = os.path.join(PROJECT_ROOT, "tests", "torch", "data", "mock_datasets")

Expand Down Expand Up @@ -204,7 +204,8 @@ def test_glue_distilbert_eval(self, temp_folder):

@pytest.mark.dependency(depends=['install_trans'], name='lm_train')
def test_lm_train(self, temp_folder):
com_line = "examples/pytorch/language-modeling/run_clm.py --model_name_or_path gpt2" \
# GPT2 is loaded via torch.frombuffer which is not available in torch==1.9.1 yet
com_line = "examples/pytorch/language-modeling/run_clm.py --model_name_or_path distilgpt2" \
" --do_train --per_gpu_train_batch_size 1" \
" --dataset_name wikitext --dataset_config_name wikitext-2-raw-v1 " \
" --num_train_epochs 0.001" \
Expand All @@ -218,6 +219,7 @@ def test_lm_train(self, temp_folder):

@pytest.mark.dependency(depends=['install_trans', 'lm_train'])
def test_lm_eval(self, temp_folder):
# GPT2 is loaded via torch.frombuffer which is not available in torch==1.9.1 yet
com_line = "examples/pytorch/language-modeling/run_clm.py " \
" --model_name_or_path {output} --do_eval " \
" --output_dir {output} --dataset_name wikitext --dataset_config_name wikitext-2-raw-v1" \
Expand Down
Loading

0 comments on commit 66f2681

Please sign in to comment.