Skip to content

Instantly share code, notes, and snippets.

@SubhadityaMukherjee
Last active April 11, 2023 09:25
Show Gist options
  • Save SubhadityaMukherjee/b9941d23a5f78c295e92bbb7c887b001 to your computer and use it in GitHub Desktop.
Save SubhadityaMukherjee/b9941d23a5f78c295e92bbb7c887b001 to your computer and use it in GitHub Desktop.
tbfind
def get_event_files(main_path) -> list:
"""Return a list of event files under the given directory"""
all_files = []
for root, _, filenames in os.walk(main_path):
for filename in filenames:
if "events.out.tfevents" in filename:
all_files.append(str(Path(root) / Path(filename)))
return all_files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment