optimum-habana icon indicating copy to clipboard operation
optimum-habana copied to clipboard

After accelerate v0.28.0, the `split_batches` of class Accelerator became a unsettable property method

Open eraser00 opened this issue 10 months ago • 2 comments

https://github.com/huggingface/optimum-habana/blob/eaac913c56617a4deefa99548d89366722b7397e/optimum/habana/accelerate/accelerator.py#L250

As the src code above, optimum-habana impl a subclass of Accelerator with some copied codes from an older version accelerate.

but after accelerate v0.27.2

Accelerator Accelerator

The spile_batches became a property method, which can't be set directly. That breaks optimum-habana working with any newer accelerate versions.

Maybe the requirements.txt should be updated with accelerate <= 0.27.2?

eraser00 avatar Apr 08 '24 14:04 eraser00

Save my time

SefaZeng avatar Apr 10 '24 04:04 SefaZeng

That's already the case, Accelerate is pinned here: https://github.com/huggingface/optimum-habana/blob/060ddee48f247f049973cde02b2bb3b055febf52/setup.py#L35 If you have Accelerate v0.28, there is an issue in the way Optimum Habana was installed. Can you try again in a fresh environment?

regisss avatar Apr 11 '24 14:04 regisss