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

Ensure embeddings matrix is never initialized with zero dimensions #252

Merged
merged 1 commit into from
Sep 20, 2024

Conversation

jlewi
Copy link
Owner

@jlewi jlewi commented Sep 20, 2024

  • Because we divide by 1.5; in the edge case were we have 1 example we'd end up rounding down to 0 which will cause problems when we try to initialize a matrix to that size. Fix Divide By Zero Error #248

* Because we divide by 1.5; in the edge case were we have 1 example we'd
  end up rounding down to 0 which will cause problems when we try to initialize a matrix to that size.
Fix #248
@jlewi jlewi enabled auto-merge (squash) September 20, 2024 23:32
Copy link

netlify bot commented Sep 20, 2024

Deploy Preview for foyle canceled.

Name Link
🔨 Latest commit b1f1886
🔍 Latest deploy log https://app.netlify.com/sites/foyle/deploys/66ee05eba4da0c000879ca9f

@jlewi jlewi merged commit 95ffab7 into main Sep 20, 2024
5 checks passed
@jlewi jlewi deleted the jlewi/rag branch September 20, 2024 23:34
@jlewi jlewi mentioned this pull request Sep 26, 2024
jlewi added a commit that referenced this pull request Sep 26, 2024
When learner is initialized at program startup we want to initialize an
empty array because learned examples might arrive during program
execution.

If we have a nil matrix to store them we will get a segfault.

Ensuring a matrix is always initialized at startup is one way to solve
this.

Follow up to #252
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.

Divide By Zero Error
1 participant