Skip to content

use native torch_empty_cache_steps #2689

Open
@winglian

Description

@winglian

⚠️ Please check that this feature request hasn't been suggested before.

  • I searched previous Ideas in Discussions didn't find any similar feature requests.
  • I searched previous Issues didn't find any similar feature requests.

🔖 Feature description

Transformers recently added torch_empty_cache_steps as an args to the trainer. We should transition our gc_steps to use that.

✔️ Solution

in validation set torch_empty_cache_steps if gc_steps used. gc_steps also does a gc.collect() which transformers trainer doesn't do, so we should still support that.

❓ Alternatives

No response

📝 Additional Context

No response

Acknowledgements

  • My issue title is concise, descriptive, and in title casing.
  • I have searched the existing issues to make sure this feature has not been requested yet.
  • I have provided enough information for the maintainers to understand and evaluate this request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions