interpretml / talktoebm Goto Github PK
View Code? Open in Web Editor NEWA Natural Language Interface to Explainable Boosting Machines
Home Page: https://arxiv.org/abs/2402.14474
License: MIT License
A Natural Language Interface to Explainable Boosting Machines
Home Page: https://arxiv.org/abs/2402.14474
License: MIT License
Hi, I wanted to try out your interesting project locally but I a currently receive the error message
"raise Exception(f"Too many (more than {self.llm.max_retries}) OpenAI API RateLimitError's in a row!")
Exception: Too many (more than 5) OpenAI API RateLimitError's in a row!"
when calling the "llm_describe_ebm_graph(...)" function.
It looks like too many requests were sent to the API within a short period of time, more than the API allows.
I suppose that this problem did not occur when you made your repo public 8 months ago but rather occurs due to changes in newer guidance and openai packages.
I did indeed find out that your t2ebm package only seems to work with openai package versions >= 0.27.10 and <= 0.28.1.
Because when using a newer version I receive the following error message:
"File "[...]\talk2ebm\Lib\site-packages\t2ebm\utils.py", line 24, in \t2ebm\utils.py", line 24, in
retry=retry_if_not_exception_type(openai.error.InvalidRequestError),
^^^^^^^^^^^^
AttributeError: module 'openai' has no attribute 'error'"
At first I thought that this error (the RateLimitError on top) might occur due to the complexity of my dataset so I tried calling the function on the Spaceship Titanic dataset (the one you used in your demo notebook) but the error still occurs. I also tried calling the function with a different api_key from another Openai account but the error still occurs.
I would be very nice, if you could try to replicate the error to confirm that this is in fact an issue based on an outdated "llm_describe_ebm_graph(...)" function.
I encountered an issue when trying to run the following code in the TalkToEBM package:
llm_descripe_dict = {k: kwargs[k] for k in dict(kwargs) if k in llm_descripe_kwargs}
prompt = prompts.describe_graph_cot(
graph, num_sentences=num_sentences, **llm_descripe_dict
)
return guidance(prompt, llm, silent=True)()["cot_graph_description"]
Error Message:
TypeError: _Guidance.call() got an unexpected keyword argument 'silent'
Steps to Reproduce:
Install the TalkToEBM package from GitHub.
Run the code snippet:
graph_description = t2ebm.llm_describe_ebm_graph(llm, ebm, 0) # feature 0, 'HomePlanet'
print(textwrap.fill(graph_description, 80))
Expected Behavior:
The code should execute without errors and return the description of the graph.
Actual Behavior:
The code raises a TypeError indicating that the silent keyword argument is unexpected in the _Guidance.call() method.
Environment:
TalkToEBM version: latest from GitHub
Operating System: Windows 10
Please let me know if there is a workaround for this issue or if I need to update any dependencies.
Thank you!
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.