-
Notifications
You must be signed in to change notification settings - Fork 41
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
Issue273 default values for configuration settings #324
Merged
juhoinkinen
merged 22 commits into
master
from
issue273-default-values-for-configuration-settings
Sep 30, 2019
Merged
Changes from 14 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
aa592d8
Default project name to project_id
juhoinkinen 6480bd8
Fill missing parameters with defaults when creating backend objects
juhoinkinen 7146977
Switch info about using default params to debug level
juhoinkinen 4ef0b5a
Get all parent/ancestor classes instead of only direct ones
juhoinkinen f52a8bc
Use type to get class and thus avoid the magic method
juhoinkinen f8825ed
Refine debug message and docstring
juhoinkinen bf58247
Simpler & more controllable parameter defaulting
juhoinkinen ff7969b
Add default params for fasttext and PAV
juhoinkinen 089ac38
Debug msg for using default params to one line
juhoinkinen 0104fbc
Use default params for VW multi and ensemble
juhoinkinen 2781087
Make fill_params_with_defaults testable; use it to set params in the …
juhoinkinen 2d9a891
Default params for dummy BE and a test for params filling with it
juhoinkinen a215af9
Tests for backend params defaulting
juhoinkinen 0fb125c
Skip test when fasttext not available
juhoinkinen c037815
Make params a property with defaults setting
juhoinkinen 1843332
From SectionProxy obj to dict to be able to use .copy()
juhoinkinen 63a199c
Rename params originating from projects.cfg for clarity
juhoinkinen 420d3d1
Defaulting simply by updating default params with config params
juhoinkinen 0df9735
Merge branch 'master' into issue273-default-values-for-configuration-…
juhoinkinen 91136a6
Adapt to PR #322
juhoinkinen 157ecab
Make config_params a field and params a property
juhoinkinen d22cd2d
Drop copying of default_params
juhoinkinen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would the
params
field actually be better to be implemented as a property, and then this would be decorated with@params.setter
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea of
params
being a property. It could be implemented in such a way that it transparently fills in default parameters before returning a dict. And it could have a setter used to set manual parameters (which would be stored in an internal field, say_params
). Actually, the filling in could also be done within the setter - then it would only happen once instead of on every access. Accessing theparams
property would then just returnself._params
or perhaps acopy()
to be safe.