Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
zuoxingdong committed Aug 24, 2018
1 parent 64e53cd commit 8ea32f6
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions lagom/base_algo.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,28 @@
class BaseAlgorithm(object):
"""Base class for the algorithm.
r"""Base class for all algorithms.
All inherited subclasses should at least implement the following functions:
1. __call__(self, config)
Any algorithm should subclass this class.
The subclass should implement at least the following:
- __call__(self, config)
"""
def __init__(self, name):
"""Initialize the algorithm.
r"""Initialize the algorithm.
Args:
name (str): name of the algorithm
"""
self.name = name

def __call__(self, config):
"""Run the algorithm with given configurations.
r"""Run the algorithm with given configuration.
Args:
config (OrderedDict): dictionary of configurations
Returns:
result (object): Result of the execution.
If no need to return anything, then `return None`
If no need to return anything, then an ``None`` should be returned.
"""
raise NotImplementedError

0 comments on commit 8ea32f6

Please sign in to comment.