Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
force-bdss
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Adham Hashibon
force-bdss
Commits
6dffc922
Commit
6dffc922
authored
7 years ago
by
Stefano Borini
Browse files
Options
Downloads
Patches
Plain Diff
Added doc
parent
e8044a0a
No related branches found
No related tags found
1 merge request
!60
Moved parameters into MCO
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
force_bdss/mco/parameters/base_mco_parameter_factory.py
+17
-1
17 additions, 1 deletion
force_bdss/mco/parameters/base_mco_parameter_factory.py
with
17 additions
and
1 deletion
force_bdss/mco/parameters/base_mco_parameter_factory.py
+
17
−
1
View file @
6dffc922
...
@@ -7,8 +7,12 @@ class BaseMCOParameterFactory(HasStrictTraits):
...
@@ -7,8 +7,12 @@ class BaseMCOParameterFactory(HasStrictTraits):
"""
Factory that produces the model instance of a given BASEMCOParameter
"""
Factory that produces the model instance of a given BASEMCOParameter
instance.
instance.
Must be reimplemented for the specific parameter.
"""
Must be reimplemented for the specific parameter. The generic create_model
is generally enough, and the only entity to define is model_class with
the appropriate class of the parameter.
"""
#: A reference to the bundle this parameter factory lives in.
bundle
=
Instance
(
BaseMCOBundle
)
bundle
=
Instance
(
BaseMCOBundle
)
#: A unique string identifying the parameter
#: A unique string identifying the parameter
...
@@ -29,6 +33,18 @@ class BaseMCOParameterFactory(HasStrictTraits):
...
@@ -29,6 +33,18 @@ class BaseMCOParameterFactory(HasStrictTraits):
def
create_model
(
self
,
data_values
=
None
):
def
create_model
(
self
,
data_values
=
None
):
"""
Creates the instance of the model class and returns it.
"""
Creates the instance of the model class and returns it.
You should not reimplement this, as the default is generally ok.
Instead, just define model_class with the appropriate Parameter class.
Parameters
----------
data_values: dict or None
The dictionary of values for this parameter. If None, a default
object will be returned.
Returns
-------
instance of model_class.
"""
"""
if
data_values
is
None
:
if
data_values
is
None
:
data_values
=
{}
data_values
=
{}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment