{"record":{"id":"dde80053a7d87a8a","repo":"xai-org/x-algorithm","slug":"simclusters-model-version-not-supported-modelver","errorCode":null,"errorMessage":"SimClusters model version not supported ${modelVersion.name}","messagePattern":"SimClusters model version not supported (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"simclusters/simclusters_v2/scalding/embedding/LocaleEntitySimClustersEmbeddingsJob.scala","lineNumber":94,"sourceCode":"    uniqueID: UniqueID\n  ): Execution[Unit] = {\n\n    val jobConfig = EntityEmbeddingsJobConfig(args, isAdhoc = true)\n\n    val numReducers = args.getOrElse(\"m\", \"2000\").toInt\n\n    val userEntityMatrix: TypedPipe[(UserId, (Entity, Double))] =\n      getUserEntityMatrix(\n        jobConfig,\n        DataSources.entityRealGraphAggregationDataSetSource(dateRange.embiggen(Days(7))),\n        Some(ExternalDataSources.uttEntitiesSource())\n      ).forceToDisk\n\n    val simClustersSource = jobConfig.modelVersion match {\n      case ModelVersion.Model20m145kUpdated =>\n        InterestedInSources.simClustersInterestedInUpdatedSource(dateRange, timeZone)\n      case modelVersion =>\n        throw new IllegalArgumentException(\n          s\"SimClusters model version not supported ${modelVersion.name}\")\n    }\n\n    val entityPerLanguage = userEntityMatrix.join(ExternalDataSources.userSource).map {\n      case (userId, ((entity, score), (_, language))) =>\n        ((entity, language), (userId, score))\n    }\n\n    val normalizedUserEntityMatrix =\n      getNormalizedTransposeInputMatrix(entityPerLanguage, numReducers = Some(numReducers))\n\n    val embeddings = computeEmbeddings[(Entity, String)](\n      simClustersSource,\n      normalizedUserEntityMatrix,\n      scoreExtractors,\n      ModelVersion.Model20m145kUpdated,\n      toSimClustersEmbeddingId(jobConfig.modelVersion),\n      numReducers = Some(numReducers * 2)","sourceCodeStart":76,"sourceCodeEnd":112,"githubUrl":"https://github.com/xai-org/x-algorithm/blob/24c60942c5c5fdad3a6addffb4c6e6d2f228f04f/simclusters/simclusters_v2/scalding/embedding/LocaleEntitySimClustersEmbeddingsJob.scala#L76-L112","documentation":"LocaleEntitySimClustersEmbeddingsJob only supports the Model20m145kUpdated SimClusters model version when selecting the simClustersInterestedIn source. Any other modelVersion falls into the catch-all case and this IllegalArgumentException is thrown at job-graph construction time.","triggerScenarios":"Running the job (or its scheduled execution) with jobConfig.modelVersion set to a version other than ModelVersion.Model20m145kUpdated, e.g. Model20m145kDec11 for locale embeddings.","commonSituations":"Upgrading the job to a new model version without adding a source branch; copying job args from another job that uses a different model; defaulting to the newest model version in shared config.","solutions":["Set the model version arg to Model20m145kUpdated for this job","If a new version must be supported, add a case in the match calling the corresponding InterestedInSources source","Centralize supported-version checks in job config parsing so failures happen early with a clearer message"],"exampleFix":"// before\ncase modelVersion =>\n  throw new IllegalArgumentException(\n    s\"SimClusters model version not supported ${modelVersion.name}\")\n\n// after\n// add the new supported branch\ncase ModelVersion.Model20m145kDec11 =>\n  InterestedInSources.simClustersInterestedInDec11Source(dateRange, timeZone)","handlingStrategy":"validation","validationCode":"require(jobConfig.modelVersion == ModelVersion.Model20m145kUpdated,\n  s\"Unsupported model version ${jobConfig.modelVersion.name} for LocaleEntitySimClustersEmbeddingsJob\")","typeGuard":"def isSupportedModel(v: ModelVersion): Boolean = v == ModelVersion.Model20m145kUpdated","tryCatchPattern":null,"preventionTips":["Assert the model version against the job's supported set in a pre-flight check","Keep a per-job allowlist of model versions in config rather than passing raw versions"],"tags":["scala","simclusters","model-version","invalid-argument"],"backgroundTag":"unsupported-model-version","analyzedSha":"24c60942c5c5fdad3a6addffb4c6e6d2f228f04f","analyzedAt":"2026-08-28T11:40:14.686Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}