amzn / pecos

PECOS - Prediction for Enormous and Correlated Spaces
https://libpecos.org/
Apache License 2.0
516 stars 105 forks source link

fix sparse gradient clipping for torch>=2.0 #288

Closed jiong-zhang closed 6 months ago

jiong-zhang commented 6 months ago

Issue #, if available: N/A

Description of changes:

Update the torch dependency to >= 2.0. Since the gradient clipping no longer supports SparseCUDA backend, I include an old implementation of torch.nn.clip_grad_norm_ from torch==1.13.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.