def METHOD_NAME(train_val_test_num_samples):
    """Build train, valid, and test datasets."""
    args = get_args()
    print_rank_0('> building train, validation, and test datasets '
                 'for GPT ...')
    train_ds, valid_ds1, test_ds = build_train_valid_test_datasets(
        data_prefix=args.data_path,
        data_impl=args.data_impl,
        splits_string=args.split,
        train_valid_test_num_samples=train_val_test_num_samples,
        seq_length=args.seq_length,
        seed=args.seed,
        skip_warmup=(not args.mmap_warmup))
    print_rank_0("> finished creating finetuning GPT datasets ...")
    _, valid_ds, _ = build_train_valid_test_datasets(
        data_prefix=args.data_path2,
        data_impl="mmap",
        splits_string="98,2,0",
        train_valid_test_num_samples=train_val_test_num_samples,
        seq_length=2048,
        seed=1234,
        skip_warmup=(not args.mmap_warmup))
    print_rank_0("> finished creating pretrained GPT datasets ...")
    return train_ds, valid_ds, test_ds