Closed AntDX316 closed 8 months ago
Hi @AntDX316, thank you for the issue. Unfortunately, our code was developed for use on Linux, and therefore we assumed that all users would have a directory called /tmp/
available.
As a temporary fix, you can change lines 136 and 138 in C:\Users\antdx\prompt2model\prompt2model\model_retriever\description_based_retriever.py to replace "/tmp/model_info.tgz"
to another path that works on Windows (e.g. C:\Users\antdx\prompt2model\model_info.tgz
).
Note that I don't use Windows for development so I might have formatted my suggested path for you incorrectly - take care to make sure that the path is formatted correctly.
After making this change locally, you should reinstall prompt2model from source, as shown here: https://github.com/neulab/prompt2model/blob/main/CONTRIBUTING.md
Hi @AntDX316, thank you for the issue. Unfortunately, our code was developed for use on Linux, and therefore we assumed that all users would have a directory called
/tmp/
available.As a temporary fix, you can change lines 136 and 138 in C:\Users\antdx\prompt2model\prompt2model\model_retriever\description_based_retriever.py to replace
"/tmp/model_info.tgz"
to another path that works on Windows (e.g.C:\Users\antdx\prompt2model\model_info.tgz
).Note that I don't use Windows for development so I might have formatted my suggested path for you incorrectly - take care to make sure that the path is formatted correctly.
After making this change locally, you should reinstall prompt2model from source, as shown here: https://github.com/neulab/prompt2model/blob/main/CONTRIBUTING.md
What Linux software do you recommend I use for these AI developments? What Linux are you using? I want to install that on my 96GB PC that cannot install Windows 11 and Windows 10 has lost future Microsoft support.
I'm unsure of all the stuff I need to run Linux. I'm quite an expert Windows and Apple user.. at least for the consumer side. Where do I get drivers for the nvidia graphics card , sound blaster xfi pcie card, wifi6 USB, etc.?
@viswavi : maybe we could replace /tmp/
with a temporary directory created with the tempfile package?
@neubig I put a fix here - https://github.com/neulab/prompt2model/pull/388. It's actually simpler than I thought.
@AntDX316 Windows should actually be able to work (after #388 is merged). You may need to make a few small tweaks to get it to work on Windows - other users have reported success in training models with Prompt2Model on Windows.
We tested our code on Ubuntu. For training models with Prompt2Model, you will likely need access to an Nvidia GPU to train in a reasonable time, but otherwise, this should work on any machine
Closing because #388 is now merged
Enter the maximum size of the model (by default, enter nothing and we will use 3GB as the limit). You can specify a unit (e.g. 3GB, 300Mb). If no unit is given, we assume the size is given in bytes.
Maximum model size set to 3000000000.0 bytes. Retrieving model... Traceback (most recent call last): File "C:\Users\antdx\prompt2model\prompt2model_demo.py", line 535, in
main()
File "C:\Users\antdx\prompt2model\prompt2model_demo.py", line 214, in main
retriever = DescriptionModelRetriever(
File "C:\Users\antdx\prompt2model\prompt2model\model_retriever\description_based_retriever.py", line 101, in init
self.load_model_info()
File "C:\Users\antdx\prompt2model\prompt2model\model_retriever\description_based_retriever.py", line 134, in load_model_info
urllib.request.urlretrieve(
File "C:\Python310\lib\urllib\request.py", line 251, in urlretrieve
tfp = open(filename, 'wb')
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/model_info.tgz'
C:\Users\antdx\prompt2model>
From: C:\Users\antdx\prompt2model>python prompt2model_demo.py
Do you want to start from scratch? (y/n) y Enter your task description and few-shot examples (or 'done' to finish): """Your task is to generate an answer to a natural question. In this task, the input is a string that consists of both a question and a context passage. The context is a descriptive passage related to the question and contains the answer. And the question can range from Math, Cultural, Social, Geometry, Biology, History, Sports, Technology, Science, and so on.
Here are examples with input questions and context passages, along with their expected outputs:
input="Question: What city did Super Bowl 50 take place in? Context: Super Bowl 50 was an American football game to determine the champion of the National Football League (NFL) for the 2015 season. The American Football Conference (AFC) champion Denver Broncos defeated the National Football Conference (NFC) champion Carolina Panthers 24–10 to earn their third Super Bowl title. The game was played on February 7, 2016, at Levi's Stadium in the San Francisco Bay Area at Santa Clara, California. As this was the 50th Super Bowl, the league emphasized the "golden anniversary" with various gold-themed initiatives, as well as temporarily suspending the tradition of naming each Super Bowl game with Roman numerals (under which the game would have been known as "Super Bowl L"), so that the logo could prominently feature the Arabic numerals 50." output="Santa Clara"
input="Question: What river runs through Warsaw? Context: Warsaw (Polish: Warszawa [varˈʂava] ( listen); see also other names) is the capital and largest city of Poland. It stands on the Vistula River in east-central Poland, roughly 260 kilometres (160 mi) from the Baltic Sea and 300 kilometres (190 mi) from the Carpathian Mountains. Its population is estimated at 1.740 million residents within a greater metropolitan area of 2.666 million residents, which makes Warsaw the 9th most-populous capital city in the European Union. The city limits cover 516.9 square kilometres (199.6 sq mi), while the metropolitan area covers 6,100.43 square kilometres (2,355.39 sq mi)." output="Vistula River"
input="Question: The Ottoman empire controlled territory on three continents, Africa, Asia and which other? Context: The Ottoman Empire was an imperial state that lasted from 1299 to 1923. During the 16th and 17th centuries, in particular at the height of its power under the reign of Suleiman the Magnificent, the Ottoman Empire was a powerful multinational, multilingual empire controlling much of Southeast Europe, Western Asia, the Caucasus, North Africa, and the Horn of Africa. At the beginning of the 17th century the empire contained 32 provinces and numerous vassal states. Some of these were later absorbed into the empire, while others were granted various types of autonomy during the course of centuries." output="Europe" """done done Parsing prompt... Prompt parsed. Retrieving dataset... config.json: 100%|████████████████████████████████████████████████████████████████████████████| 781/781 [00:00<?, ?B/s] C:\Python310\lib\site-packages\huggingface_hub\file_download.py:147: UserWarning:
huggingface_hub
cache-system uses symlinks by default to efficiently store duplicated files but your machine does not support them in C:\Users\antdx.cache\huggingface\hub. Caching files will still work but in a degraded version that might require more space on your disk. This warning can be disabled by setting theHF_HUB_DISABLE_SYMLINKS_WARNING
environment variable. For more details, see https://huggingface.co/docs/huggingface_hub/how-to-cache#limitations. To support symlinks on Windows, you either need to activate Developer Mode or to run Python as an administrator. In order to see activate developer mode, see this article: https://docs.microsoft.com/en-us/windows/apps/get-started/enable-your-device-for-development warnings.warn(message) tokenizer_config.json: 100%|██████████████████████████████████████████████████████████████████| 420/420 [00:00<?, ?B/s] vocab.txt: 100%|████████████████████████████████████████████████████████████████████| 228k/228k [00:00<00:00, 13.0MB/s] special_tokens_map.json: 100%|████████████████████████████████████████████████████████████████| 125/125 [00:00<?, ?B/s] pytorch_model.bin: 100%|████████████████████████████████████████████████████████████| 440M/440M [00:08<00:00, 49.2MB/s]Here are the datasets I've retrieved for you:
Name Size[MB] Description
1): yulongmannlp/dev_para 76.72 Stanford Question Answering Dataset (SQuAD) is a reading comprehension dataset, consisting of questions posed by crowdworkers on a set of Wikipedia articles, where the answer to every question is a segment of text, or span, from the corresponding reading passage, or the question might be unanswerable. 2): yulongmannlp/dev_orig 76.71 Stanford Question Answering Dataset (SQuAD) is a reading comprehension dataset, consisting of questions posed by crowdworkers on a set of Wikipedia articles, where the answer to every question is a segment of text, or span, from the corresponding reading passage, or the question might be unanswerable. 3): yulongmannlp/adv_para 75.72 Stanford Question Answering Dataset (SQuAD) is a reading comprehension dataset, consisting of questions posed by crowdworkers on a set of Wikipedia articles, where the answer to every question is a segment of text, or span, from the corresponding reading passage, or the question might be unanswerable. 4): yulongmannlp/adv_ori 75.72 Stanford Question Answering Dataset (SQuAD) is a reading comprehension dataset, consisting of questions posed by crowdworkers on a set of Wikipedia articles, where the answer to every question is a segment of text, or span, from the corresponding reading passage, or the question might be unanswerable. 5): squad 85.66 Stanford Question Answering Dataset (SQuAD) is a reading comprehension dataset, consisting of questions posed by crowdworkers on a set of Wikipedia articles, where the answer to every question is a segment of text, or span, from the corresponding reading passage, or the question might be unanswerable. 6): lhoestq/squad 85.66 Stanford Question Answering Dataset (SQuAD) is a reading comprehension dataset, consisting of questions posed by crowdworkers on a set of Wikipedia articles, where the answer to every question is a segment of text, or span, from the corresponding reading passage, or the question might be unanswerable. 2023-12-30 05:04:19,962 - dataset_utils - ERROR - Error occurred in fetching size: 500 7): lhoestq/custom_squad NA Stanford Question Answering Dataset (SQuAD) is a reading comprehension dataset, consisting of questions posed by crowdworkers on a set of Wikipedia articles, where the answer to every question is a segment of text, or span, from the corresponding reading passage, or the question might be unanswerable. 8): hapandya/sqnnr 0.00 Stanford Question Answering Dataset (SQuAD) is a reading comprehension dataset, consisting of questions posed by crowdworkers on a set of Wikipedia articles, where the answer to every question is a segment of text, or span, from the corresponding reading passage, or the question might be unanswerable. 9): Yulong-W/squadpararobustness 82.14 Stanford Question Answering Dataset (SQuAD) is a reading comprehension dataset, consisting of questions posed by crowdworkers on a set of Wikipedia articles, where the answer to every question is a segment of text, or span, from the corresponding reading passage, or the question might be unanswerable. 10): Yulong-W/squadpara 75.82 Stanford Question Answering Dataset (SQuAD) is a reading comprehension dataset, consisting of questions posed by crowdworkers on a set of Wikipedia articles, where the answer to every question is a segment of text, or span, from the corresponding reading passage, or the question might be unanswerable. 11): Yulong-W/squadorirobustness 82.14 Stanford Question Answering Dataset (SQuAD) is a reading comprehension dataset, consisting of questions posed by crowdworkers on a set of Wikipedia articles, where the answer to every question is a segment of text, or span, from the corresponding reading passage, or the question might be unanswerable. 12): Yulong-W/squadori 75.82 Stanford Question Answering Dataset (SQuAD) is a reading comprehension dataset, consisting of questions posed by crowdworkers on a set of Wikipedia articles, where the answer to every question is a segment of text, or span, from the corresponding reading passage, or the question might be unanswerable. 13): MajdTannous/Test3 0.03 Stanford Question Answering Dataset (SQuAD) is a reading comprehension dataset, consisting of questions posed by crowdworkers on a set of Wikipedia articles, where the answer to every question is a segment of text, or span, from the corresponding reading passage, or the question might be unanswerable. 14): MajdTannous/Test2 122.45 Stanford Question Answering Dataset (SQuAD) is a reading comprehension dataset, consisting of questions posed by crowdworkers on a set of Wikipedia articles, where the answer to every question is a segment of text, or span, from the corresponding reading passage, or the question might be unanswerable. 2023-12-30 05:04:20,715 - dataset_utils - ERROR - Error occurred in fetching size: 500 15): MajdTannous/Dataset1 NA Stanford Question Answering Dataset (SQuAD) is a reading comprehension dataset, consisting of questions posed by crowdworkers on a set of Wikipedia articles, where the answer to every question is a segment of text, or span, from the corresponding reading passage, or the question might be unanswerable. 16): BerMaker/test 85.66 Stanford Question Answering Dataset (SQuAD) is a reading comprehension dataset, consisting of questions posed by crowdworkers on a set of Wikipedia articles, where the answer to every question is a segment of text, or span, from the corresponding reading passage, or the question might be unanswerable. 17): SajjadAyoubi/persian_qa 18.98 \\\\Persian Question Answering (PersianQA) Dataset is a reading comprehension dataset on Persian Wikipedia. The crowd-sourced dataset consists of more than 9,000 entries. Each entry can be either an impossible to answer or a question with one or more answers spanning in the passage (the context) from which the questioner proposed the question. Much like the SQuAD2.0 dataset, the impossible or unanswerable questions can be utilized to create a system which "knows that it doesn't know the answer". 18): web_questions 0.78 This dataset consists of 6,642 question/answer pairs. The questions are supposed to be answerable by Freebase, a large knowledge graph. The questions are mostly centered around a single named entity. The questions are popular ones asked on the web (at least in 2013). 19): race 333.27 Race is a large-scale reading comprehension dataset with more than 28,000 passages and nearly 100,000 questions. The dataset is collected from English examinations in China, which are designed for middle school and high school students. The dataset can be served as the training and test sets for machine comprehension. 20): EleutherAI/race 2.61 Race is a large-scale reading comprehension dataset with more than 28,000 passages and nearly 100,000 questions. The dataset is collected from English examinations in China, which are designed for middle school and high school students. The dataset can be served as the training and test sets for machine comprehension. 21): TenzinGayche/Demo-datasets 1.34 Stanford Question Answering Dataset (DemoDatasets) is a reading comprehension dataset, consisting of questions posed by crowdworkers on a set of Wikipedia articles, where the answer to every question is a segment of text, or span, from the corresponding reading passage, or the question might be unanswerable. 22): the-coorporation/the_squad_qg 42.47 A preprocessed version of the Standford Question Answering Dataset (SQuAD) version 2.0 consisting of contexts and questions only. Duplicate contexts have been removed and corresponding questions have been merged into an array per context. Stanford Question Answering Dataset (SQuAD) is a reading comprehension dataset, consisting of questions posed by crowdworkers on a set of Wikipedia articles, where the answer to every question is a segment of text, or span, from the corresponding reading passage, or the question might be unanswerable. SQuAD 2.0 combines the 100,000 questions in SQuAD1.1 with over 50,000 unanswerable questions written adversarially by crowdworkers to look similar to answerable ones. To do well on SQuAD 2.0, systems must not only answer questions when possible, but also determine when no answer is supported by the paragraph and abstain from answering. 2023-12-30 05:04:21,508 - dataset_utils - ERROR - Error occurred in fetching size: 401 23): imagenet-1k NA ILSVRC 2012, commonly known as 'ImageNet' is an image dataset organized according to the WordNet hierarchy. Each meaningful concept in WordNet, possibly described by multiple words or word phrases, is called a "synonym set" or "synset". There are more than 100,000 synsets in WordNet, majority of them are nouns (80,000+). ImageNet aims to provide on average 1000 images to illustrate each synset. Images of each concept are quality-controlled and human-annotated. In its completion, ImageNet hopes to offer tens of millions of cleanly sorted images for most of the concepts in the WordNet hierarchy. ImageNet 2012 is the most commonly used subset of ImageNet. This dataset spans 1000 object classes and contains 1,281,167 training images, 50,000 validation images and 100,000 test images 24): AlexFierro9/imagenet-1k_test 4774.63 ILSVRC 2012, commonly known as 'ImageNet' is an image dataset organized according to the WordNet hierarchy. Each meaningful concept in WordNet, possibly described by multiple words or word phrases, is called a "synonym set" or "synset". There are more than 100,000 synsets in WordNet, majority of them are nouns (80,000+). ImageNet aims to provide on average 1000 images to illustrate each synset. Images of each concept are quality-controlled and human-annotated. In its completion, ImageNet hopes to offer tens of millions of cleanly sorted images for most of the concepts in the WordNet hierarchy. ImageNet 2012 is the most commonly used subset of ImageNet. This dataset spans 1000 object classes and contains 1,281,167 training images, 50,000 validation images and 100,000 test images 25): dbpedia_14 191.44 The DBpedia ontology classification dataset is constructed by picking 14 non-overlapping classes from DBpedia 2014. They are listed in classes.txt. From each of thse 14 ontology classes, we randomly choose 40,000 training samples and 5,000 testing samples. Therefore, the total size of the training dataset is 560,000 and testing dataset 70,000. There are 3 columns in the dataset (same for train and test splits), corresponding to class index (1 to 14), title and content. The title and content are escaped using double quotes ("), and any internal double quote is escaped by 2 double quotes (""). There are no new lines in title or content.
If none of these are relevant to your prompt, we'll only use generated data. Are any of these datasets relevant? (y/N) y Which dataset would you like to use? Give the number between 1 and 25. 6
Loaded dataset. Example row: { "id": "5733be284776f41900661182", "title": "University_of_Notre_Dame", "context": "Architecturally, the school has a Catholic character. Atop the Main Building's gold dome is a golden statue of the Virgin Mary. Immediately in front of the Main Building and facing it, is a copper statue of Christ with arms upraised with the legend \"Venite Ad Me Omnes\". Next to the Main Building is the Basilica of the Sacred Heart. Immediately behind the basilica is the Grotto, a Marian place of prayer and reflection. It is a replica of the grotto at Lourdes, France where the Virgin Mary reputedly appeared to Saint Bernadette Soubirous in 1858. At the end of the main drive (and in a direct line that connects through 3 statues and the Gold Dome), is a simple, modern stone statue of Mary.", "question": "To whom did the Virgin Mary allegedly appear in 1858 in Lourdes France?", "answers_text": [ "Saint Bernadette Soubirous" ], "answers_answer_start": [ 515 ] }
Will use the columns ["context", "question"] as input.
Will use the column "answers_text" as our target.
Enter the maximum size of the model (by default, enter nothing and we will use 3GB as the limit). You can specify a unit (e.g. 3GB, 300Mb). If no unit is given, we assume the size is given in bytes.
Maximum model size set to 3000000000.0 bytes. Retrieving model... Traceback (most recent call last): File "C:\Users\antdx\prompt2model\prompt2model_demo.py", line 535, in
main()
File "C:\Users\antdx\prompt2model\prompt2model_demo.py", line 214, in main
retriever = DescriptionModelRetriever(
File "C:\Users\antdx\prompt2model\prompt2model\model_retriever\description_based_retriever.py", line 101, in init
self.load_model_info()
File "C:\Users\antdx\prompt2model\prompt2model\model_retriever\description_based_retriever.py", line 134, in load_model_info
urllib.request.urlretrieve(
File "C:\Python310\lib\urllib\request.py", line 251, in urlretrieve
tfp = open(filename, 'wb')
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/model_info.tgz'
C:\Users\antdx\prompt2model>