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

fix llh return object and add jupyter visualization #281

Merged
merged 8 commits into from
Nov 13, 2023
Merged

Conversation

sanderland
Copy link
Collaborator

@sanderland sanderland commented Aug 15, 2023

No need for a version or changelog entry since this is largely cosmetic.

@sanderland sanderland marked this pull request as ready for review August 15, 2023 07:32
@sanderland sanderland requested a review from a team as a code owner August 15, 2023 07:32
@@ -13,3 +15,21 @@ def token_list_from_dict(token_list: Optional[List[Dict]]):
def __init__(self, prompt_tokens: List[TokenLogLikelihood], completion_tokens: List[TokenLogLikelihood]):
self.prompt_tokens = self.token_list_from_dict(prompt_tokens)
self.completion_tokens = self.token_list_from_dict(completion_tokens)

def visualize(self, **kwargs):
import pandas as pd
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should handle gracefully if user doesn't have pandas installed

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sanderland sanderland merged commit 55666c6 into main Nov 13, 2023
3 checks passed
@sanderland sanderland deleted the llhvis branch November 13, 2023 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants