Skip to content
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

compatibility issue with transformers #33

Open
kshll6 opened this issue Jan 11, 2023 · 0 comments
Open

compatibility issue with transformers #33

kshll6 opened this issue Jan 11, 2023 · 0 comments

Comments

@kshll6
Copy link

kshll6 commented Jan 11, 2023

  1. I installed private-transformers by pip install git+https://github.com/lxuechen/private-transformers.git

  2. I then installed classification requirements by pip install -r classification/requirements.txt

However, there seems to be a combatibility issue: '
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
private-transformers 0.2.3 requires transformers>=4.20.1, but you have transformers 4.16.2 which is incompatible.

I tried to install transformers==4.20.1 but it seems that the requirements file overwrites with version 4.16.2.

I also tried to run pytest tests, but then got:
==================================== ERRORS ====================================
________________ ERROR collecting tests/test_privacy_engine.py _________________
tests/test_privacy_engine.py:37: in
from private_transformers import PrivacyEngine, freeze_isolated_params_for_vit, supported_layers_grad_samplers
private_transformers/init.py:16: in
from .privacy_engine import PrivacyEngine
private_transformers/privacy_engine.py:33: in
from . import autograd_grad_sample, transformers_support
private_transformers/autograd_grad_sample.py:28: in
from .settings import BackwardHookMode
private_transformers/settings.py:48: in
transformers.models.opt.modeling_opt.OPTForCausalLM,
E AttributeError: module 'transformers.models' has no attribute 'opt'
=========================== short test summary info ============================
ERROR tests/test_privacy_engine.py - AttributeError: module 'transformers.models' has no attribute 'opt'
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
=============================== 1 error in 1.60s ===============================

Update: When I reinstalled private_transformers as in step 1, pytest is working as intended

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant