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

Added a check in TheseusFunction that enforces copy() also copies the variables #202

Merged
merged 3 commits into from
Jun 6, 2022

Conversation

luisenp
Copy link
Contributor

@luisenp luisenp commented Jun 3, 2022

We are using copy to create new variables in the cost function vectorization code, and this would help avoid some unwanted bugs if an user creates a new cost function that re-uses some of the old variables rather than copying.

@luisenp luisenp requested a review from mhmukadam June 3, 2022 13:55
@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 Jun 3, 2022
@luisenp luisenp merged commit 9327e9f into main Jun 6, 2022
@luisenp luisenp deleted the lep.enforce_no_duplicate_vars_in_copy branch June 6, 2022 20:52
suddhu pushed a commit to suddhu/theseus that referenced this pull request Jan 21, 2023
… variables (facebookresearch#202)

* Added a check in TheseusFunction that enforces copy() also copies the variables.

* Added clearer error message for duplicate vars in TheseusFunction.copy().

* Minor fix in unit test import convention.
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants