Skip to content

Commit

Permalink
FIX Dataset revision in example (#2207)
Browse files Browse the repository at this point in the history
  • Loading branch information
sinchir0 authored Nov 9, 2024
1 parent b1fd97d commit 162d7e5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ def main():

dataset = DatasetDict({"train": train_dataset, "validation": val_dataset})
else:
dataset = load_dataset(args.dataset_name)
dataset = load_dataset(args.dataset_name, revision="main")

def preprocess_function(examples):
queries = examples["query"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"id": "f190e1ee",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -157,7 +157,7 @@
"import pandas as pd\n",
"\n",
"tokenizer = AutoTokenizer.from_pretrained(model_name_or_path)\n",
"dataset = load_dataset(dataset_name)\n",
"dataset = load_dataset(dataset_name, revision=\"main\")\n",
"train_product_dataset = dataset[\"train\"].to_pandas()[[\"product_title\"]]\n",
"val_product_dataset = dataset[\"validation\"].to_pandas()[[\"product_title\"]]\n",
"product_dataset_for_indexing = pd.concat([train_product_dataset, val_product_dataset])\n",
Expand Down

0 comments on commit 162d7e5

Please sign in to comment.