in notebooks/notebook_template_review.py [0:0]
def validate(self, notebook: Notebook, text: List[str]) -> bool:
"""
Check the text for branding issues
1. Product branding names
2. No future tense
3. No 1st person
"""
ret = True
branding = {
'Vertex SDK': 'Vertex AI SDK',
'Vertex Training': 'Vertex AI Training',
'Vertex Prediction': 'Vertex AI Prediction',
'Vertex Batch Prediction': 'Vertex AI batch prediction',
'Vertex XAI': 'Vertex Explainable AI',
'Vertex Explainability': 'Vertex Explainable AI',
'Vertex AI Explainability': 'Vertex Explainable AI',
'Vertex Pipelines': 'Vertex AI Pipelines',
'Vertex Experiments': 'Vertex AI Experiments',
'Vertex TensorBoard': 'Vertex AI TensorBoard',
'Vertex Hyperparameter Tuning': 'Vertex AI hyperparameter tuning',
'Vertex Metadata': 'Vertex ML Metadata',
'Vertex AI Metadata': 'Vertex ML Metadata',
'Vertex AI ML Metadata': 'Vertex ML Metadata',
'Vertex Vizier': 'Vertex AI Vizier',
'Vertex Feature Store': 'Vertex AI Feature Store',
'Vertex Forecasting': 'Vertex AI forecasting',
'Vertex Vector Search': 'Vertex AI Vector Search',
'Vertex Dataset': 'Vertex AI dataset',
'Vertex Model': 'Vertex AI model',
'Vertex Endpoint': 'Vertex AI endpoint',
'Vertex Private Endpoint': 'Vertex AI private endpoint',
'Automl': 'AutoML',
'AutoML Image': 'AutoML Vision',
'AutoML Language': 'AutoML Natural Language',
'Tensorflow': 'TensorFlow',
'Tensorboard': 'Vertex AI TensorBoard',
'Google Cloud Notebooks': 'Vertex AI Workbench Notebooks',
'BQ ': 'BigQuery',
'BQ.': 'BigQuery',
'Bigquery': 'BigQuery',
'Big Query': 'BigQuery',
'BQML': 'BigQuery ML',
'GCS ': 'Cloud Storage',
'GCS.': 'Cloud Storage',
'Google Cloud Storage': 'Cloud Storage',
'Pytorch': 'PyTorch',
'Sklearn': 'scikit-learn',
'sklearn': 'scikit-learn'
}
for line in text:
for mistake, brand in branding.items():
if mistake in line:
ret = notebook.report_error(ErrorCode.ERROR_TWRULE_BRANDING, f"Branding {mistake} -> {brand}: {line}")
return ret