{"record":{"id":"dc2e92645e6f4a88","repo":"tensorflow/models","slug":"strategy-should-not-be-none-you-need-to-specify","errorCode":null,"errorMessage":"`strategy` should not be None. You need to specify `strategy_type` in the builder contructor or directly set the `strategy` property of the builder.","messagePattern":"`strategy` should not be None\\. You need to specify `strategy_type` in the builder contructor or directly set the `strategy` property of the builder\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/legacy/detection/executor/distributed_executor.py:803","lineNumber":803,"sourceCode":"    if self._strategy is None:\n      raise ValueError('`strategy` should not be None. You need to specify '\n                       '`strategy_type` in the builder contructor or directly '\n                       'set the `strategy` property of the builder.')","sourceCodeStart":null,"sourceCodeEnd":null,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/legaacy/detection/executor/distributed_executor.py#L803","documentation":"State guard in the runtime builder: build/ distribution was requested but self._strategy is still None — neither a strategy_type was given to the constructor nor was the strategy property set directly. The builder cannot fall back to a default strategy and so refuses to proceed.","triggerScenarios":"Thrown at official/legaacy/detection/executor/distributed_executor.py:803 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass strategy_type (e.g. 'tpu' or 'multi_gpu') to the builder constructor","Or set builder.strategy = <tf.distribute strategy instance> before calling build/ distribute"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e006f5f0d534913e49c1f1dae87364039fa607e2","analyzedAt":"2026-08-24T14:09:15.576Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}