{"record":{"id":"0aa4927bc4464abb","repo":"tensorflow/models","slug":"choose-to-apply-one-of-data-augmentation-policies","errorCode":null,"errorMessage":"Choose to apply one of data augmentation policies: randaug and autoaug.","messagePattern":"Choose to apply one of data augmentation policies: randaug and autoaug\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/projects/videoglue/datasets/common/utils.py","lineNumber":497,"sourceCode":"      else:\n        def resize_and_crop_fn(x, state=None):\n          return processors.resize_and_crop(\n              x,\n              min_resize=min_resize,\n              crop_size=crop_size,\n              is_flow=False,\n              is_random=False,\n              state=state)\n        preprocessor_builder.add_fn(\n            fn=resize_and_crop_fn,\n            feature_name=output_feature_name,\n            fn_name='{}_resize_central_crop'.format(output_feature_name),\n            stateful=sync_random_state)\n\n  # Apply extra augmentation policy.\n  if is_training:\n    if randaug_params is not None and autoaug_params is not None:\n      raise ValueError('Choose to apply one of data augmentation policies: '\n                       'randaug and autoaug.')\n\n    if autoaug_params is not None:\n      augmenter = augment.AutoAugment(\n          augmentation_name=autoaug_params['augmentation_name'],\n          cutout_const=autoaug_params['cutout_const'],\n          translate_const=autoaug_params['translate_const'])\n      preprocessor_builder.add_fn(\n          fn=augmenter.distort,\n          feature_name=output_feature_name,\n          fn_name='{}_autoaug'.format(output_feature_name))\n\n    if randaug_params is not None:\n      augmenter = augment.RandAugment(\n          num_layers=randaug_params['num_layers'],\n          magnitude=randaug_params['magnitude'],\n          cutout_const=randaug_params['cutout_const'],\n          translate_const=randaug_params['translate_const'],","sourceCodeStart":479,"sourceCodeEnd":515,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/projects/videoglue/datasets/common/utils.py#L479-L515","documentation":"Error \"Choose to apply one of data augmentation policies: randaug and autoaug.\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/projects/videoglue/datasets/common/utils.py:497 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e006f5f0d534913e49c1f1dae87364039fa607e2","analyzedAt":"2026-08-24T14:09:15.576Z","schemaVersion":2},"datasetVersion":"2026-08-24T17:17:21.512Z"}