Skip to content

Fixed resources should be passed in by environment variables (2/2) #52

@aribray

Description

@aribray

Essentially what we want here is that I as a developer, should be able to run the tests on these samples without modifying them to confirm they still work. However unless I'm on the team maintaining the samples, I likely don't have access to the resources it's tested with. By using env variables means all I need to do when running locally is change the env var, and not worry about changing the model ids when there is a problem.

So something like this is perfectly acceptable:

resource_id = os.getenv("YOUR-RESOURCE-NAME")

For bonus points you can include a link to instructions for creating the resource, if you really want to make it accessible for other developers.

Originally posted by @kurtisvg in #13 (comment)

Metadata

Metadata

Assignees

Labels

api: aiplatformIssues related to the AI Platform API.samplesIssues that are directly related to samples.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions