Skip to content

Commit

Permalink
Fixes doc string for datasaver and loader
Browse files Browse the repository at this point in the history
They were missing `()` . This lead to user confusion.
  • Loading branch information
skrawcz committed Aug 6, 2024
1 parent 5d18fe2 commit 9f6d7c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hamilton/function_modifiers/adapters.py
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ class dataloader(NodeCreator):
import pandas as pd
from hamilton.function_modifiers import dataloader
@dataloader
@dataloader() # you need ()
def load_json_data(json_path: str = 'data/my_data.json') -> tuple[pd.DataFrame, dict]:
'''Loads a dataframe from a JSON file.
Expand Down Expand Up @@ -819,7 +819,7 @@ class datasaver(NodeCreator):
import pandas as pd
from hamilton.function_modifiers import datasaver
@datasaver
@datasaver() # you need ()
def save_json_data(data: pd.DataFrame, json_path: str = 'data/my_saved_data.json') -> dict:
'''Saves data to a JSON file and returns metadata about the saving process.
Expand Down

0 comments on commit 9f6d7c2

Please sign in to comment.