huggingface/optimum-habana

Transformers 4.45.0 incompatible with Optimum Habana 1.14.0.dev0

Closed this issue · 7 comments

Hi @regisss, I am encountering the below issue while executing bridgetower test.

Error:

ERROR: Cannot install optimum-habana==1.14.0.dev0 and transformers==4.45.0 because these package versions have conflicting dependencies.\n#8 20.13 \n#8 20.13 The conflict is caused by:\n#8 20.13     The user requested transformers==4.45.0\n#8 20.13     optimum-habana 1.14.0.dev0 depends on transformers<4.46.0 and >=4.45.2\n#8 20.13 \n#8 20.13 To fix this you could try to:\n#8 20.13 1. loosen the range of package versions you've specified\n#8 20.13 2. remove package versions to allow pip to attempt to solve the dependency conflict

But on the main branch, the minimum versions that are being checked are optimum-habana==1.14.0.dev0 and transformers==4.45.0


check_optimum_habana_min_version("1.14.0.dev0")

This is incompatible as per the error above.

Can you please provide some resolution on this?
Also since, we regularly update these tests with each release, can you further provide a branch/tag that has compatible optimum_habana and transformers' versions and can be followed for future releases?

Update: I tried with transformers version: v4.45.2 and optimum-habana version: 1.14.0.dev0 as mentioned in the error and the test worked.
But with the minimum check versions in the bridgetower.py, it is erroring out.

Yes, the dependency in setup.py is transformers >= 4.45.2:

"transformers >= 4.45.2, < 4.46.0",

Installing the library should automatically update Transformers. Is there a specific reason you need to use Transformers v4.45.0 ?

But with the minimum check versions in the bridgetower.py, it is erroring out.

We can update all the check_min_version in every example, but I don't think it matters much as transformers >= 4.45.2 is a global dependency of the library and does satisfy check_min_version("4.45.0"). Feel free to open a PR if you think it should be updated.

Yes, the dependency in setup.py is transformers >= 4.45.2:

"transformers >= 4.45.2, < 4.46.0",

Installing the library should automatically update Transformers. Is there a specific reason you need to use Transformers v4.45.0 ?

No, we can work with v4.45.2 or any other versions that is supported for the test. In our current execution setup, we don't install the library manually, instead we pass the transformers version manually. That could have been the reason.

But with the minimum check versions in the bridgetower.py, it is erroring out.

We can update all the check_min_version in every example, but I don't think it matters much as transformers >= 4.45.2 is a global dependency of the library and does satisfy check_min_version("4.45.0"). Feel free to open a PR if you think it should be updated.

I think we can work with it since the exact supported version's range in given in setup.py. If we do have more issues regarding this, I will create a PR and work with you to push it.

Some questions:

  1. Can I track setup.py for finding exact transformers' version after each new release?
    "transformers >= 4.45.2, < 4.46.0",
  2. Do I need to clone a specific branch from optimum_habana_version with transformers version given in setup.py? If yes, where can I track it?
    If not, Is 1.14.0.dev0 default?

Thank you!

Can I track setup.py for finding exact transformers' version after each new release?

Yep this will work!

Do I need to clone a specific branch from optimum_habana_version with transformers version given in setup.py? If yes, where can I track it?
If not, Is 1.14.0.dev0 default?

The main branch should have the latest changes, unless you want to test a new Transformers version while we are testing it in an open PR.

Can I track setup.py for finding exact transformers' version after each new release?

Yep this will work!

Do I need to clone a specific branch from optimum_habana_version with transformers version given in setup.py? If yes, where can I track it?
If not, Is 1.14.0.dev0 default?

The main branch should have the latest changes, unless you want to test a new Transformers version while we are testing it in an open PR.

Awesome, this was helpful. Thanks @regisss for all the help!