tensorflow/models · error · RuntimeError
Task sampler type not supported
Error message
Task sampler type not supported
What it means
Error "Task sampler type not supported" thrown in tensorflow/models.
Source
Thrown at official/modeling/multitask/task_sampler.py:128
return tf.math.cumsum(dynamic_task_distribution)
def get_task_sampler(config: configs.TaskSamplingConfig,
task_weights: Dict[Text, float]) -> TaskSampler:
"""Utils to create task sampler with configuration and task weights."""
oneof_config = config.get()
if config.type == 'uniform':
return UniformTaskSampler(task_weights=task_weights)
elif config.type == 'proportional':
return ProportionalTaskSampler(
task_weights=task_weights, alpha=oneof_config.alpha)
elif config.type == 'annealing':
return AnnealingTaskSampler(
task_weights=task_weights,
steps_per_epoch=oneof_config.steps_per_epoch,
total_steps=oneof_config.total_steps)
else:
raise RuntimeError('Task sampler type not supported')
View on GitHub (pinned to e006f5f0d5)
When it happens
Trigger: Thrown at official/modeling/multitask/task_sampler.py:128 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of tensorflow/models@e006f5f0d5 (2026-08-24).
Data as JSON: /api/errors/3ce434a43c1433a3.
Report an issue: GitHub.