-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot import name 'UnencryptedCookieSessionFactoryConfig' from 'pyramid.session' (unknown location) when run “run_unlearn.py --target_model_name_or_path ../../models/Yi-6B --per_device_train_batch_size 1 --do_unlearn --output_dir ./output --overwrite_output_dir --num_train_epochs 1 --logging_steps 1 --learning_rate 2e-5 --warmup_ratio 0.03 --overwrite_cache --save_total_limit 1 --fsdp "full_shard auto_wrap" --fsdp_transformer_layer_cls_to_wrap 'LlamaDecoderLayer' --bf16 True --tf32 True --weight_decay 0. --lr_scheduler_type "cosine" --domain github --gradient_accumulation_steps 85 --unlearn_method gradient_ascent “ #8
Comments
I haven't encountered this issue before. Please ensure you're using |
Could you please export your env package list and share with us? |
Here is the output from |
Thanks a lot, and just kindly ask what is the CUDA version that you used, and what is your GPU name? |
I updated the above package list since I found the records of my experiments. I used CUDA 11.8 and A800 GPU. |
Hi Jin, I'm having the exact similar issue when running the run_unlearn.py :( My environment are set up consistently with your settings already. |
Could the author help me to solve this?
Traceback (most recent call last):
File "
/miniconda3/envs/unlearning_llm/lib/python3.12/site-packages/transformers/utils/import_utils.py", line 1764, in _get_module/miniconda3/envs/unlearning_llm/lib/python3.12/importlib/init.py", line 90, in import_modulereturn importlib.import_module("." + module_name, self.name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1331, in _find_and_load_unlocked
File "", line 935, in _load_unlocked
File "", line 995, in exec_module
File "", line 488, in _call_with_frames_removed
File "
/miniconda3/envs/unlearning_llm/lib/python3.12/site-packages/transformers/trainer.py", line 189, in/miniconda3/envs/unlearning_llm/lib/python3.12/site-packages/apex/init.py", line 13, infrom apex import amp
File "
from pyramid.session import UnencryptedCookieSessionFactoryConfig
ImportError: cannot import name 'UnencryptedCookieSessionFactoryConfig' from 'pyramid.session' (unknown location)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "
//Machine Unlearning of Pre-trained Large Language Models/llm_unlearn/run_unlearn.py", line 42, infrom transformers import (
File "", line 1412, in _handle_fromlist
File "
/miniconda3/envs/unlearning_llm/lib/python3.12/site-packages/transformers/utils/import_utils.py", line 1754, in getattr/miniconda3/envs/unlearning_llm/lib/python3.12/site-packages/transformers/utils/import_utils.py", line 1766, in _get_modulemodule = self._get_module(self._class_to_module[name])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "
raise RuntimeError(
RuntimeError: Failed to import transformers.trainer because of the following error (look up to see its traceback):
cannot import name 'UnencryptedCookieSessionFactoryConfig' from 'pyramid.session' (unknown location)
The text was updated successfully, but these errors were encountered: