-
Notifications
You must be signed in to change notification settings - Fork 33
Notes for ivan quora #45
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes requested. Reviewed entire PR up to commit f4b5f76
Reviewed 467
lines of code across 2
files in 3 minute(s) and 13 second(s).
See details
- Skipped files: 0 (please contact us to request support for these files)
- Confidence threshold:
85%
- Drafted
2
additional comments. - Workflow ID:
wflow_SXferBdYytUUTJzJ
View 2 draft comments
These comments were drafted by Ellipsis, but were filtered out of the final review. They're included here so you can see our internal thought process and help you configure your ellipsis.yaml
.
Drafted 2 additional comments
Comment at applications/finetune-quora-embeddings/eval.py:2
The result
import from unittest
is not used in the code. Consider removing it to keep the code clean.
Comment at applications/finetune-quora-embeddings/eval.py:3
The embed
import from IPython
is not used in the code. Consider removing it to keep the code clean.
Something look wrong? You can customize Ellipsis by editing the ellipsis.yaml for this repository.
Generated with ❤️ by ellipsis.dev
@@ -1,26 +1,44 @@ | |||
from distutils.log import Log |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Log
import from distutils.log
is not used in the code. Consider removing it to keep the code clean.
@@ -1,4 +1,8 @@ | |||
import os | |||
from IPython import embed | |||
from regex import D |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The D
import from regex
is not used in the code. Consider removing it to keep the code clean.
@@ -1,4 +1,8 @@ | |||
import os | |||
from IPython import embed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The embed
import from IPython
is not used in the code. Consider removing it to keep the code clean.
train_file: str, | ||
test_file: str, | ||
model= None, | ||
):x |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a syntax error at the end of the function signature. Consider removing :x
.
y_test = test_df["is_duplicate"] | ||
|
||
# Initialize the model | ||
model = LogisticRegression() | ||
model = () |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variable model
is initialized but not used in the code. Consider removing it to keep the code clean.
Summary:
The PR refactors several functions in the
finetune-quora-embeddings
application to improve code efficiency and readability, and introduces new functions for handling sentence embeddings and model scoring.Key points:
yield_dataset_with_embeddings
function inembed.py
to yield a dictionary with the sentence embeddings and other related information.process_embeddings
inembed.py
to handle the creation of sentence embeddings.split_embed_train_test
function inembed.py
to use the newprocess_embeddings
function.generate_embeddings
function inembed.py
to use a generator for saving the embeddings.scorer
ineval.py
to handle the scoring of models.main
function ineval.py
to use the newscorer
function.Generated with ❤️ by ellipsis.dev