-
Notifications
You must be signed in to change notification settings - Fork 0
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
[WIP] implement vald benchmark #1
base: master
Are you sure you want to change the base?
Conversation
Sonatype Lift is retiringSonatype Lift will be retiring on Sep 12, 2023, with its analysis stopping on Aug 12, 2023. We understand that this news may come as a disappointment, and Sonatype is committed to helping you transition off it seamlessly. If you’d like to retain your data, please export your issues from the web console. |
@@ -0,0 +1,3 @@ | |||
from engine.clients.vald.configure import ValdConfigurator |
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.
F401: 'engine.clients.vald.configure.ValdConfigurator' imported but unused
❗❗ 3 similar findings have been found in this PR
🔎 Expand here to view all instances of this finding
File Path | Line Number |
---|---|
engine/clients/vald/init.py | 2 |
engine/clients/vald/init.py | 3 |
engine/clients/vald/parser.py | 1 |
Visit the Lift Web Console to find more details in your report.
ℹ️ Expand to see all @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
engine/clients/vald/__init__.py
Outdated
@@ -0,0 +1,3 @@ | |||
from engine.clients.vald.configure import ValdConfigurator | |||
from engine.clients.vald.search import ValdSearcher | |||
from engine.clients.vald.upload import ValdUploader |
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.
W292: no newline at end of file
ℹ️ Expand to see all @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
engine/clients/vald/config.py
Outdated
) | ||
|
||
|
||
_label_selector = client.V1LabelSelector(match_labels={"app": "vald-agent-ngt"}) |
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.
E501: line too long (80 > 79 characters)
❗❗ 15 similar findings have been found in this PR
🔎 Expand here to view all instances of this finding
File Path | Line Number |
---|---|
engine/clients/vald/config.py | 24 |
engine/clients/vald/config.py | 38 |
engine/clients/vald/config.py | 82 |
engine/clients/vald/config.py | 114 |
engine/clients/vald/config.py | 124 |
engine/clients/vald/config.py | 133 |
engine/clients/vald/config.py | 200 |
engine/clients/vald/configure.py | 17 |
engine/clients/vald/parser.py | 7 |
engine/clients/vald/parser.py | 10 |
Showing 10 of 15 findings. Visit the Lift Web Console to see all.
ℹ️ Expand to see all @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
engine/clients/vald/configure.py
Outdated
) | ||
if len(res.items) > 0: | ||
scheduling_api.delete_priority_class(PRIORITY_CLASS.metadata.name) | ||
|
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.
W293: blank line contains whitespace
❗❗ 3 similar findings have been found in this PR
🔎 Expand here to view all instances of this finding
File Path | Line Number |
---|---|
engine/clients/vald/parser.py | 9 |
engine/clients/vald/parser.py | 12 |
engine/clients/vald/parser.py | 15 |
Visit the Lift Web Console to find more details in your report.
ℹ️ Expand to see all @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
engine/clients/vald/configure.py
Outdated
if len(res.items) > 0: | ||
scheduling_api.delete_priority_class(PRIORITY_CLASS.metadata.name) | ||
|
||
time.sleep(10) # TODO: using watch |
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.
E261: at least two spaces before inline comment
ℹ️ Expand to see all @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
engine/clients/vald/configure.py
Outdated
scheduling_api = k8s.client.SchedulingV1Api(api_client) | ||
scheduling_api.create_priority_class(PRIORITY_CLASS) | ||
|
||
time.sleep(30) # TODO: using watch |
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.
E261: at least two spaces before inline comment
ℹ️ Expand to see all @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
engine/clients/vald/config.py
Outdated
@@ -0,0 +1,237 @@ | |||
from kubernetes import client |
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.
E0401: Unable to import 'kubernetes'
❗❗ 8 similar findings have been found in this PR
🔎 Expand here to view all instances of this finding
File Path | Line Number |
---|---|
engine/clients/vald/configure.py | 1 |
engine/clients/vald/search.py | 2 |
engine/clients/vald/search.py | 4 |
engine/clients/vald/search.py | 5 |
engine/clients/vald/upload.py | 1 |
engine/clients/vald/upload.py | 5 |
engine/clients/vald/upload.py | 6 |
engine/clients/vald/upload.py | 7 |
Visit the Lift Web Console to find more details in your report.
ℹ️ Expand to see all @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
engine/clients/vald/config.py
Outdated
@@ -0,0 +1,237 @@ | |||
from kubernetes import client |
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.
reportMissingImports: Import "kubernetes" could not be resolved
❗❗ 8 similar findings have been found in this PR
🔎 Expand here to view all instances of this finding
File Path | Line Number |
---|---|
engine/clients/vald/configure.py | 1 |
engine/clients/vald/search.py | 2 |
engine/clients/vald/search.py | 4 |
engine/clients/vald/search.py | 5 |
engine/clients/vald/upload.py | 1 |
engine/clients/vald/upload.py | 5 |
engine/clients/vald/upload.py | 6 |
engine/clients/vald/upload.py | 7 |
Visit the Lift Web Console to find more details in your report.
ℹ️ Expand to see all @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
engine/clients/vald/configure.py
Outdated
**collection_params["ngt_config"], | ||
**{ | ||
"dimension": dataset.config.vector_size, | ||
"distance_type": self.DISTANCE_MAPPING[ |
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.
reportGeneralTypeIssues: Argument of type "str" cannot be assigned to parameter "__key" of type "Distance" in function "getitem"
"str" is incompatible with "Distance"
ℹ️ Expand to see all @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
engine/clients/vald/search.py
Outdated
|
||
|
||
class ValdSearcher(BaseSearcher): | ||
cfg: Dict = None |
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.
reportGeneralTypeIssues: Expression of type "None" cannot be assigned to declared type "Dict[Unknown, Unknown]"
Type "None" cannot be assigned to type "Dict[Unknown, Unknown]"
ℹ️ Expand to see all @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
run benchmark