-
Notifications
You must be signed in to change notification settings - Fork 1.8k
automl: remove old files and update region tags for samples #1119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
5702f91
remove old files that are updated by the generic batch_predict sample
nnegrey f73c850
Fix region tags
nnegrey 966d955
Update dataset_list.go
nnegrey eb10d5c
Merge branch 'master' into automl-cleanup
nnegrey 92b173d
Merge branch 'master' into automl-cleanup
nnegrey c2a8c07
Merge master
nnegrey 10c1c84
Merge branch 'automl-cleanup' of https://github.com/GoogleCloudPlatfo…
nnegrey e05ee68
automl: run gofmt -w -s
tbpg ff2391b
Update model_evaluation_get.go
nnegrey c75c0ad
Update model_evaluation_list.go
nnegrey 7122f69
Merge branch 'master' into automl-cleanup
tbpg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure all of the imports are the same and all of the whitespace is correct here? For some samples, this can make sense, but it isn't immediately obvious during review that these regions are correct. Separate files are more up front work, but very clearly correct (and don't accidentally get messed up when there is a new import).
(Go will fail to compile if there is an extra import.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean technically all of the automl samples should all have been on the v1 library not the v1beta1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was my mistake, fixing that in #1122
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I meant all of the imports. Not just the API import. The reason the standard is to use separate files (https://github.com/GoogleCloudPlatform/golang-samples/blob/master/CONTRIBUTING.md#one-file-per-sample) is so that we're 100% sure the sample will work when copied and pasted from cloud.google.com.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's also very easy to mess up start/end tags when going in and out of functions (looking at the rest of the PR). I'm not sure every region is correct, so I'd prefer separate files, if you don't mind.
gofmt
should pass for every region, too.Sometimes this type of setup works, but Go is weird with import and formatting requirements, so we have to be careful. :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the go folks want to maintain a bunch of additional files, that is fine. The goal of this was to move us away from maintaining 1400 files to about 400 for AutoML snippets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Y'all will be maintaining the samples. So, if you prefer to do it this way, it seems correct from what I can tell. Let's go ahead with this as-is and we can change it later if needed. Sorry for the back and forth.