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

Speed Optimizations #89

Merged
merged 2 commits into from
Jan 26, 2025
Merged

Speed Optimizations #89

merged 2 commits into from
Jan 26, 2025

Conversation

sidjha1
Copy link
Collaborator

@sidjha1 sidjha1 commented Jan 26, 2025

  1. Swap pydantic with dataclass to save on validation times
  2. Use smaller K in run_sem_sim_join
  3. Enjoy better batching behavior in sem_join
  4. Better batch execution in LM::__call__

@@ -286,7 +310,7 @@ def run_sem_sim_join(l1: pd.Series, l2: pd.Series, col1_label: str, col2_label:
l2_df = l2.to_frame(name=col2_label)
l2_df = l2_df.sem_index(col2_label, f"{col2_label}_index")

K = len(l2) * len(l1)
K = len(l2)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@melissa-pan can you verify this change? I don't think K should be multiplied by len(l1) since we are only searching an index on l2

Copy link
Collaborator

Choose a reason for hiding this comment

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

as per discussion, k should be l2. thanks!

@sidjha1 sidjha1 requested a review from melissa-pan January 26, 2025 01:05
@liana313 liana313 merged commit 1532528 into main Jan 26, 2025
5 of 6 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.

3 participants