huggingface / trl

Train transformer language models with reinforcement learning.
http://hf.co/docs/trl
Apache License 2.0
9.75k stars 1.23k forks source link

ImportError: cannot import name 'DDPOConfig' from 'trl' (unknown location) #1875

Open long-yy opened 2 months ago

long-yy commented 2 months ago

(diffusion_ddpo) XXX@sf:~/code/diffusion_ddpo$ python ddpo.py --num_epochs=200 --train_gradient_accumulation_steps=1 --sample_num_steps=50 --sample_batch_size=6 --train_batch_size=3 --sample_num_batches_per_epoch=4 --per_prompt_stat_tracking=True --per_prompt_stat_tracking_buffer_size=32 --tracker_project_name="stable_diffusion_training" --log_with="wandb" Traceback (most recent call last): File "/lab/XXX/code/diffusion_ddpo/ddpo.py", line 36, in <module> from trl import DDPOConfig, DDPOTrainer, DefaultDDPOStableDiffusionPipeline ImportError: cannot import name 'DDPOConfig' from 'trl' (unknown location)

To modify the source code of TRL, install by'pip install -- editable' , but there are issues

qgallouedec commented 1 week ago

Thanks for reporting. Please provide your system info (see issue template).