huggingface / optimum-habana

Easy and lightning fast training of 🤗 Transformers on Habana Gaudi processor (HPU)
Apache License 2.0
123 stars 148 forks source link

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

Open eraser00 opened 3 months ago

eraser00 commented 3 months ago

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?

SefaZeng commented 3 months ago

Save my time

regisss commented 2 months ago

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?