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

error and errorsquaredNorm optional data #105

Merged
merged 10 commits into from
Mar 14, 2022

Conversation

jeffin07
Copy link
Contributor

@jeffin07 jeffin07 commented Mar 8, 2022

Motivation and Context

API improvement in Objective: error and errorSquaredNorm can optionally take in var_data which if passed would call update internally. Document the behavior that if var_data is passed this will update the objective. #4

How Has This Been Tested

Testes using unit test and a custom example

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have completed my CLA (see CONTRIBUTING)
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@facebook-github-bot
Copy link

Hi @jeffin07!

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 [email protected]. Thanks!

@facebook-github-bot
Copy link

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

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 8, 2022
@luisenp luisenp added enhancement New feature or request and removed CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. labels Mar 8, 2022
@luisenp
Copy link
Contributor

luisenp commented Mar 8, 2022

Thanks for putting up the PR, @jeffin07. BTW, have you installed the pre-commit hooks? See instructions here.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 8, 2022
@facebook-github-bot
Copy link

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

@mhmukadam mhmukadam linked an issue Mar 8, 2022 that may be closed by this pull request
theseus/core/objective.py Outdated Show resolved Hide resolved
theseus/core/objective.py Outdated Show resolved Hide resolved
theseus/core/objective.py Outdated Show resolved Hide resolved
theseus/core/objective.py Outdated Show resolved Hide resolved
Copy link
Contributor

@mhmukadam mhmukadam left a comment

Choose a reason for hiding this comment

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

Looking good, left some comments. Thanks for the contributions and welcome to the community!

Also @luisenp might be looking into getting the CI up for PRs coming from forks.

Copy link
Contributor

@luisenp luisenp left a comment

Choose a reason for hiding this comment

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

Thanks a lot for the contribution @jeffin07, almost there!

@mhmukadam not sure what the CI issue is, I've noticed tests not firing sometimes even for our own PRs.

@jeffin07
Copy link
Contributor Author

@luisenp Updated Changes after reivew

Copy link
Contributor

@mhmukadam mhmukadam left a comment

Choose a reason for hiding this comment

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

Looks good. Two comments on unit tests.

Copy link
Contributor

@luisenp luisenp left a comment

Choose a reason for hiding this comment

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

Only a few minor changes to test code.

theseus/core/tests/test_objective.py Outdated Show resolved Hide resolved
theseus/core/tests/test_objective.py Outdated Show resolved Hide resolved
@jeffin07
Copy link
Contributor Author

@luisenp updated the unit test

@mhmukadam mhmukadam marked this pull request as draft March 10, 2022 16:15
@mhmukadam mhmukadam marked this pull request as ready for review March 10, 2022 16:15
@mhmukadam
Copy link
Contributor

mhmukadam commented Mar 10, 2022

Tried to convert to draft and back but that didn't trigger CI tests either.
Update: Turns out there was a setting in CI to enable it on PR from forks. Maybe another commit will trigger it now.

@luisenp
Copy link
Contributor

luisenp commented Mar 11, 2022

CI is failing due to some mypy error that they probably just added in a new version. I added a type: ignore to main branch, so hopefully it will be fixed in the next CI run.

@jeffin07
Copy link
Contributor Author

@luisenp Do i need to do anything ?

Copy link
Contributor

@luisenp luisenp left a comment

Choose a reason for hiding this comment

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

This looks almost ready to me! I left a few minor comments that should be easy to fix. Thanks!

theseus/core/tests/test_objective.py Outdated Show resolved Hide resolved
theseus/core/tests/test_objective.py Show resolved Hide resolved
theseus/core/tests/test_objective.py Outdated Show resolved Hide resolved
theseus/core/tests/test_objective.py Outdated Show resolved Hide resolved
theseus/core/tests/test_objective.py Show resolved Hide resolved
@jeffin07
Copy link
Contributor Author

@luisenp Updated the changes

Copy link
Contributor

@luisenp luisenp left a comment

Choose a reason for hiding this comment

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

LGTM! If @mhmukadam has no additional comments, we can merge. Thanks so much for your contrubution @jeffin07!

Copy link
Contributor

@mhmukadam mhmukadam left a comment

Choose a reason for hiding this comment

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

Looks great! Thanks again for your contribution. Feel free to look at other open issues that interest you (we can certainly use the help).

@mhmukadam mhmukadam merged commit 3be919b into facebookresearch:main Mar 14, 2022
suddhu pushed a commit to suddhu/theseus that referenced this pull request Jan 21, 2023
* error and errorsquaredNorm optional data

* variable checking in unit test

* test for varibale change in objective

* variable checking function in unit test

* commom test function for objective error
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 Facebook bot. Authors need to sign the CLA before a PR can be reviewed. enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

error and errorSquaredNorm can optionally take in variable data
4 participants