MCPcopy
hub / github.com/huggingface/datasets / from_dict

Method from_dict

src/datasets/info.py:282–284  ·  view source on GitHub ↗
(cls, dataset_info_dict: dict)

Source from the content-addressed store, hash-verified

280
281 @classmethod
282 def from_dict(cls, dataset_info_dict: dict) -> "DatasetInfo":
283 field_names = {f.name for f in dataclasses.fields(cls)}
284 return cls(**{k: v for k, v in dataset_info_dict.items() if k in field_names})
285
286 def update(self, other_dataset_info: "DatasetInfo", ignore_none=True):
287 self_dict = self.__dict__

Callers 15

__post_init__Method · 0.45
__post_init__Method · 0.45
from_directoryMethod · 0.45
from_directoryMethod · 0.45
get_moduleMethod · 0.45
get_moduleMethod · 0.45
get_moduleMethod · 0.45
get_moduleMethod · 0.45
_create_dummy_datasetMethod · 0.45
test_concatenateMethod · 0.45

Calls 1

itemsMethod · 0.80