Skip to content
This repository was archived by the owner on Nov 10, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion fms_dgt/dataloaders/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@

@register_dataloader("default")
class DefaultDataloader(BaseDataloader):
"""Base Class for all dataloaders"""
"""
The default dataloader takes a datastore and iterates over it.

@param state_datastore : A data store.
@param loop_over_data : If true, it wraps around when it reaches the end of the iterator.

"""

def __init__(
self,
Expand Down
17 changes: 16 additions & 1 deletion fms_dgt/datastores/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,22 @@

@register_datastore("default")
class DefaultDatastore(BaseDatastore):
"""Base Class for all data stores"""
"""
The default datastore is a data store that takes a name of a `.jsonl`,
`.json`, `.yaml`, or `parquet` file, loads it, and returns an iterator
over it.

If none of the filename extension matches, it attempts to give the first
argument to huggingface's `datasets.load_dataset` function to load the data, and returns an iterator over it.

It also has an ability to dump the data into a file.

@param output_dir : The destination directory for writing the data.
@param data_format : The data format for writing the data. It is not used for loading; The format is guessed from data_path.
@param data : A list. Data loaded from the files are concatenated with this list.
@param data_path : The path to the file to load. If it is a list, it is interpreted as the arguments to huggingface's `datasets.load_dataset` .

"""

def __init__(
self,
Expand Down
2 changes: 1 addition & 1 deletion templates/generator/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

@register_block("template_generator")
class TemplateGenerator(BaseGeneratorBlock):
"""Base Class for all Generators"""
"""TODO: Copy and edit this template to implement your own generator class"""

def __init__(self, name: str, config: Dict, **kwargs: Any) -> None:
super().__init__(name, config, **kwargs)
Expand Down
2 changes: 1 addition & 1 deletion templates/validator/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

@register_block("template_validator")
class TemplateValidator(BaseValidatorBlock):
"""Base Class for all Validators"""
"""TODO: Copy and edit this template to implement your own validator class"""

def __init__(self, name: str, config: Dict) -> None:
super().__init__(name, config)
Expand Down