Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add improved data downloading class / pipeline #39

Merged
merged 6 commits into from
Jan 5, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add class for automatically downloading datasets
  • Loading branch information
sdtblck committed Jan 5, 2021
commit 9cd776ff97d0a714673c0f5b65e1da98eceadc44
4 changes: 2 additions & 2 deletions train_enwik8.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from tqdm.auto import trange

from gpt_neox import (GPTNeoX, AutoregressiveWrapper, TextSamplerDataset, download_dataset,
cycle, prepare_optimizer_parameters, decode_tokens, prepare_enwik8_data, is_main)
cycle, prepare_optimizer_parameters, decode_tokens, read_enwik8_data, is_main)


def get_args():
Expand Down Expand Up @@ -46,7 +46,7 @@ def get_params(model):
model = AutoregressiveWrapper(model)

# prepare enwik8 data
data_train, data_val = prepare_enwik8_data(params["data_path"])
data_train, data_val = read_enwik8_data(params["data_path"])
train_dataset = TextSamplerDataset(data_train, params["seq_len"])
val_dataset = TextSamplerDataset(data_val, params["seq_len"])
val_loader = cycle(DataLoader(val_dataset, batch_size=params["batch_size"]))
Expand Down