Fix: freeze TemporalSmoothing conv correctly and clean up pyproject.toml deps#7
Conversation
…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
|
Hi @Ashwinhegde19! Thank you for your pull request and welcome to our community. Action RequiredIn 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. ProcessIn 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 If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
Summary
model.py: Replaceconv.requires_grad = Falsewithconv.requires_grad_(False). Settingrequires_graddirectly on annn.Moduleis a no-op — it just adds a plain Python attribute and does not affect parameter gradients. The Gaussian kernel inTemporalSmoothingwas therefore being updated by the optimizer unintentionally. The correct API is the in-place methodrequires_grad_(False).pyproject.toml: Replace hard-pinnednumpy==2.2.6withnumpy>=2.0,<3. Hard-pinning in a library'spyproject.tomlcauses installation conflicts for any environment that has a different NumPy version.pyproject.toml: Removepipfrom runtime dependencies.pipis a package manager, not a library, and has no place independencies.Related Issues
Closes #5
Closes #6
Test plan
TemporalSmoothingconv kernel is not updated during trainingpip install tribev2succeeds alongside other packages with different NumPy versions