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

Add encoders in openai model #1447

Merged
merged 2 commits into from
Dec 3, 2023
Merged

Add encoders in openai model #1447

merged 2 commits into from
Dec 3, 2023

Conversation

thejumpman2323
Copy link
Contributor

Description

Related Issues

Checklist

  • Is this code covered by new or existing unit tests or integration tests?
  • Did you run make test successfully?
  • Do new classes, functions, methods and parameters all have docstrings?
  • Were existing docstrings updated, if necessary?
  • Was external documentation updated, if necessary?

Additional Notes or Comments

@codecov-commenter
Copy link

codecov-commenter commented Dec 3, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (34830a7) 80.33% compared to head (569e062) 80.43%.
Report is 171 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1447      +/-   ##
==========================================
+ Coverage   80.33%   80.43%   +0.09%     
==========================================
  Files          95      103       +8     
  Lines        6602     7248     +646     
==========================================
+ Hits         5304     5830     +526     
- Misses       1298     1418     +120     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@jieguangzhou jieguangzhou left a comment

Choose a reason for hiding this comment

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

We can merge this pr after adding the table creating logic

return np.frombuffer(bytes, dtype=self.dtype).tolist()


def array(dtype: str, shape: t.Sequence):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@blythed
Im removing this one

@@ -32,20 +34,14 @@ class Cohere(Component, Predictor):
identifier: str = ''
version: t.Optional[int] = None
takes_context: bool = False
encoder: t.Union[Encoder, str, None] = None
encoder: t.Union[FieldType, Encoder, str, None] = None
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should be inherited from super

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@@ -47,15 +48,9 @@ class OpenAI(Component, Predictor):
identifier: str = ''
version: t.Optional[int] = None
takes_context: bool = False
encoder: t.Union[Encoder, str, None] = None
encoder: t.Union[FieldType, Encoder, str, None] = None
Copy link
Collaborator

Choose a reason for hiding this comment

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

Already defined in the super.

@blythed blythed merged commit fedb65c into superduper-io:main Dec 3, 2023
2 checks passed
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.

5 participants