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
3fb56bfe
Commit
3fb56bfe
authored
7 years ago
by
Stefano Borini
Browse files
Options
Downloads
Patches
Plain Diff
Added documentation
parent
848be820
No related branches found
No related tags found
1 merge request
!79
Deliver notification info
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
force_bdss/mco/base_mco.py
+13
-1
13 additions, 1 deletion
force_bdss/mco/base_mco.py
force_bdss/mco/events.py
+6
-3
6 additions, 3 deletions
force_bdss/mco/events.py
with
19 additions
and
4 deletions
force_bdss/mco/base_mco.py
+
13
−
1
View file @
3fb56bfe
...
@@ -14,7 +14,7 @@ class BaseMCO(ABCHasStrictTraits):
...
@@ -14,7 +14,7 @@ class BaseMCO(ABCHasStrictTraits):
#: A reference to the factory
#: A reference to the factory
factory
=
Instance
(
IMCOFactory
)
factory
=
Instance
(
IMCOFactory
)
#:
Must be t
riggered when an event occurs.
#:
T
riggered when an event occurs.
event
=
Event
(
BaseMCOEvent
)
event
=
Event
(
BaseMCOEvent
)
def
__init__
(
self
,
factory
,
*
args
,
**
kwargs
):
def
__init__
(
self
,
factory
,
*
args
,
**
kwargs
):
...
@@ -41,4 +41,16 @@ class BaseMCO(ABCHasStrictTraits):
...
@@ -41,4 +41,16 @@ class BaseMCO(ABCHasStrictTraits):
"""
"""
def
notify_event
(
self
,
event
):
def
notify_event
(
self
,
event
):
"""
Method based interface to deliver an event, instead of
assignment to traits.
Sends the event, synchronously. When the routine returns,
listeners have been fully informed (they might, however, handle
the event asynchronously at their convenience)
Parameters
----------
event: BaseMCOEvent
The event to deliver.
"""
self
.
event
=
event
self
.
event
=
event
This diff is collapsed.
Click to expand it.
force_bdss/mco/events.py
+
6
−
3
View file @
3fb56bfe
...
@@ -2,17 +2,20 @@ from traits.api import HasStrictTraits, Tuple
...
@@ -2,17 +2,20 @@ from traits.api import HasStrictTraits, Tuple
class
BaseMCOEvent
(
HasStrictTraits
):
class
BaseMCOEvent
(
HasStrictTraits
):
pass
"""
Base event for the MCO
"""
class
MCOStartEvent
(
BaseMCOEvent
):
class
MCOStartEvent
(
BaseMCOEvent
):
pass
"""
MCO should emit this event when the evaluation starts.
"""
class
MCOFinishEvent
(
BaseMCOEvent
):
class
MCOFinishEvent
(
BaseMCOEvent
):
pass
"""
MCO should emit this event when the evaluation ends.
"""
class
MCOProgressEvent
(
BaseMCOEvent
):
class
MCOProgressEvent
(
BaseMCOEvent
):
"""
MCO should emit this event for every new evaluation that has been
completed. It carries data about the evaluation, specifically the
input data (MCO parameter values) and the resulting output (KPIs).
"""
input
=
Tuple
()
input
=
Tuple
()
output
=
Tuple
()
output
=
Tuple
()
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