salesforce / ULIP

BSD 3-Clause "New" or "Revised" License
437 stars 44 forks source link

Fix for deprecated torch string_classes import #25

Closed juanmiguelnc closed 1 year ago

juanmiguelnc commented 1 year ago

This commit fixes a deprecated import statement in the codebase that uses the string_classes module from PyTorch. The deprecated import statement from torch import string_classes has been replaced with a simpler and more Pythonic alternative string_classes = str.

The string_classes module was previously used to define the type of a string, but it has been removed in more recent versions of PyTorch. This commit provides a cleaner and more compatible solution that works with newer versions of PyTorch.

See https://github.com/pytorch/pytorch/pull/94709

salesforce-cla[bot] commented 1 year ago

Thanks for the contribution! Before we can merge this, we need @juanmnavarro to sign the Salesforce Inc. Contributor License Agreement.