Skip to content

Fix: freeze TemporalSmoothing conv correctly and clean up pyproject.toml deps#7

Open
Ashwinhegde19 wants to merge 1 commit intofacebookresearch:mainfrom
Ashwinhegde19:fix/requires-grad-and-pyproject
Open

Fix: freeze TemporalSmoothing conv correctly and clean up pyproject.toml deps#7
Ashwinhegde19 wants to merge 1 commit intofacebookresearch:mainfrom
Ashwinhegde19:fix/requires-grad-and-pyproject

Conversation

@Ashwinhegde19
Copy link
Copy Markdown

Summary

  • model.py: Replace conv.requires_grad = False with conv.requires_grad_(False). Setting requires_grad directly on an nn.Module is a no-op — it just adds a plain Python attribute and does not affect parameter gradients. The Gaussian kernel in TemporalSmoothing was therefore being updated by the optimizer unintentionally. The correct API is the in-place method requires_grad_(False).

  • pyproject.toml: Replace hard-pinned numpy==2.2.6 with numpy>=2.0,<3. Hard-pinning in a library's pyproject.toml causes installation conflicts for any environment that has a different NumPy version.

  • pyproject.toml: Remove pip from runtime dependencies. pip is a package manager, not a library, and has no place in dependencies.

Related Issues

Closes #5
Closes #6

Test plan

  • Verify TemporalSmoothing conv kernel is not updated during training
  • Verify pip install tribev2 succeeds alongside other packages with different NumPy versions

…oml deps

- Use requires_grad_(False) instead of requires_grad = False on nn.Module,
  which was a no-op and left the Gaussian kernel trainable unintentionally
- Replace hard-pinned numpy==2.2.6 with numpy>=2.0,<3 to avoid install conflicts
- Remove pip from runtime dependencies (it is a package manager, not a library)

Fixes facebookresearch#5, facebookresearch#6
@meta-cla
Copy link
Copy Markdown

meta-cla bot commented Mar 28, 2026

Hi @Ashwinhegde19!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@meta-cla
Copy link
Copy Markdown

meta-cla bot commented Mar 28, 2026

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Mar 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

1 participant