Shark-NLP / CoNT

[NeurIPS'22 Spotlight] Data and code for our paper CoNT: Contrastive Neural Text Generation
https://arxiv.org/pdf/2205.14690.pdf
150 stars 15 forks source link

Refactor get_data_path function to use a constant for file directory #8

Closed BM-K closed 1 year ago

BM-K commented 1 year ago

This pull request refactors the get_data_path function to use a constant for the file directory instead of hardcoding the path in the function.

The constant TOKENIZED_FILE_DIR is imported from preprocess/preprocess.py. This makes the code more modular and easier to maintain, as any changes to the file directory can be made in one place.