Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
beat.backend.python
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
beat
beat.backend.python
Commits
8733cbc8
Commit
8733cbc8
authored
7 years ago
by
Samuel GAIST
Browse files
Options
Downloads
Patches
Plain Diff
[algorithm] Improved documentation and added missing parts
parent
7cb4a16b
No related branches found
No related tags found
2 merge requests
!17
Merge development branch 1.5.x
,
!13
Improve documentation
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
beat/backend/python/algorithm.py
+15
-3
15 additions, 3 deletions
beat/backend/python/algorithm.py
with
15 additions
and
3 deletions
beat/backend/python/algorithm.py
+
15
−
3
View file @
8733cbc8
...
...
@@ -81,14 +81,14 @@ class Runner(object):
module (:std:term:`module`): The preloaded module containing the
algorithm as returned by :py:func:`.loader.load_module`.
obj_name (str): The name of the object within the module you
'
re
interested
on
obj_name (str): The name of the object within the module you
'
re
interested
on
algorithm (object): The algorithm instance that is used for parameter
checking.
exc (:std:term:`class`): The class to use as base exception when
translating the exception from the user code. Read the documention of
translating the exception from the user code. Read the document
at
ion of
:py:func:`.loader.run` for more details.
'''
...
...
@@ -498,6 +498,11 @@ class Algorithm(object):
@name.setter
def
name
(
self
,
value
):
"""
Sets the name of this object
Parameters:
name (str): Name of this object
"""
if
self
.
data
[
'
language
'
]
==
'
unknown
'
:
raise
RuntimeError
(
"
algorithm has no programming language set
"
)
...
...
@@ -616,11 +621,15 @@ class Algorithm(object):
@property
def
isAnalyzer
(
self
):
"""
Returns whether this algorithms is an analyzer
"""
return
(
self
.
results
is
not
None
)
@property
def
results
(
self
):
"""
The results of this algorithm
"""
return
self
.
data
.
get
(
'
results
'
)
...
...
@@ -632,6 +641,8 @@ class Algorithm(object):
@property
def
parameters
(
self
):
"""
The parameters of this algorithm
"""
return
self
.
data
.
get
(
'
parameters
'
)
...
...
@@ -643,6 +654,7 @@ class Algorithm(object):
@property
def
splittable
(
self
):
"""
Whether this algorithm can be split between several processes
"""
return
self
.
data
.
get
(
'
splittable
'
,
False
)
...
...
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