MCPcopy Create free account
hub / github.com/THUDM/P-tuning / to_json_string

Method to_json_string

PT-Fewshot/pet/utils.py:95–97  ·  view source on GitHub ↗

Serialize this instance to a JSON string.

(self)

Source from the content-addressed store, hash-verified

93 return output
94
95 def to_json_string(self):
96 """Serialize this instance to a JSON string."""
97 return json.dumps(self.to_dict(), indent=2, sort_keys=True) + "\n"
98
99 @staticmethod
100 def load_examples(path: str) -> List['InputExample']:

Callers 1

__repr__Method · 0.95

Calls 1

to_dictMethod · 0.95

Tested by

no test coverage detected