diff --git a/examples/sentiment/scripts/gpt2-sentiment.py b/examples/sentiment/scripts/gpt2-sentiment.py index 03fad03025..4eab354a68 100644 --- a/examples/sentiment/scripts/gpt2-sentiment.py +++ b/examples/sentiment/scripts/gpt2-sentiment.py @@ -20,8 +20,8 @@ from transformers import pipeline, AutoTokenizer from datasets import load_dataset -from trl import PPOTrainer, PPOConfig, AutoModelForCausalLMWithValueHead -from trl.core import LengthSampler, set_seed +from trl import PPOTrainer, PPOConfig, AutoModelForCausalLMWithValueHead, set_seed +from trl.core import LengthSampler ######################################################################## # This is a fully working simple example to use trl with accelerate. diff --git a/examples/sentiment/scripts/t5-sentiment.py b/examples/sentiment/scripts/t5-sentiment.py index 1dcf105733..aa88c226b5 100644 --- a/examples/sentiment/scripts/t5-sentiment.py +++ b/examples/sentiment/scripts/t5-sentiment.py @@ -19,8 +19,8 @@ from transformers import pipeline, AutoTokenizer from datasets import load_dataset -from trl import PPOTrainer, PPOConfig, AutoModelForSeq2SeqLMWithValueHead -from trl.core import LengthSampler, set_seed +from trl import PPOTrainer, PPOConfig, AutoModelForSeq2SeqLMWithValueHead, set_seed +from trl.core import LengthSampler ######################################################################## # This is a fully working simple example to use trl with accelerate. diff --git a/tests/trainer/test_ppo_trainer.py b/tests/trainer/test_ppo_trainer.py index 0c03d71168..560d04e89e 100644 --- a/tests/trainer/test_ppo_trainer.py +++ b/tests/trainer/test_ppo_trainer.py @@ -97,7 +97,6 @@ def tearDownClass(cls): pass def setUp(self): - # model_id model_id = "gpt2" diff --git a/trl/__init__.py b/trl/__init__.py index fc6533916a..0c1001d2f7 100644 --- a/trl/__init__.py +++ b/trl/__init__.py @@ -2,6 +2,7 @@ __version__ = "0.2.2.dev0" +from .core import set_seed from .models import ( AutoModelForCausalLMWithValueHead, AutoModelForSeq2SeqLMWithValueHead,