Skip to content

Commit

Permalink
Remove print statements in h_cache.py
Browse files Browse the repository at this point in the history
Remove print statements in `write_pickle_object` and `read_pickle_object`.

When running a large pipeline with multiple cached values, it's a lot of unnecessary noise on screen. Also, when using the `ProgressBar` adapter, the print statements interfere with the progress bar.
  • Loading branch information
kemaleren authored and skrawcz committed Jul 20, 2024
1 parent 155d618 commit 9048bca
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions hamilton/experimental/h_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ def read_json_dict(data: dict, filepath: str) -> dict:
@write_pickle.register(object)
def write_pickle_object(data: object, filepath: str, name: str) -> None:
if isinstance(data, object):
print(filepath)
with open(filepath, "wb") as file:
pickle.dump(data, file)
else:
Expand All @@ -182,7 +181,6 @@ def write_pickle_object(data: object, filepath: str, name: str) -> None:
@read_pickle.register(object)
def read_pickle_object(data: object, filepath: str) -> object:
"""Reads a pickle file"""
print(filepath)
with open(filepath, "rb") as file:
return pickle.load(file)

Expand Down

0 comments on commit 9048bca

Please sign in to comment.