MCPcopy Create free account
hub / github.com/PAIR-code/lit / save

Method save

lit_nlp/api/dataset.py:172–188  ·  view source on GitHub ↗

Save newly-created datapoints to disk in a dataset-specific format. Subclasses should override this method if they wish to save new, persisted datapoints in their own file format in addition to the LIT-specific format they are already saved in. Args: examples: A list of datap

(self, examples: list[IndexedInput], path: str)

Source from the content-addressed store, hash-verified

170 pass
171
172 def save(self, examples: list[IndexedInput], path: str):
173 """Save newly-created datapoints to disk in a dataset-specific format.
174
175 Subclasses should override this method if they wish to save new, persisted
176 datapoints in their own file format in addition to the LIT-specific format
177 they are already saved in.
178
179 Args:
180 examples: A list of datapoints to save.
181 path: The path to save the datapoints to.
182
183 Returns:
184 (string) The path to the saved data, or None if unimplemented.
185 """
186 if self._base is not None:
187 return self._base.save(examples, path)
188 pass
189
190 def spec(self) -> Spec:
191 """Return a spec describing dataset elements."""

Callers 2

_save_datapointsMethod · 0.45
saveMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected