Skip to content

Conversation

@morgandu
Copy link
Contributor

@morgandu morgandu commented May 5, 2021

Fixes #<b/186513106> 🦕

@morgandu morgandu requested a review from sasha-gitg May 5, 2021 16:10
@product-auto-label product-auto-label bot added the api: aiplatform Issues related to the AI Platform API. label May 5, 2021
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label May 5, 2021
@morgandu morgandu force-pushed the mor--expose-environment-variables-to-run-arguments-in-custom-training-classes branch 5 times, most recently from 14186af to 05ca77d Compare May 6, 2021 18:48
@sasha-gitg
Copy link
Member

I think this is failing because, unlike model_to_upload, training_task_inputs is a struct.Value:

https://github.com/googleapis/python-aiplatform/blob/master/google/cloud/aiplatform_v1/types/training_pipeline.py#L161

Try passing in a dictionary with the same schema. Something like::

spec["pythonPackageSpec"]["env"] = [
  {'name':key, 'value': value} for key, value in environment_variables.items()]

@morgandu morgandu force-pushed the mor--expose-environment-variables-to-run-arguments-in-custom-training-classes branch from 05ca77d to a1babec Compare May 6, 2021 20:35
Copy link
Member

@sasha-gitg sasha-gitg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Morgan!

@sasha-gitg sasha-gitg merged commit 7ae28b8 into googleapis:master May 10, 2021
@morgandu morgandu deleted the mor--expose-environment-variables-to-run-arguments-in-custom-training-classes branch May 10, 2021 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: aiplatform Issues related to the AI Platform API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants