-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implements basic data saving decorator as well
This decorates the output of a function -- creating a node to append to the end that saves it. This has similar functionality to data loaders, and has been grouped togther under the data loading umbrella.
- Loading branch information
1 parent
aa8ba68
commit 097ea28
Showing
8 changed files
with
422 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
import logging | ||
|
||
from hamilton.io.default_data_loaders import DATA_LOADERS | ||
from hamilton.io.default_data_loaders import DATA_ADAPTERS | ||
from hamilton.registry import register_adapter | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
registered = False | ||
# Register all the default ones | ||
if not registered: | ||
logger.debug(f"Registering default data loaders: {DATA_LOADERS}") | ||
for data_loader in DATA_LOADERS: | ||
logger.debug(f"Registering default data loaders: {DATA_ADAPTERS}") | ||
for data_loader in DATA_ADAPTERS: | ||
register_adapter(data_loader) | ||
|
||
registered = True |
Oops, something went wrong.