How to access all file names in hydra config #2399
Unanswered
abhijeetdhakane
asked this question in
Q&A
Replies: 1 comment 4 replies
-
It works if I do the following:
But is there any smart way to avoid repetitive long paths names, and just change last file names? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a directory contains a bunch of txt files:
dir/train/[train1.txt, train2.txt, train3.txt]
I'm able to read a single file, if I define following in a
config.yaml
file_name: ${paths.data_dir}/train/train1.txt
So I get the str and I used
np.loadtxt(self.hparams.file_name)
I tried
file_name: ${paths.data_dir}/train/*
So I have
List[str]
, I then loop overfile_name
but it didn't work out.
Sorry for cross-posting
Beta Was this translation helpful? Give feedback.
All reactions