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/minor bugs #2348

Merged
merged 9 commits into from
Jul 28, 2024
Merged

Fix/minor bugs #2348

merged 9 commits into from
Jul 28, 2024

Conversation

kartik4949
Copy link
Collaborator

Description

Related Issues

Checklist

  • Is this code covered by new or existing unit tests or integration tests?
  • Did you run make unit_testing and make integration-testing 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

@@ -210,6 +214,8 @@ def schedule_jobs(
ids = db.execute(self.select.select_ids)
ids = [id[self.select.primary_id] for id in ids]

# TODO: Check ready ids

Copy link
Collaborator

Choose a reason for hiding this comment

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

Please do this

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is not required, will remove the TODO

@override
def post_create(self, db: "Datalayer") -> None:
"""Post-create hook.

:param db: Data layer instance.
"""
logging.info('Requesting vector index setup on CDC service')
if CFG.cluster.cdc.uri and not is_csn('cdc'):
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

csn means current service name

this check if the current process is cdc
if yes then donot create a cdc trigger

Copy link
Collaborator

Choose a reason for hiding this comment

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

How will this work if the services are in a single server?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

check the function, is_csn

When single server is used via testing
I check for it

def connect(self, *args, **kwargs):
pass

def create_handler(self, component_id, compute_kwargs={}):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Doc-string.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ok

@@ -85,3 +85,9 @@ def shutdown(self) -> None:

def execute_task(self, job_id, dependencies, compute_kwargs={}):
"""Execute task function for distributed backends."""

def connect(self, *args, **kwargs):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Doc-string.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ok

@@ -195,7 +196,7 @@ def backfill_vector_search(self, vi, searcher):
if s.CFG.cluster.vector_search.type == 'native':
return

if s.CFG.cluster.vector_search.uri and not self.server_mode:
if s.CFG.cluster.vector_search.uri and not is_csn('vector_search'):
Copy link
Collaborator

Choose a reason for hiding this comment

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

What's this? Please add comments.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

CSN - current service name

this checks if current process is a vector search server.

@@ -195,7 +196,7 @@ def backfill_vector_search(self, vi, searcher):
if s.CFG.cluster.vector_search.type == 'native':
return

if s.CFG.cluster.vector_search.uri and not self.server_mode:
if s.CFG.cluster.vector_search.uri and not is_csn('vector_search'):
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

CSN - current service name

this checks if current process is a vector search server.

@@ -72,21 +72,25 @@ def outputs_select(self):
"""Get select statement for outputs."""
return self.db[self.select.table].select().outputs(self.predict_id)

@property
def cdc_table(self):
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

cdc table property which returns the component table to be listened by cdc service when added

superduper/components/model.py Show resolved Hide resolved
@override
def post_create(self, db: "Datalayer") -> None:
"""Post-create hook.

:param db: Data layer instance.
"""
logging.info('Requesting vector index setup on CDC service')
if CFG.cluster.cdc.uri and not is_csn('cdc'):
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

check the function, is_csn

When single server is used via testing
I check for it

superduper/components/vector_index.py Show resolved Hide resolved
superduper/base/datalayer.py Show resolved Hide resolved
@kartik4949 kartik4949 merged commit 35d5023 into superduper-io:main Jul 28, 2024
3 checks passed
@kartik4949 kartik4949 deleted the fix/minor_bugs branch July 28, 2024 07:02
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