Coder Social home page Coder Social logo

talktoebm's Issues

llm_describe_ebm_graph function not working

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.

TypeError: _Guidance.__call__() got an unexpected keyword argument 'silent'

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.