Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Allow missing args when using --init-opt #3112

Merged
merged 8 commits into from
Oct 2, 2020
Merged

Conversation

EricMichaelSmith
Copy link
Contributor

Patch description
Set --allow-missing-init-opts True to be able to load in opt args with --init-opt even if some of the args no longer exist. Also added unit testing of --init-opt

Testing steps
python -m unittest tests.test_opt


# Assert that the opt file *can* be loaded in if we set
# --allow-missing-init-opts
_ = ParlaiParser(True, True).parse_kwargs(
Copy link
Contributor

Choose a reason for hiding this comment

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

do you want to add a check that the resulting opt has the made_up_arg in it?

@EricMichaelSmith EricMichaelSmith merged commit 6b52b48 into master Oct 2, 2020
@EricMichaelSmith EricMichaelSmith deleted the init-opt-fix branch October 2, 2020 15:21
moyapchen pushed a commit that referenced this pull request Oct 2, 2020
* Allow missing init opt opts

* Add part of unit test

* Work on unit test

* Test fixes

* Fix second test

* Fix test

* Check obsolete arg does not exist
moyapchen pushed a commit that referenced this pull request Oct 2, 2020
* Allow missing init opt opts

* Add part of unit test

* Work on unit test

* Test fixes

* Fix second test

* Fix test

* Check obsolete arg does not exist
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants