Skip to content

Commit

Permalink
automl: remove extraneous region tagging (#391)
Browse files Browse the repository at this point in the history
- [x ] Ensure the tests and linter pass

Removes a lot of unused region tagging. This is part of an internal clean-up to simplify sample repositories by publishing/deleting unused code, though in this case the region tags were simply removed. The samples themselves are still on CGC using the tags left over.
  • Loading branch information
Strykrol authored and Ace Nassri committed Nov 14, 2022
1 parent 2fbdb8a commit b8cbcf7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 32 deletions.
22 changes: 0 additions & 22 deletions automl/get_dataset.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ function main(
location = 'us-central1',
datasetId = 'YOUR_DATASET_ID'
) {
// [START automl_language_entity_extraction_get_dataset]
// [START automl_language_sentiment_analysis_get_dataset]
// [START automl_language_text_classification_get_dataset]
// [START automl_translate_get_dataset]
// [START automl_vision_classification_get_dataset]
// [START automl_vision_object_detection_get_dataset]
/**
Expand Down Expand Up @@ -56,29 +52,20 @@ function main(
console.log('Dataset create time');
console.log(`\tseconds ${response.createTime.seconds}`);
console.log(`\tnanos ${response.createTime.nanos / 1e9}`);
// [END automl_language_sentiment_analysis_get_dataset]
// [END automl_language_text_classification_get_dataset]
// [END automl_translate_get_dataset]
// [END automl_vision_classification_get_dataset]
// [END automl_vision_object_detection_get_dataset]
console.log(
`Text extraction dataset metadata: ${response.textExtractionDatasetMetadata}`
);
// [END automl_language_entity_extraction_get_dataset]

// [START automl_language_sentiment_analysis_get_dataset]
console.log(
`Text sentiment dataset metadata: ${response.textSentimentDatasetMetadata}`
);
// [END automl_language_sentiment_analysis_get_dataset]

// [START automl_language_text_classification_get_dataset]
console.log(
`Text classification dataset metadata: ${response.textClassificationDatasetMetadata}`
);
// [END automl_language_text_classification_get_dataset]

// [START automl_translate_get_dataset]
if (response.translationDatasetMetadata !== undefined) {
console.log('Translation dataset metadata:');
console.log(
Expand All @@ -88,7 +75,6 @@ function main(
`\tTarget language code: ${response.translationDatasetMetadata.targetLanguageCode}`
);
}
// [END automl_translate_get_dataset]

// [START automl_vision_classification_get_dataset]
console.log(
Expand All @@ -100,18 +86,10 @@ function main(
console.log(
`Image object detection dataset metatdata: ${response.imageObjectDetectionDatasetMetatdata}`
);
// [START automl_language_entity_extraction_get_dataset]
// [START automl_language_sentiment_analysis_get_dataset]
// [START automl_language_text_classification_get_dataset]
// [START automl_translate_get_dataset]
// [START automl_vision_classification_get_dataset]
}

getDataset();
// [END automl_language_entity_extraction_get_dataset]
// [END automl_language_sentiment_analysis_get_dataset]
// [END automl_language_text_classification_get_dataset]
// [END automl_translate_get_dataset]
// [END automl_vision_classification_get_dataset]
// [END automl_vision_object_detection_get_dataset]
}
Expand Down
10 changes: 0 additions & 10 deletions automl/list_datasets.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
'use strict';

function main(projectId = 'YOUR_PROJECT_ID', location = 'us-central1') {
// [START automl_language_entity_extraction_list_datasets]
// [START automl_language_sentiment_analysis_list_datasets]
// [START automl_language_text_classification_list_datasets]
// [START automl_translate_list_datasets]
// [START automl_vision_classification_list_datasets]
Expand Down Expand Up @@ -54,21 +52,17 @@ function main(projectId = 'YOUR_PROJECT_ID', location = 'us-central1') {
console.log('Dataset create time');
console.log(`\tseconds ${dataset.createTime.seconds}`);
console.log(`\tnanos ${dataset.createTime.nanos / 1e9}`);
// [END automl_language_sentiment_analysis_list_datasets]
// [END automl_language_text_classification_list_datasets]
// [END automl_translate_list_datasets]
// [END automl_vision_classification_list_datasets]
// [END automl_vision_object_detection_list_datasets]
console.log(
`Text extraction dataset metadata: ${dataset.textExtractionDatasetMetadata}`
);
// [END automl_language_entity_extraction_list_datasets]

// [START automl_language_sentiment_analysis_list_datasets]
console.log(
`Text sentiment dataset metadata: ${dataset.textSentimentDatasetMetadata}`
);
// [END automl_language_sentiment_analysis_list_datasets]

// [START automl_language_text_classification_list_datasets]
console.log(
Expand Down Expand Up @@ -98,17 +92,13 @@ function main(projectId = 'YOUR_PROJECT_ID', location = 'us-central1') {
console.log(
`Image object detection dataset metatdata: ${dataset.imageObjectDetectionDatasetMetatdata}`
);
// [START automl_language_entity_extraction_list_datasets]
// [START automl_language_sentiment_analysis_list_datasets]
// [START automl_language_text_classification_list_datasets]
// [START automl_translate_list_datasets]
// [START automl_vision_classification_list_datasets]
}
}

listDatasets();
// [END automl_language_entity_extraction_list_datasets]
// [END automl_language_sentiment_analysis_list_datasets]
// [END automl_language_text_classification_list_datasets]
// [END automl_translate_list_datasets]
// [END automl_vision_classification_list_datasets]
Expand Down

0 comments on commit b8cbcf7

Please sign in to comment.