Skip to content

Commit

Permalink
Merge pull request #2504 from markheger/develop
Browse files Browse the repository at this point in the history
example added to create_submission_parameter(), #2499
  • Loading branch information
markheger committed Jul 8, 2020
2 parents 0f74010 + 836de91 commit 9fd295a
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -929,6 +929,18 @@ def create_submission_parameter(self, name, default=None, type_=None):
s = ...
s = s.filter(lambda v : v > threshold())
Submission parameters may be used to specify the degree of parallelism. e.g.::
stv_channels = topo.create_submission_parameter('num_channels', type_=int)
s = topo.source(range(67)).set_parallel(stv_channels)
s = s.filter(lambda v : v % stv_channels() == 0)
s = s.end_parallel()
jc = JobConfig()
jc.submission_parameters['num_channels'] = 3
jc.add(cfg)
.. note::
The parameter (value returned from this method) is only
supported within a lambda expression or a callable
Expand Down

0 comments on commit 9fd295a

Please sign in to comment.