Skip to content

Commit

Permalink
docs fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dingguanglei committed Dec 4, 2018
1 parent 04c3102 commit 48f4a2c
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion jdit/parallel/parallel_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,23 @@
from types import FunctionType

class SupParallelTrainer(object):
""" Training parallel.
""" Training parallel
.. attr::`default_params` is the default params.
.. attr::`unfixed_params_list` is the different params.
:param default_params: a ``dict()`` like ``{param_1:d1, param_2:d2 ...}``
:param unfixed_params_list: a ``list`` like ``[{param_1:a1, param_2:a2}, {param_1:b1, param_2:b2}, ...]``.
.. note ::
You must set the value of ``task_id`` and ``gpu_ids_abs``, regardless in ``default_params`` or ``unfixed_params_list``.
``{'task_id': 1`}`` , ``{'gpu_ids_abs': [0,1]}``
"""
def __init__(self, default_params:dict, unfixed_params_list:list):
"""
Expand Down Expand Up @@ -91,7 +101,9 @@ def train(self, max_processes=4):
"""start parallel task
To start the parallel task that were saved in ``self.parallel_plans`` dictionary.
:param max_processes: A max amount of processes for setting ``Pool(processes = ?)`` method.
"""
# print("Main process ID: %d" % os.getpid())
print('Waiting for all subprocesses done...\n%s' % ('=' * 36))
Expand Down

0 comments on commit 48f4a2c

Please sign in to comment.