{"record":{"id":"3ce434a43c1433a3","repo":"tensorflow/models","slug":"task-sampler-type-not-supported","errorCode":null,"errorMessage":"Task sampler type not supported","messagePattern":"Task sampler type not supported","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"official/modeling/multitask/task_sampler.py","lineNumber":128,"sourceCode":"    return tf.math.cumsum(dynamic_task_distribution)\n\n\ndef get_task_sampler(config: configs.TaskSamplingConfig,\n                     task_weights: Dict[Text, float]) -> TaskSampler:\n  \"\"\"Utils to create task sampler with configuration and task weights.\"\"\"\n  oneof_config = config.get()\n  if config.type == 'uniform':\n    return UniformTaskSampler(task_weights=task_weights)\n  elif config.type == 'proportional':\n    return ProportionalTaskSampler(\n        task_weights=task_weights, alpha=oneof_config.alpha)\n  elif config.type == 'annealing':\n    return AnnealingTaskSampler(\n        task_weights=task_weights,\n        steps_per_epoch=oneof_config.steps_per_epoch,\n        total_steps=oneof_config.total_steps)\n  else:\n    raise RuntimeError('Task sampler type not supported')\n","sourceCodeStart":110,"sourceCodeEnd":129,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/modeling/multitask/task_sampler.py#L110-L129","documentation":"Error \"Task sampler type not supported\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/modeling/multitask/task_sampler.py:128 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"}