Skip to content

Commit

Permalink
make file name as a hashing string to aviod long file names (microsof…
Browse files Browse the repository at this point in the history
…t#274)

* make file name as a hashing string to aviod long file names

* fix format issue
  • Loading branch information
yaozhewei authored Apr 12, 2023
1 parent e320e75 commit 5618083
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ def create_prompt_dataset(local_rank,
tokenizer_name = tokenizer.init_kwargs['name_or_path'].replace('/', '_')
fname = f"{fname}_split{data_split}_phase{train_phase}_seed{seed}_tokenizer{tokenizer_name}_seqlen{max_seq_len}"
fname = '_'.join(fname.split('/'))
fname = str(hash(fname)) # hash the file name to avoid too long file name
train_fname = f"{output_path}/traindata_{fname}.pt"
eval_fname = f"{output_path}/evaldata_{fname}.pt"

Expand Down

0 comments on commit 5618083

Please sign in to comment.