mik-laj commented on a change in pull request #7809: Run Dataflow for ML Engine
summary in venv
URL: https://github.com/apache/airflow/pull/7809#discussion_r396337172
##########
File path: airflow/providers/google/cloud/utils/mlengine_operator_utils.py
##########
@@ -225,20 +225,22 @@ def validate_err_and_count(summary):
metric_fn_encoded = base64.b64encode(dill.dumps(metric_fn,
recurse=True)).decode()
evaluate_summary = DataflowCreatePythonJobOperator(
task_id=(task_prefix + "-summary"),
- py_options=["-m"],
-
py_file="airflow.providers.google.cloud.utils.mlengine_prediction_summary",
+ py_file=os.path.join(os.path.dirname(__file__),
'mlengine_prediction_summary.py'),
dataflow_default_options=dataflow_options,
options={
"prediction_path": prediction_path,
"metric_fn_encoded": metric_fn_encoded,
"metric_keys": ','.join(metric_keys)
},
py_interpreter=py_interpreter,
+ py_requirements=[
+ 'apache-beam[gcp]>=2.14.0'
Review comment:
The Cloud Composer team must think of a way to access pip if they want this
operator to work. This team is following changes in MLEngine and is aware of
new requirements.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services