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

Autograd add grad error (failing test) #69

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

swfsql
Copy link
Contributor

@swfsql swfsql commented Jun 20, 2024

Related to #68

@swfsql
Copy link
Contributor Author

swfsql commented Jun 20, 2024

Note: reviewing the fix code, I think the it's still not correct because ultimately every different index may have it's own index diff that precedent removals may have interfered with it. Currently, only the indexes above the "global minimal" get a index diff, but not all the would need to.

For example, if idx 10 is removed and then idx 3 is also removed, it would work OK. But if then idx 7 is removed, then only those above idx 7 should have a diff of -2, while then those like idx 5 (which is below 7) should have only a -1 diff. And that removal on idx 5 should also affect all diffs above idx 5, so then I think every index should have it's own idx diff.

@swfsql
Copy link
Contributor Author

swfsql commented Jun 20, 2024

Another note to add is that although the status quo (main) code doesn't fail on the second test (test_add_grad_decreasing_idx_r2), I think it removes the wrong dimension. This would happen because the vector still has enough items, but the wrong item would get removed.

@jordanmb
Copy link

jordanmb commented Feb 5, 2025

I tried applying this patch and it does not fix the issues for my workflow. I was really hoping this library would be usable because I love the approach.

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.

2 participants