06dc59afe4657c009430a4673f1504feb69d2736,torchtext/data/example.py,Example,fromJSON,#Any#Any#Any#,12
Before Change
@classmethod
def fromJSON(cls, data, fields):
warnings.warn("Example class will be retired soon and moved to torchtext.legacy. Please see the most recent release notes for further information.", UserWarning)
ex = cls()
obj = json.loads(data)
for key, vals in fields.items():
After Change
class Example(object):
@classmethod
def fromJSON(cls, data, fields):
warnings.warn("{} class has ".format(self.__class__.__name__) +
"been retired and moved to torchtext.legacy. Please " +
"import from torchtext.legacy.data if you still want it.", UserWarning)
raise ImportWarning
@classmethod
def fromdict(cls, data, fields):
In pattern: SUPERPATTERN
Frequency: 5
Non-data size: 6
Instances
Project Name: pytorch/text
Commit Name: 06dc59afe4657c009430a4673f1504feb69d2736
Time: 2021-02-17
Author: 6156351+zhangguanheng66@users.noreply.github.com
File Name: torchtext/data/example.py
Class Name: Example
Method Name: fromJSON
Project Name: pytorch/text
Commit Name: 06dc59afe4657c009430a4673f1504feb69d2736
Time: 2021-02-17
Author: 6156351+zhangguanheng66@users.noreply.github.com
File Name: torchtext/data/example.py
Class Name: Example
Method Name: fromtree
Project Name: pytorch/text
Commit Name: 06dc59afe4657c009430a4673f1504feb69d2736
Time: 2021-02-17
Author: 6156351+zhangguanheng66@users.noreply.github.com
File Name: torchtext/data/example.py
Class Name: Example
Method Name: fromlist
Project Name: pytorch/text
Commit Name: 06dc59afe4657c009430a4673f1504feb69d2736
Time: 2021-02-17
Author: 6156351+zhangguanheng66@users.noreply.github.com
File Name: torchtext/data/example.py
Class Name: Example
Method Name: fromdict
Project Name: pytorch/text
Commit Name: 06dc59afe4657c009430a4673f1504feb69d2736
Time: 2021-02-17
Author: 6156351+zhangguanheng66@users.noreply.github.com
File Name: torchtext/data/example.py
Class Name: Example
Method Name: fromCSV