Instructions to use INSAIT-Institute/LADDER-RoboLab-Long with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LeRobot
How to use INSAIT-Institute/LADDER-RoboLab-Long with LeRobot:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Download ladder/core/databib/dataclasses/dataclass_interface.py from INSAIT-Institute/LADDER-RoboLab-Long: direct link, hf CLI and curl.
- Browser
- Download file 1.36 kB
-
https://huggingface.co/INSAIT-Institute/LADDER-RoboLab-Long/resolve/main/ladder/core/databib/dataclasses/dataclass_interface.py
- Command line
-
hf download hf://INSAIT-Institute/LADDER-RoboLab-Long/ladder/core/databib/dataclasses/dataclass_interface.py
-
curl -L -o dataclass_interface.py https://huggingface.co/INSAIT-Institute/LADDER-RoboLab-Long/resolve/main/ladder/core/databib/dataclasses/dataclass_interface.py
1.36 kB
| import abc | |
| from typing import Any, Callable, Iterator, Tuple, Union | |
| class DataclassInterface(abc.ABC): | |
| """ | |
| Interface for dataclasses and the supported methods. | |
| All dataclasses are immutable and all methods return new instances. | |
| """ | |
| def from_json(cls, data, recursive: bool = True, ignore_redundant: bool = False): | |
| pass | |
| def make_empty(cls): | |
| pass | |
| def as_json(self, recursive: bool = True) -> Union[dict, list]: | |
| pass | |
| def replace(self, **kwargs): | |
| """Returns a new instance of the dataclass with the given fields replaced by the given values""" | |
| def apply(self, fcn: Callable, recursive: bool = True, skip_nones: bool = False): | |
| pass | |
| def items(self, recursive: bool = False) -> Iterator[Tuple[str, Any]]: | |
| pass | |
| def __repr__(self) -> str: | |
| indent = " " * 2 | |
| fields_reprs = [ | |
| f"{indent}{key}={repr(value)}".replace('\n', f'\n{indent}') | |
| for key, value in self.items(recursive=False) | |
| ] | |
| fields_repr = ("\n" + ",\n".join(fields_reprs) + f",\n") if len(fields_reprs) > 0 else "" | |
| return f"{self.__class__.__name__}({fields_repr})" | |