rainym00d / llm4rs Goto Github PK
View Code? Open in Web Editor NEWthe official implementation of the RecSys 2023 paper “Uncovering ChatGPT's Capabilities in Recommender Systems”
Home Page: https://arxiv.org/abs/2305.02182
the official implementation of the RecSys 2023 paper “Uncovering ChatGPT's Capabilities in Recommender Systems”
Home Page: https://arxiv.org/abs/2305.02182
when run the code, the requese result can't back successfuly.
what is the reason? thanks
ERROR log:
2023-05-19 14:32:39,969 Starting request #7-0
2023-05-19 14:32:39,970 Request 7-0 failed with Exception None
2023-05-19 14:32:39,971 Request {'model': 'text-davinci-003', 'prompt': 'You are a movie recommender system now.\nInput: Here is the watching history of a user: Gattaca, Armageddon, Big, Babes in Toyland, Gladiator. Based on this history, please rank the following candidate movies: (A) Con Air (B) Mulan (C) Nikita (D) Donnie Brasco (E) Star Wars: Episode I - The Phantom Menace\nOutput: The answer index is D B A C E.\nInput: Here is the watching history of a user: The Adventures of Milo and Otis, The Pelican Brief, Dinosaur, Air Force One, The First Wives Club. Based on this history, please rank the following candidate movies: (A) The Good Bad and The Ugly (B) Robin Hood: Men in Tights (C) Thumbelina (D) George of the Jungle (E) Tom and Huck\nOutput: The answer index is', 'max_tokens': 20, 'temperature': 0, 'top_p': 1, 'frequency_penalty': 0.0, 'presence_penalty': 0.0, 'stop': '\n', 'logprobs': None, 'logit_bias': {}} failed after all attempts. Saving errors: [, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hi, running python script/run.py
is getting stuck (at (pid, sts) = os.waitpid(self.pid, wait_flags)
) for me during the API request, specifically in the below section of src/api/openai.py
:
async with session.post(
url=request_url, headers=request_header, json=self.request_json, proxy=proxy
) as response:
response = await response.json()
I am using the below arguments.
class MyArgs(Xp):
model = ["text-davinci-003"]
domain = ["Book"]
task = ["list"]
no_instruction = False
example_num = [1]
begin_index = 5
end_index = 6
api_key = "MY_API_KEY"
max_requests_per_minute = 2000
max_tokens_per_minute = 80000
max_attempts = 100
proxy = None
when run the code, the requese result can't back successfuly.
what is the reason? thanks
ERROR log:
2023-05-19 14:32:39,969 Starting request #7-0
2023-05-19 14:32:39,970 Request 7-0 failed with Exception None
2023-05-19 14:32:39,971 Request {'model': 'text-davinci-003', 'prompt': 'You are a movie recommender system now.\nInput: Here is the watching history of a user: Gattaca, Armageddon, Big, Babes in Toyland, Gladiator. Based on this history, please rank the following candidate movies: (A) Con Air (B) Mulan (C) Nikita (D) Donnie Brasco (E) Star Wars: Episode I - The Phantom Menace\nOutput: The answer index is D B A C E.\nInput: Here is the watching history of a user: The Adventures of Milo and Otis, The Pelican Brief, Dinosaur, Air Force One, The First Wives Club. Based on this history, please rank the following candidate movies: (A) The Good Bad and The Ugly (B) Robin Hood: Men in Tights (C) Thumbelina (D) George of the Jungle (E) Tom and Huck\nOutput: The answer index is', 'max_tokens': 20, 'temperature': 0, 'top_p': 1, 'frequency_penalty': 0.0, 'presence_penalty': 0.0, 'stop': '\n', 'logprobs': None, 'logit_bias': {}} failed after all attempts. Saving errors: [, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hello, the student has been greatly inspired by reading your article, but cannot find the methods for pop and random in the code. Could you please take the time to provide them to the student? Thank you very much!
I have confirmed that I use the correct api key by successfully using the openAi API to generate sentences in Python.
However, when running the code:
asyncio.run(
process_api_requests_from_file(
requests_filepath=config.request_path,
save_filepath=config.response_path,
request_url = config.api_url,
api_key=config.api_key,
max_requests_per_minute=config.max_requests_per_minute,
max_tokens_per_minute=config.max_tokens_per_minute,
token_encoding_name=config.token_encoding_name,
max_attempts=config.max_attempts,
proxy=config.proxy,
)
)
Some errors just occur in the log file:
failed with Exception Cannot connect to host api.openai.com:443 ssl:default [Connect call failed ('199.96.58.105', 443)]
Is something wrong with my network or the url in the code? I would appreciate it if you can give me a hand to this issue!!
首先非常感谢大佬您的工作!我按照您在readme上的说明添加了OpenAI的API key:"sk-xxxxxx" 以及将四个Book, News, Music, Movie的数据移到了data文件夹下,最后在LLM4RS目录执行了“python script/run.py”指令,目前程序运行到了打印参数之后过了2个多小时仍然没有complete。请问大佬这是否属于正常情况?一般在有GPU的情况下跑一次需要要多长时间?麻烦大佬了
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.