Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ClearMLCallbackHandler.on_chain_end and ClearMLCallbackHandler.on_chain_start raise exceptions of missing key #1126

Open
mdziezyc opened this issue Oct 4, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@mdziezyc
Copy link

mdziezyc commented Oct 4, 2023

Describe the bug

In my langchain program, I constantly get errors with missing key output in outputs and input in inputs:

WARNING:langchain.callbacks.manager:Error in ClearMLCallbackHandler.on_chain_end callback: 'output'
WARNING:langchain.callbacks.manager:Error in ClearMLCallbackHandler.on_chain_start callback: 'input'

To reproduce

Unfortunately, I wasn't able to create a minimal example of the code which reproduces this bug.

But I did check what are the keys of incoming dictionaries before the exception occurs:

inputs.keys() in on_chain_start:

  • dict_keys(['query'])
  • dict_keys(['input_documents', 'question'])
  • dict_keys(['question', 'context'])

outputs.keys() in on_chain_end:

  • dict_keys(['text'])
  • dict_keys(['output_text'])
  • dict_keys(['result'])

If I'm able to narrow down the problem I'll report my findings. I hope that maybe someone had similar issues and could shed some light on the problem.

Expected behaviour

Both functions should handle different structures of dictionaries

Environment

  • Server type (self hosted \ app.clear.ml): clear.ml
  • ClearML SDK Version: 1.13.1
  • Python Version: 3.10
  • OS (Windows \ Linux \ Macos): Linux
@eugen-ajechiloae-clearml
Copy link
Collaborator

Hi @mdziezyc ! We are looking into this problem and #1124 and we will come back to you as soon as we have a fix.

If you could create a minimal example that would, indeed, be of great help.

@mdziezyc
Copy link
Author

mdziezyc commented Oct 9, 2023

The only thing I can add for now is that I checked W&B and it worked well, so it does not seem to be something specific related to my code. If I find sth more, I'll let you know.

@eugen-ajechiloae-clearml
Copy link
Collaborator

@mdziezyc we have submitted a PR related to this issue and #1124 : langchain-ai/langchain#11472

@pollfly
Copy link
Contributor

pollfly commented Jan 16, 2024

Hey @mdziezyc! Just letting you know that this issue has been resolved. See langchain-ai/langchain#11472. Let us know if there are any issues :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants