[
https://issues.apache.org/jira/browse/BEAM-5443?focusedWorklogId=149655&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-149655
]
ASF GitHub Bot logged work on BEAM-5443:
----------------------------------------
Author: ASF GitHub Bot
Created on: 29/Sep/18 17:23
Start Date: 29/Sep/18 17:23
Worklog Time Spent: 10m
Work Description: mxm commented on a change in pull request #6512:
[BEAM-5443] Pipeline option defaults for portable runner.
URL: https://github.com/apache/beam/pull/6512#discussion_r221434534
##########
File path: sdks/python/apache_beam/pipeline.py
##########
@@ -152,6 +153,14 @@ def __init__(self, runner=None, options=None, argv=None):
raise ValueError(
'Pipeline has validations errors: \n' + '\n'.join(errors))
+ # set default experiments for portable runner
+ # (needs to occur prior to pipeline construction)
+ if self._options.view_as(StandardOptions).runner == 'PortableRunner':
+ experiments = (self._options.view_as(DebugOptions).experiments or [])
+ if not 'beam_fn_api' in experiments:
+ experiments.append('beam_fn_api')
+ self._options.view_as(DebugOptions).experiments = experiments
Review comment:
To clarify: I meant to replace the default value of experiments from `None`
to `[]` in the `DebugOptions` class. Then you can replace 159-162 with the two
lines above. You won't have to work on a list copy.
Not super important but I found it to be less verbose.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 149655)
Time Spent: 2h (was: 1h 50m)
> Simplify Python pipeline options for portable runner
> ----------------------------------------------------
>
> Key: BEAM-5443
> URL: https://issues.apache.org/jira/browse/BEAM-5443
> Project: Beam
> Issue Type: Improvement
> Components: sdk-py-harness
> Affects Versions: 2.7.0
> Reporter: Thomas Weise
> Assignee: Thomas Weise
> Priority: Major
> Labels: portability
> Time Spent: 2h
> Remaining Estimate: 0h
>
> Currently, the user needs to specify several extra pipeline options to run a
> Python pipeline with the portable runner. It would be nice to remove the need
> to explicitly provide these options when they can be inferred / have defaults.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)