{"$schema":"https://json.schemastore.org/sarif-2.1.0.json","version":"2.1.0","runs":[{"tool":{"driver":{"name":"codehealth","informationUri":"https://codehealth.canine.dev","rules":[{"id":"D1","name":"Cyclomatic Complexity","shortDescription":{"text":"Cyclomatic Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D1"},{"id":"D2","name":"Cognitive Complexity","shortDescription":{"text":"Cognitive Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D2"},{"id":"D3","name":"God Classes","shortDescription":{"text":"God Classes"},"helpUri":"https://codehealth.canine.dev/dimensions/D3"},{"id":"D4","name":"Code Duplication","shortDescription":{"text":"Code Duplication"},"helpUri":"https://codehealth.canine.dev/dimensions/D4"},{"id":"D5","name":"Coupling","shortDescription":{"text":"Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D5"},{"id":"D6","name":"Cohesion (LCOM4)","shortDescription":{"text":"Cohesion (LCOM4)"},"helpUri":"https://codehealth.canine.dev/dimensions/D6"},{"id":"D9","name":"Test Distribution","shortDescription":{"text":"Test Distribution"},"helpUri":"https://codehealth.canine.dev/dimensions/D9"},{"id":"D11","name":"Test Reliability","shortDescription":{"text":"Test Reliability"},"helpUri":"https://codehealth.canine.dev/dimensions/D11"},{"id":"D12","name":"Dependency Hygiene","shortDescription":{"text":"Dependency Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/D12"},{"id":"D13","name":"Secret Scanning","shortDescription":{"text":"Secret Scanning"},"helpUri":"https://codehealth.canine.dev/dimensions/D13","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D14","name":"License Compliance","shortDescription":{"text":"License Compliance"},"helpUri":"https://codehealth.canine.dev/dimensions/D14"},{"id":"D15","name":"Churn \u00D7 Complexity Hotspots","shortDescription":{"text":"Churn \u00D7 Complexity Hotspots"},"helpUri":"https://codehealth.canine.dev/dimensions/D15"},{"id":"D16","name":"Bus Factor","shortDescription":{"text":"Bus Factor"},"helpUri":"https://codehealth.canine.dev/dimensions/D16"},{"id":"D17","name":"Explicit Debt","shortDescription":{"text":"Explicit Debt"},"helpUri":"https://codehealth.canine.dev/dimensions/D17"},{"id":"D19","name":"Documentation Quality","shortDescription":{"text":"Documentation Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D19"},{"id":"D20","name":"ADR Quality","shortDescription":{"text":"ADR Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D20"},{"id":"D26","name":"Project Cohesion","shortDescription":{"text":"Project Cohesion"},"helpUri":"https://codehealth.canine.dev/dimensions/D26"},{"id":"D28","name":"Secrets (history)","shortDescription":{"text":"Secrets (history)"},"helpUri":"https://codehealth.canine.dev/dimensions/D28","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D29","name":"Static Analysis (SAST)","shortDescription":{"text":"Static Analysis (SAST)"},"helpUri":"https://codehealth.canine.dev/dimensions/D29","relationships":[{"target":{"id":"CWE-79","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-94","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-77","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-79","CWE-89","CWE-78","CWE-94","CWE-77"],"owasp":"A05:2025"}},{"id":"D30","name":"Dependency Vulnerabilities","shortDescription":{"text":"Dependency Vulnerabilities"},"helpUri":"https://codehealth.canine.dev/dimensions/D30","relationships":[{"target":{"id":"CWE-1395","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-937","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1395","CWE-937"],"owasp":"A03:2025"}},{"id":"D31","name":"IaC \u0026 Container Security","shortDescription":{"text":"IaC \u0026 Container Security"},"helpUri":"https://codehealth.canine.dev/dimensions/D31","relationships":[{"target":{"id":"CWE-1032","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-732","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-16","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A02:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1032","CWE-732","CWE-16"],"owasp":"A02:2025"}},{"id":"D34","name":"Knowledge Freshness","shortDescription":{"text":"Knowledge Freshness"},"helpUri":"https://codehealth.canine.dev/dimensions/D34"},{"id":"D35","name":"Change Coupling","shortDescription":{"text":"Change Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D35"},{"id":"D36","name":"Supply-chain Provenance \u0026 Signing","shortDescription":{"text":"Supply-chain Provenance \u0026 Signing"},"helpUri":"https://codehealth.canine.dev/dimensions/D36","relationships":[{"target":{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-494","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1357","CWE-494"],"owasp":"A03:2025"}},{"id":"D43","name":"Malicious Dependencies","shortDescription":{"text":"Malicious Dependencies"},"helpUri":"https://codehealth.canine.dev/dimensions/D43","relationships":[{"target":{"id":"CWE-506","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-506"],"owasp":"A08:2025"}},{"id":"D44","name":"Platform End-of-Life","shortDescription":{"text":"Platform End-of-Life"},"helpUri":"https://codehealth.canine.dev/dimensions/D44"},{"id":"AX10","name":"Code composition","shortDescription":{"text":"Code composition"},"helpUri":"https://codehealth.canine.dev/dimensions/AX10"},{"id":"AX2","name":"Stateful singletons","shortDescription":{"text":"Stateful singletons"},"helpUri":"https://codehealth.canine.dev/dimensions/AX2"},{"id":"AX3","name":"Project dependency cycles","shortDescription":{"text":"Project dependency cycles"},"helpUri":"https://codehealth.canine.dev/dimensions/AX3"},{"id":"AX4","name":"Dependency direction","shortDescription":{"text":"Dependency direction"},"helpUri":"https://codehealth.canine.dev/dimensions/AX4"},{"id":"AXB2","name":"Runtime readiness","shortDescription":{"text":"Runtime readiness"},"helpUri":"https://codehealth.canine.dev/dimensions/AXB2"},{"id":"C2","name":"Access Controls","shortDescription":{"text":"Access Controls"},"helpUri":"https://codehealth.canine.dev/dimensions/C2"},{"id":"ED5","name":"Idempotency","shortDescription":{"text":"Idempotency"},"helpUri":"https://codehealth.canine.dev/dimensions/ED5"},{"id":"M1","name":"Documentation (README)","shortDescription":{"text":"Documentation (README)"},"helpUri":"https://codehealth.canine.dev/dimensions/M1"},{"id":"M2","name":"Architecture documentation","shortDescription":{"text":"Architecture documentation"},"helpUri":"https://codehealth.canine.dev/dimensions/M2"},{"id":"M3","name":"Folder \u0026 project structure","shortDescription":{"text":"Folder \u0026 project structure"},"helpUri":"https://codehealth.canine.dev/dimensions/M3"},{"id":"M4","name":"Documentation accuracy","shortDescription":{"text":"Documentation accuracy"},"helpUri":"https://codehealth.canine.dev/dimensions/M4"},{"id":"P1","name":"CI/CD gates","shortDescription":{"text":"CI/CD gates"},"helpUri":"https://codehealth.canine.dev/dimensions/P1"},{"id":"P10","name":"Library API \u0026 versioning","shortDescription":{"text":"Library API \u0026 versioning"},"helpUri":"https://codehealth.canine.dev/dimensions/P10"},{"id":"P12","name":"CI test-gate honesty","shortDescription":{"text":"CI test-gate honesty"},"helpUri":"https://codehealth.canine.dev/dimensions/P12"},{"id":"P2","name":"Observability","shortDescription":{"text":"Observability"},"helpUri":"https://codehealth.canine.dev/dimensions/P2"},{"id":"P3","name":"Security \u0026 performance tooling","shortDescription":{"text":"Security \u0026 performance tooling"},"helpUri":"https://codehealth.canine.dev/dimensions/P3"},{"id":"P4","name":"Deployment \u0026 Rollback","shortDescription":{"text":"Deployment \u0026 Rollback"},"helpUri":"https://codehealth.canine.dev/dimensions/P4"},{"id":"P6","name":"Release Hygiene","shortDescription":{"text":"Release Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/P6"},{"id":"P7","name":"Outbound HTTP resilience","shortDescription":{"text":"Outbound HTTP resilience"},"helpUri":"https://codehealth.canine.dev/dimensions/P7"},{"id":"PF3","name":"Async \u0026 latency hygiene","shortDescription":{"text":"Async \u0026 latency hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/PF3"},{"id":"X1","name":"Async correctness","shortDescription":{"text":"Async correctness"},"helpUri":"https://codehealth.canine.dev/dimensions/X1"},{"id":"X10","name":"Duplicated predicate","shortDescription":{"text":"Duplicated predicate"},"helpUri":"https://codehealth.canine.dev/dimensions/X10"},{"id":"X12","name":"Unreachable branch","shortDescription":{"text":"Unreachable branch"},"helpUri":"https://codehealth.canine.dev/dimensions/X12"},{"id":"X13","name":"Undrained process stream","shortDescription":{"text":"Undrained process stream"},"helpUri":"https://codehealth.canine.dev/dimensions/X13"},{"id":"X14","name":"Bypassable address classification","shortDescription":{"text":"Bypassable address classification"},"helpUri":"https://codehealth.canine.dev/dimensions/X14"},{"id":"X15","name":"Unvalidated length from an untrusted reader","shortDescription":{"text":"Unvalidated length from an untrusted reader"},"helpUri":"https://codehealth.canine.dev/dimensions/X15"},{"id":"X17","name":"Uncapped recursion over a caller-supplied document","shortDescription":{"text":"Uncapped recursion over a caller-supplied document"},"helpUri":"https://codehealth.canine.dev/dimensions/X17"},{"id":"X19","name":"Unrestored process-global state","shortDescription":{"text":"Unrestored process-global state"},"helpUri":"https://codehealth.canine.dev/dimensions/X19"},{"id":"X20","name":"Mistyped argument guard","shortDescription":{"text":"Mistyped argument guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X20"},{"id":"X21","name":"Side-effecting pattern guard","shortDescription":{"text":"Side-effecting pattern guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X21"},{"id":"X22","name":"Contradicted release guard","shortDescription":{"text":"Contradicted release guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X22"},{"id":"X23","name":"Unguarded diagnostic materialisation","shortDescription":{"text":"Unguarded diagnostic materialisation"},"helpUri":"https://codehealth.canine.dev/dimensions/X23"},{"id":"X24","name":"Document value interpolated into markup unescaped","shortDescription":{"text":"Document value interpolated into markup unescaped"},"helpUri":"https://codehealth.canine.dev/dimensions/X24"},{"id":"X25","name":"Inert configuration knob","shortDescription":{"text":"Inert configuration knob"},"helpUri":"https://codehealth.canine.dev/dimensions/X25"},{"id":"X26","name":"Unsynchronised callback handoff","shortDescription":{"text":"Unsynchronised callback handoff"},"helpUri":"https://codehealth.canine.dev/dimensions/X26"},{"id":"X27","name":"Collection changed while being enumerated","shortDescription":{"text":"Collection changed while being enumerated"},"helpUri":"https://codehealth.canine.dev/dimensions/X27"},{"id":"X28","name":"Index access outside its own emptiness guard","shortDescription":{"text":"Index access outside its own emptiness guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X28"},{"id":"X3","name":"Exception handling","shortDescription":{"text":"Exception handling"},"helpUri":"https://codehealth.canine.dev/dimensions/X3"},{"id":"X30","name":"Support guard that admits what it rejects","shortDescription":{"text":"Support guard that admits what it rejects"},"helpUri":"https://codehealth.canine.dev/dimensions/X30"},{"id":"X32","name":"Type resolved by simple name across every loaded assembly","shortDescription":{"text":"Type resolved by simple name across every loaded assembly"},"helpUri":"https://codehealth.canine.dev/dimensions/X32"},{"id":"X4","name":"Structured logging","shortDescription":{"text":"Structured logging"},"helpUri":"https://codehealth.canine.dev/dimensions/X4"},{"id":"X6","name":"Hand-rolled structured-format parsing","shortDescription":{"text":"Hand-rolled structured-format parsing"},"helpUri":"https://codehealth.canine.dev/dimensions/X6"},{"id":"X7","name":"Silent fallback defaults","shortDescription":{"text":"Silent fallback defaults"},"helpUri":"https://codehealth.canine.dev/dimensions/X7"},{"id":"X9","name":"Subsumed condition operand","shortDescription":{"text":"Subsumed condition operand"},"helpUri":"https://codehealth.canine.dev/dimensions/X9"}]}},"results":[{"ruleId":"D1","level":"warning","message":{"text":"LlamaPipelineForwards.llama_model_forward (cyclomatic 61): LlamaPipelineForwards.llama_model_forward has cyclomatic complexity 61 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_llama_tf5.py"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"8dacff9edf964d16faa5a3de893a65f571287bcab02e96ec7267d67169028186"}},{"ruleId":"D1","level":"warning","message":{"text":"PipelineGraph.try_v_schedule (cyclomatic 60): PipelineGraph.try_v_schedule has cyclomatic complexity 60 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/pipeline/schedule/v_schedule.py"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"339a66d4e9259ad0f0c43cb85295f590ce66982cd288f2bbbbb6e4b798559436"}},{"ruleId":"D1","level":"warning","message":{"text":"LlamaPipelineForwards.llama_model_forward (cyclomatic 60): LlamaPipelineForwards.llama_model_forward has cyclomatic complexity 60 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_llama_tf4.py"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6f126778fdb299e03749769024d5e35d4bb9688793aab26212c9708290404fb"}},{"ruleId":"D1","level":"warning","message":{"text":"GPT2PipelineForwards.gpt2_model_forward (cyclomatic 57): GPT2PipelineForwards.gpt2_model_forward has cyclomatic complexity 57 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/gpt2.py"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c383d18c1d2cb4e667168bbac811b4d2b01a0522892a518c2fd95313c76a66a"}},{"ruleId":"D1","level":"warning","message":{"text":"BertPipelineForwards.bert_model_forward (cyclomatic 56): BertPipelineForwards.bert_model_forward has cyclomatic complexity 56 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"9fd114a958bc328d782d2181566d325883e42c0ff9266f0cd66344123a80d02f"}},{"ruleId":"D1","level":"warning","message":{"text":"OPTPipelineForwards.opt_model_forward (cyclomatic 55): OPTPipelineForwards.opt_model_forward has cyclomatic complexity 55 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/opt.py"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"139d2b5eb4c7bcd86bdeb2148f118f2f0259f5a3b419ddbc92b69c25ad6cc0e5"}},{"ruleId":"D1","level":"warning","message":{"text":"train.train (cyclomatic 54): train.train has cyclomatic complexity 54 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/train.py"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e6f51e6e572fe48db910b2be16000ce360a13ee0aa65f3c878bee2ecfe5f058"}},{"ruleId":"D1","level":"warning","message":{"text":"Qwen2PipelineForwards.qwen2_model_forward (cyclomatic 51): Qwen2PipelineForwards.qwen2_model_forward has cyclomatic complexity 51 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen2_tf4.py"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"91d99a1bd22ee58cabbd101a0a2d921b06c19a62853fa1bdbd0a26e20a9df00a"}},{"ruleId":"D1","level":"warning","message":{"text":"Qwen3PipelineForwards.qwen3_model_forward (cyclomatic 51): Qwen3PipelineForwards.qwen3_model_forward has cyclomatic complexity 51 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen3_tf4.py"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"69742efab07ad4a743348ce899fb6d5c56a239d3ace61360856d832878290611"}},{"ruleId":"D1","level":"warning","message":{"text":"pretrained.new_from_pretrained (cyclomatic 50): pretrained.new_from_pretrained has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/lazy/pretrained.py"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"75f8236a85cd4fe094a36c36bd96f44cf4cce0bf3a7fe6fd7c7aa5c2997fedec"}},{"ruleId":"D1","level":"warning","message":{"text":"BertPipelineForwards.bert_model_forward (cyclomatic 50): BertPipelineForwards.bert_model_forward has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf5.py"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"b83160be1c476559826209756bc71959bca18ec041e7a17bb498f576e7fe3804"}},{"ruleId":"D1","level":"warning","message":{"text":"CommandPipelineForwards.command_model_forward (cyclomatic 49): CommandPipelineForwards.command_model_forward has cyclomatic complexity 49 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/command.py"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"baf33890878f9861a83d0cd0d0ad4bfa0900c78af5482edb41a87c68627de86a"}},{"ruleId":"D1","level":"warning","message":{"text":"BloomPipelineForwards.bloom_model_forward (cyclomatic 47): BloomPipelineForwards.bloom_model_forward has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/bloom.py"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bdb72a9f6b4755183b980553c4c072875a04a6375fc7306fa930c9fe3ed425b"}},{"ruleId":"D1","level":"warning","message":{"text":"MixtralPipelineForwards.mixtral_model_forward (cyclomatic 46): MixtralPipelineForwards.mixtral_model_forward has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_mixtral_tf4.py"},"region":{"startLine":183}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac1d730daf9ce64ef27d769a5fc9d6e80a7f1079f6576b966983fcc608c92add"}},{"ruleId":"D1","level":"warning","message":{"text":"initialize.initialize (cyclomatic 44): initialize.initialize has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/initialize.py"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"32e3988119941b5948de21ece515ba563881a6cf13be6230739deff9a665c426"}},{"ruleId":"D1","level":"warning","message":{"text":"WhisperPipelineForwards.whisper_decoder_forward (cyclomatic 44): WhisperPipelineForwards.whisper_decoder_forward has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_whisper_tf4.py"},"region":{"startLine":601}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc5c9677d580729ad5af72a050a7df6735af27f0f377938d34d8a8fba846b7d9"}},{"ruleId":"D1","level":"warning","message":{"text":"ChatGLMPipelineForwards.chatglm_model_forward (cyclomatic 44): ChatGLMPipelineForwards.chatglm_model_forward has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/chatglm2.py"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e75b6dce9412a67b2589b362b3c8f760b6e081f48cd630097064d6b518332af"}},{"ruleId":"D1","level":"warning","message":{"text":"T5PipelineForwards.t5_stack_forward (cyclomatic 43): T5PipelineForwards.t5_stack_forward has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/t5.py"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9ea8ad785ff8c3925c0d00acf3541a9bf08933ae038effd337a8b621413f6ba"}},{"ruleId":"D1","level":"warning","message":{"text":"TraceIndice.trace_indice (cyclomatic 42): TraceIndice.trace_indice has cyclomatic complexity 42 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/autochunk/trace_indice.py"},"region":{"startLine":838}}}],"partialFingerprints":{"codehealthFindingId/v1":"f148934258cebf0685f319e137343d682df9ca8858936c3dd038dfca4492a136"}},{"ruleId":"D1","level":"warning","message":{"text":"InterleavedPipelineSchedule.forward_backward_step (cyclomatic 42): InterleavedPipelineSchedule.forward_backward_step has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/engine/schedule/_pipeline_schedule.py"},"region":{"startLine":560}}}],"partialFingerprints":{"codehealthFindingId/v1":"06406108147e0582eaf6d849e23c71f255cb88e01e054877f6b53a91a9a2c1d1"}},{"ruleId":"D1","level":"warning","message":{"text":"Solver._call_solver_serialized_args (cyclomatic 41): Solver._call_solver_serialized_args has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/solver/solver.py"},"region":{"startLine":211}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd15b8b9dfea8cceb89adc5f66ef8bad141eabfc1440a54ed1e01a2902fcbfc9"}},{"ruleId":"D1","level":"warning","message":{"text":"GRPOConsumer.step (cyclomatic 39): GRPOConsumer.step has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/grpo_consumer.py"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"cac09778cca187ae52fac2aab0ede07b2c566c39345dd533b4e5f662521771da"}},{"ruleId":"D1","level":"warning","message":{"text":"BaseProducer.loop (cyclomatic 39): BaseProducer.loop has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/zero_bubble/producer.py"},"region":{"startLine":212}}}],"partialFingerprints":{"codehealthFindingId/v1":"e689f04e772b0ceb5dc44bfb8f59b4611aa64fe96bceea2fc7f7d876c5d028d8"}},{"ruleId":"D1","level":"warning","message":{"text":"MixtralPipelineForwards.mixtral_model_forward (cyclomatic 39): MixtralPipelineForwards.mixtral_model_forward has cyclomatic complexity 39 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_mixtral_tf5.py"},"region":{"startLine":528}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fc0fd52b69373907a36da23910927d4e108ebbdedaf28400536f2ca77381be3"}},{"ruleId":"D1","level":"warning","message":{"text":"BaseProducer.loop (cyclomatic 38): BaseProducer.loop has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/producer.py"},"region":{"startLine":218}}}],"partialFingerprints":{"codehealthFindingId/v1":"1492811976a9064967907db1e5667d428d17fc2f0efa6acb9bdb285d8abae776"}},{"ruleId":"D1","level":"warning","message":{"text":"OpenMoePipelineForwards.openmoe_model_forward (cyclomatic 38): OpenMoePipelineForwards.openmoe_model_forward has cyclomatic complexity 38 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/openmoe/model/openmoe_policy.py"},"region":{"startLine":231}}}],"partialFingerprints":{"codehealthFindingId/v1":"79599199995a3426fc2c4ea3a1f92d35c26ac1bdb131a9103fff767123cd2a01"}},{"ruleId":"D1","level":"warning","message":{"text":"_deepseek_v3_tf4.deepseek_v3_model_forward (cyclomatic 38): _deepseek_v3_tf4.deepseek_v3_model_forward has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_deepseek_v3_tf4.py"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"18c960d3419f6919f31833255c1608f9781e4622634ea9b6afe14be1f250396c"}},{"ruleId":"D1","level":"warning","message":{"text":"DeepseekPipelineForwards.deepseek_model_forward (cyclomatic 38): DeepseekPipelineForwards.deepseek_model_forward has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/deepseek.py"},"region":{"startLine":286}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b6057ee8505d7e8474003aa1dcaf3de7c0bd89660a5f32a5870b3f161ad95b8"}},{"ruleId":"D1","level":"warning","message":{"text":"Qwen2PipelineForwards.qwen2_model_forward (cyclomatic 37): Qwen2PipelineForwards.qwen2_model_forward has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen2_tf5.py"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f86f5075f74c8e24b9d5d0005e07c6e8e61c9a9068b6508d716a47476e62ef6"}},{"ruleId":"D1","level":"warning","message":{"text":"Qwen3PipelineForwards.qwen3_model_forward (cyclomatic 37): Qwen3PipelineForwards.qwen3_model_forward has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen3_tf5.py"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"509fbc5c2fad366800bcf718c8a70b41bc078ae943f07241e1f35e8af357464f"}},{"ruleId":"D1","level":"warning","message":{"text":"BaseConsumer.loop (cyclomatic 36): BaseConsumer.loop has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/consumer.py"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b5de8af8abc9a4aed2156ffb82ee7686b5f1ac56a429437690cbc61c93e2901"}},{"ruleId":"D1","level":"warning","message":{"text":"MistralForwards.mistral_model_forward (cyclomatic 36): MistralForwards.mistral_model_forward has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/mistral.py"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ff0a5059964ca66d6f34e4672731143ed94113b9ed040acae1fef01d9da9b0e"}},{"ruleId":"D1","level":"warning","message":{"text":"BloomInferenceForwards.bloom_model_forward (cyclomatic 35): BloomInferenceForwards.bloom_model_forward has cyclomatic complexity 35 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/tensor_parallel/modeling/bloom.py"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ea84d27efefb4f35e29714d158fead3403b7a691aef33b54bd7f2f5666b9fd0"}},{"ruleId":"D1","level":"warning","message":{"text":"GRPOConsumer.step (cyclomatic 34): GRPOConsumer.step has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/zero_bubble/grpo_consumer.py"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"56fd7c9b57585119d1fce87c8a234386e9b5e8c58b0e0a2b8ed1a2cc0456f80e"}},{"ruleId":"D1","level":"warning","message":{"text":"FalconPipelineForwards.falcon_model_forward (cyclomatic 34): FalconPipelineForwards.falcon_model_forward has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/falcon.py"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"057b6703e825933dc25d61339d4b9ee861681a666f3229c2c483474d94250405"}},{"ruleId":"D1","level":"warning","message":{"text":"llama.llama_model_forward (cyclomatic 33): llama.llama_model_forward has cyclomatic complexity 33 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/quant/smoothquant/models/llama.py"},"region":{"startLine":559}}}],"partialFingerprints":{"codehealthFindingId/v1":"aab8ba8a599760827d62d62845307e66067cc78acb9d3f473b431bfbfe3f7046"}},{"ruleId":"D1","level":"warning","message":{"text":"PipelineGraph.get_v_schedule (cyclomatic 33): PipelineGraph.get_v_schedule has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/pipeline/schedule/v_schedule.py"},"region":{"startLine":318}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae2557312183495a56b275d8e81e9adf8518b9dac12a5cb30bef418d71b15ce4"}},{"ruleId":"D1","level":"warning","message":{"text":"GPTJPipelineForwards.gptj_model_forward (cyclomatic 33): GPTJPipelineForwards.gptj_model_forward has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/gptj.py"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2a9a184b5792a3095387c9e6e0a34be29478bfcfc461513d09cd85f89a9d290"}},{"ruleId":"D1","level":"warning","message":{"text":"pixart_alpha.pixart_alpha_forward (cyclomatic 32): pixart_alpha.pixart_alpha_forward has cyclomatic complexity 32 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/modeling/models/pixart_alpha.py"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8d27d2d5cb09355186d163ecaec9fab356122efc1eb62b2b6785ffa486fbbcf"}},{"ruleId":"D1","level":"warning","message":{"text":"OpenMoeModel.forward (cyclomatic 32): OpenMoeModel.forward has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/openmoe/model/modeling_openmoe.py"},"region":{"startLine":705}}}],"partialFingerprints":{"codehealthFindingId/v1":"0abccaefbf39f58726e0eb736f61aae6304e7c7e392a89fb9d6847703ea5c87c"}},{"ruleId":"D1","level":"warning","message":{"text":"WorkerBase._consume_work_item_by_phase (cyclomatic 32): WorkerBase._consume_work_item_by_phase has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/pipeline/rpc/_pipeline_base.py"},"region":{"startLine":804}}}],"partialFingerprints":{"codehealthFindingId/v1":"a75ba4c09c2d3989ba04b216e870dce5d5af1aab4002567e54e03745bcf08858"}},{"ruleId":"D1","level":"warning","message":{"text":"utils.get_lora_state_dict (cyclomatic 31): utils.get_lora_state_dict has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/utils.py"},"region":{"startLine":1049}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d113340f988a6f61f9ad8d74eaedf56f81900fc6de4df714a2f6fb46ef46f8e"}},{"ruleId":"D1","level":"warning","message":{"text":"split_module.split_module (cyclomatic 31): split_module.split_module has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/passes/split_module.py"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"967659168703a673d185dd5481629035a297f527d3b97fb2299fcd0e09fa7b48"}},{"ruleId":"D1","level":"warning","message":{"text":"p2p._send_recv_serialization_object (cyclomatic 31): p2p._send_recv_serialization_object has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/pipeline/p2p.py"},"region":{"startLine":273}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c39f5a05071e5fe26115bc5922545d93266098417cdd5b96f66b7d9110dd656"}},{"ruleId":"D1","level":"warning","message":{"text":"GeminiDDP._load_from_state_dict (cyclomatic 30): GeminiDDP._load_from_state_dict has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/gemini/gemini_ddp.py"},"region":{"startLine":644}}}],"partialFingerprints":{"codehealthFindingId/v1":"92eb33bd13adbe06ddeaf876e2f5fdad81f9f89797eb20be26122f19f61dadf0"}},{"ruleId":"D1","level":"warning","message":{"text":"CheckpointSolverRotor._annotate_from_sequence (cyclomatic 29): CheckpointSolverRotor._annotate_from_sequence has cyclomatic complexity 29 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/checkpoint/ckpt_solver_rotor.py"},"region":{"startLine":361}}}],"partialFingerprints":{"codehealthFindingId/v1":"d02f53df4435936b282302bf310a453341a0c67eb74b57fff3bd58432aef8ea3"}},{"ruleId":"D1","level":"warning","message":{"text":"BaseConsumer.loop (cyclomatic 28): BaseConsumer.loop has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/zero_bubble/consumer.py"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"05cd520d2fbbd6473b212c8cb83354dbc1b863e68d9b9fff940558f1240780c9"}},{"ruleId":"D1","level":"warning","message":{"text":"HybridParallelPlugin.__init__ (cyclomatic 28): HybridParallelPlugin.__init__ has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/plugin/hybrid_parallel_plugin.py"},"region":{"startLine":947}}}],"partialFingerprints":{"codehealthFindingId/v1":"9dfaf2d5abd1103602a88bd90427e2147b3149c7672b4d4807144857f265b976"}},{"ruleId":"D1","level":"warning","message":{"text":"activation_checkpoint_codegen.emit_code_with_activation_checkpoint (cyclomatic 28): activation_checkpoint_codegen.emit_code_with_activation_checkpoint has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/codegen/activation_checkpoint_codegen.py"},"region":{"startLine":490}}}],"partialFingerprints":{"codehealthFindingId/v1":"1776db19bbc57000c39c1a6c94a474b1dda061cf6610d1adf278a898d4247146"}},{"ruleId":"D1","level":"warning","message":{"text":"GeminiOptimizer.collect_states (cyclomatic 28): GeminiOptimizer.collect_states has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/gemini/gemini_optimizer.py"},"region":{"startLine":421}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2f99c0b4f3b64ecebd5b1f051d21da514f6417f10b7ad2b4ae4bcad33c678b5"}},{"ruleId":"D1","level":"warning","message":{"text":"RegionManager._linearize_graph (cyclomatic 27): RegionManager._linearize_graph has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/offload/region_manager.py"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a312301cbe4795d8bd5237e6d9038ce9d60507d39bdedc821177565721dc15b"}},{"ruleId":"D1","level":"warning","message":{"text":"common.clip_grad_norm_fp32 (cyclomatic 27): common.clip_grad_norm_fp32 has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/utils/common.py"},"region":{"startLine":254}}}],"partialFingerprints":{"codehealthFindingId/v1":"49ebd0c55b256708bed5af35b1566fb8067e500a498074729bdc9db054ba88cd"}},{"ruleId":"D1","level":"warning","message":{"text":"DistGaloreAdamW.step (cyclomatic 27): DistGaloreAdamW.step has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/distributed_galore.py"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f1929c839ae0fdb9fc6e21513e27a817c8d013dc31221f6162900144a06ad41"}},{"ruleId":"D1","level":"warning","message":{"text":"PaddingParallelModule._load_from_state_dict (cyclomatic 27): PaddingParallelModule._load_from_state_dict has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/parallel_module.py"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"95908087f4ccffd62feb6e953fe2bcfac0dab92342ea6c0d579381bb6adb18e8"}},{"ruleId":"D1","level":"warning","message":{"text":"LlamaInferenceForwards.llama_model_forward (cyclomatic 26): LlamaInferenceForwards.llama_model_forward has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/tensor_parallel/modeling/llama.py"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"76a3dde34d8e484e1ef33040e2575cef3684acd374d90eae24ccad3480c95293"}},{"ruleId":"D1","level":"warning","message":{"text":"DistributedCAME.step (cyclomatic 26): DistributedCAME.step has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/distributed_came.py"},"region":{"startLine":333}}}],"partialFingerprints":{"codehealthFindingId/v1":"bace3dc22551883a72b15967b682073e3f995cc01989aa4b335a572451fd18c5"}},{"ruleId":"D1","level":"warning","message":{"text":"ParallelModule._load_from_state_dict (cyclomatic 26): ParallelModule._load_from_state_dict has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/parallel_module.py"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"5830525e02bc54596167d1512640d7af1e5943ae838610d2da431aa88c9854f7"}},{"ruleId":"D1","level":"warning","message":{"text":"_deepseek_v3_tf5.deepseek_v3_model_forward (cyclomatic 26): _deepseek_v3_tf5.deepseek_v3_model_forward has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_deepseek_v3_tf5.py"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d9dd8c2f743999d3bbbc98863cee1681f0fa94c2ec18b3fb343c02ddb07427e"}},{"ruleId":"D1","level":"warning","message":{"text":"NodeHandler.register_strategy (cyclomatic 25): NodeHandler.register_strategy has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/node_handler.py"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e0ea7eb90417f2804fefdbf8f8dc726fc347d993a2bd6ed5c5324224597001b"}},{"ruleId":"D1","level":"warning","message":{"text":"TraceIndice._assign_view_reshape_indice (cyclomatic 25): TraceIndice._assign_view_reshape_indice has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/autochunk/trace_indice.py"},"region":{"startLine":718}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea0e55d2db8dbe3fbbdd713d9cc14c9ca9191969c51ded7d2984d96274a767dd"}},{"ruleId":"D1","level":"warning","message":{"text":"ColoTracer._meta_data_computing (cyclomatic 25): ColoTracer._meta_data_computing has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/tracer.py"},"region":{"startLine":218}}}],"partialFingerprints":{"codehealthFindingId/v1":"154f7df54eb704fce6abf48e2be19eeabd97039bed514b93aa599b9885b6a316"}},{"ruleId":"D1","level":"warning","message":{"text":"p2p._communicate (cyclomatic 25): p2p._communicate has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/communication/p2p.py"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ba5d13947f9e6f9bad7dc552fcb24d92220700f7e187a3fb1f4236035765f40"}},{"ruleId":"D1","level":"warning","message":{"text":"ShardedModelV2._colo_load_from_state_dict (cyclomatic 25): ShardedModelV2._colo_load_from_state_dict has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/zero/sharded_model/sharded_model_v2.py"},"region":{"startLine":481}}}],"partialFingerprints":{"codehealthFindingId/v1":"2afdb0df93d006fa91310de8a07f6eda8fa7e9761a973c08e251aac0f815a858"}},{"ruleId":"D1","level":"warning","message":{"text":"DistributedAdaFactor.step (cyclomatic 25): DistributedAdaFactor.step has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/distributed_adafactor.py"},"region":{"startLine":286}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f353c5d3fedf78482730b0a813bb61912a1c6aeecd9cd4d5b53ca772dbe559e"}},{"ruleId":"D1","level":"warning","message":{"text":"p2p._communicate (cyclomatic 25): p2p._communicate has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/pipeline/p2p.py"},"region":{"startLine":364}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ffa9fba84d635f4dd6f781e7e35e2b08767da8397e83b06bc860f9adfbf2040"}},{"ruleId":"D1","level":"warning","message":{"text":"InterleavedSchedule.run_forward_backward (cyclomatic 25): InterleavedSchedule.run_forward_backward has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/pipeline/schedule/interleaved_pp.py"},"region":{"startLine":441}}}],"partialFingerprints":{"codehealthFindingId/v1":"1191f158762214cea186249d157eb0b15cf5d5395370af76edb2e7ca0b0d3379"}},{"ruleId":"D1","level":"warning","message":{"text":"LowLevelZeroOptimizer.__init__ (cyclomatic 25): LowLevelZeroOptimizer.__init__ has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/low_level/low_level_optim.py"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"7eea2b9bc272b24d775f48050ab6b20aa02224a442901355e3f495880eb10aba"}},{"ruleId":"D1","level":"warning","message":{"text":"WhisperPolicy.get_held_layers (cyclomatic 24): WhisperPolicy.get_held_layers has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_whisper_tf4.py"},"region":{"startLine":593}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfda80c2a35e93a784b509f331b267601956f8ac464d9e6cac0f4444c754278d"}},{"ruleId":"D1","level":"warning","message":{"text":"WhisperPolicy.get_held_layers (cyclomatic 24): WhisperPolicy.get_held_layers has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_whisper_tf5.py"},"region":{"startLine":580}}}],"partialFingerprints":{"codehealthFindingId/v1":"51b996997bc0c8d544c2ecd14d06b0a32ff55e4ea1d86a076ec0e984c199f981"}},{"ruleId":"D1","level":"warning","message":{"text":"NaiveExperienceMaker.make_experience (cyclomatic 23): NaiveExperienceMaker.make_experience has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/experience_maker/naive.py"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a6dc5ee9c904810529b60554cd081438291a995ca03adba5970858b5f21ad22"}},{"ruleId":"D1","level":"warning","message":{"text":"MoeHybridParallelPlugin.__init__ (cyclomatic 23): MoeHybridParallelPlugin.__init__ has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/plugin/moe_hybrid_parallel_plugin.py"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"98dc9c2696317b5a3e58c8accac707b791612c3cc42d3942be89cfdbdc790e18"}},{"ruleId":"D1","level":"warning","message":{"text":"glide_llama.glide_llama_model_forward (cyclomatic 23): glide_llama.glide_llama_model_forward has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/modeling/models/glide_llama.py"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"96019db9d262467e5046771479238f16bd46102f450a553eccf4f9f622127018"}},{"ruleId":"D1","level":"warning","message":{"text":"BnbQuantizationConfig.__post_init__ (cyclomatic 23): BnbQuantizationConfig.__post_init__ has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/quantization/bnb_config.py"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5d435ba31d00b3f018d6a216b885c0e853457b9607230802fcf0f3006f398c4"}},{"ruleId":"D1","level":"warning","message":{"text":"LlamaPipelineForwards.llama_for_sequence_classification_forward (cyclomatic 23): LlamaPipelineForwards.llama_for_sequence_classification_forward has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_llama_tf4.py"},"region":{"startLine":377}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d96dc92ae68487f99fc579c1d10312cf70b6103cb91525e410a9987a2d8a433"}},{"ruleId":"D1","level":"warning","message":{"text":"LlamaPipelineForwards.llama_for_sequence_classification_forward (cyclomatic 23): LlamaPipelineForwards.llama_for_sequence_classification_forward has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_llama_tf5.py"},"region":{"startLine":419}}}],"partialFingerprints":{"codehealthFindingId/v1":"02883535e112a9985fd01e1ce23be059ad6839718d258bc7b72c1b7207829309"}},{"ruleId":"D1","level":"warning","message":{"text":"Qwen2PipelineForwards.qwen2_for_sequence_classification_forward (cyclomatic 23): Qwen2PipelineForwards.qwen2_for_sequence_classification_forward has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen2_tf4.py"},"region":{"startLine":368}}}],"partialFingerprints":{"codehealthFindingId/v1":"3163e6e38ef3b05d7c16539e7ab355e005199dcf19ae270c723d404f9ded589d"}},{"ruleId":"D1","level":"warning","message":{"text":"BloomPipelineForwards.bloom_for_sequence_classification_forward (cyclomatic 23): BloomPipelineForwards.bloom_for_sequence_classification_forward has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/bloom.py"},"region":{"startLine":412}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b829c4cc4c593538239d39eb4dc965c4065729a8fba3df53d7c18588a9e57c2"}},{"ruleId":"D1","level":"warning","message":{"text":"T5PipelineForwards.t5_for_conditional_generation_forward (cyclomatic 23): T5PipelineForwards.t5_for_conditional_generation_forward has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/t5.py"},"region":{"startLine":403}}}],"partialFingerprints":{"codehealthFindingId/v1":"cde50c36e38b34e32a75f49a791f7f44deba6b9c027a22494e0b4848f1bcbb15"}},{"ruleId":"D1","level":"warning","message":{"text":"ChatGLMPolicy.module_policy (cyclomatic 23): ChatGLMPolicy.module_policy has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/chatglm2.py"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"13a672efc0b7557df49024025c36d1aeb63c0eed80e9391787f8e32905ee5f2f"}},{"ruleId":"D1","level":"warning","message":{"text":"CommandPolicy.module_policy (cyclomatic 23): CommandPolicy.module_policy has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/command.py"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"881f021cce85fcf0476a0f8dfb796e181f0f6e0f11d33f7147c1043babf28d77"}},{"ruleId":"D1","level":"warning","message":{"text":"spliced_and_tokenized_dataset.supervised_tokenize_sft (cyclomatic 22): spliced_and_tokenized_dataset.supervised_tokenize_sft has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/colossal_llama/dataset/spliced_and_tokenized_dataset.py"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"daa8cebe0cf9cb09d70a36f92fa86ff7b47e52637ad56b9e7d3317f6dc4f9e7d"}},{"ruleId":"D1","level":"warning","message":{"text":"launch_zero_bubble.launch_distributed (cyclomatic 22): launch_zero_bubble.launch_distributed has cyclomatic complexity 22 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/launch_zero_bubble.py"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"eeff6ef711877e05240c98fd9a992d4224d173253f31cc976016357bf014740e"}},{"ruleId":"D1","level":"warning","message":{"text":"HybridParallelCheckpointIO.save_sharded_optimizer (cyclomatic 22): HybridParallelCheckpointIO.save_sharded_optimizer has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":516}}}],"partialFingerprints":{"codehealthFindingId/v1":"352c554ed04b2530b447c2dbc7c5a50b96387c1a6cfdf5253e039b866cf9805b"}},{"ruleId":"D1","level":"warning","message":{"text":"run.launch_multi_processes (cyclomatic 22): run.launch_multi_processes has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/cli/launcher/run.py"},"region":{"startLine":212}}}],"partialFingerprints":{"codehealthFindingId/v1":"5856c713041610e8338766db50c999240ca0ddd6d4b66b40de369a235f73daf4"}},{"ruleId":"D1","level":"warning","message":{"text":"LlamaInferenceForwards.llama_model_forward (cyclomatic 22): LlamaInferenceForwards.llama_model_forward has cyclomatic complexity 22 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/hybridengine/modeling/llama.py"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"157ef7b9b3549d757151fb71d5bca0d54278cc6f578236bb4de63b60ff379659"}},{"ruleId":"D1","level":"warning","message":{"text":"WhisperPipelineForwards.whisper_encoder_forward (cyclomatic 22): WhisperPipelineForwards.whisper_encoder_forward has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_whisper_tf4.py"},"region":{"startLine":472}}}],"partialFingerprints":{"codehealthFindingId/v1":"6033b636abe4750e6b0ad90aa3d7f52e8018aa9f519e839780e9b00a86ce131b"}},{"ruleId":"D1","level":"warning","message":{"text":"WhisperPipelineForwards.whisper_model_forward (cyclomatic 22): WhisperPipelineForwards.whisper_model_forward has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_whisper_tf4.py"},"region":{"startLine":845}}}],"partialFingerprints":{"codehealthFindingId/v1":"f236d75fd4c1e2ba1b8e7409fc94c3e4702a8aac938e1efacf53b687684b5353"}},{"ruleId":"D1","level":"warning","message":{"text":"LlamaPolicy.module_policy (cyclomatic 22): LlamaPolicy.module_policy has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_llama_tf4.py"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"7147582d4d83e606577e1345a89aa7318a918877deb785a112ef57d43c837d15"}},{"ruleId":"D1","level":"warning","message":{"text":"T5BasePolicy.get_held_layers (cyclomatic 22): T5BasePolicy.get_held_layers has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/t5.py"},"region":{"startLine":501}}}],"partialFingerprints":{"codehealthFindingId/v1":"9dc238015ab57143d11805b7d2f138c06501fb9866b0edb4608fda0183bfced4"}},{"ruleId":"D1","level":"warning","message":{"text":"GeminiDDP.state_dict_shard (cyclomatic 22): GeminiDDP.state_dict_shard has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/gemini/gemini_ddp.py"},"region":{"startLine":900}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e2ccbfb7dfadb59205bd7fea770f4238c737cfd9855f424dead650513f7ec92"}},{"ruleId":"D1","level":"warning","message":{"text":"agieval.combine_prompt (cyclomatic 21): agieval.combine_prompt has cyclomatic complexity 21 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/dataset/agieval.py"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c855bd439f4240c5217522e66a86f2738180ac6fb2ec2be4559b4827244ae08"}},{"ruleId":"D1","level":"warning","message":{"text":"FusedLAMB.step (cyclomatic 21): FusedLAMB.step has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/fused_lamb.py"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d3d62386404a6dc963f808c881abf8b4be9afd04397954f76159cee76eeeb7c"}},{"ruleId":"D1","level":"warning","message":{"text":"FalconPipelineForwards.falcon_for_sequence_classification_forward (cyclomatic 21): FalconPipelineForwards.falcon_for_sequence_classification_forward has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/falcon.py"},"region":{"startLine":453}}}],"partialFingerprints":{"codehealthFindingId/v1":"71e7a15c407eaa8d46806b75ae92640d5554cc9e833b7ece6cd47e5b175b0840"}},{"ruleId":"D1","level":"warning","message":{"text":"LlamaPolicy.module_policy (cyclomatic 21): LlamaPolicy.module_policy has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_llama_tf5.py"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"e15aeb0bf5fd2f45522fc55d587bcc9fe17357e3925d5e3ab562fbe3a6e485b4"}},{"ruleId":"D1","level":"warning","message":{"text":"generation._sample_streaming (cyclomatic 20): generation._sample_streaming has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/models/generation.py"},"region":{"startLine":262}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd05d2234125882769a32d864b54edd34e4521feaac7539f6c9d5a32b60347f8"}},{"ruleId":"D1","level":"warning","message":{"text":"Quantizer.find_params (cyclomatic 20): Quantizer.find_params has cyclomatic complexity 20 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/quant/llama_gptq/quant.py"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad19dd8e4cc56f37dd0a88175be14a795e9b5320881e42b01222ffd22270237f"}},{"ruleId":"D1","level":"warning","message":{"text":"GRPOTrainer._training_step (cyclomatic 20): GRPOTrainer._training_step has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/grpo.py"},"region":{"startLine":228}}}],"partialFingerprints":{"codehealthFindingId/v1":"938c478fe11b7cfc709635a09836c41bd4a44d2f8854d4cad6afde2ffec56c02"}},{"ruleId":"D1","level":"warning","message":{"text":"PPOTrainer._training_step (cyclomatic 20): PPOTrainer._training_step has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/ppo.py"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"d09fb5adb9d73dd5f1c0aae02d0481aa457c594a086492cb38b31baa63802aee"}},{"ruleId":"D1","level":"warning","message":{"text":"TraceFlow._get_prepose_nodes (cyclomatic 20): TraceFlow._get_prepose_nodes has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/autochunk/trace_flow.py"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa8b373f706b1c3f24453e4f1618be491252cabb91c1d5d1400b01452b34b3d0"}},{"ruleId":"D1","level":"warning","message":{"text":"HybridParallelCheckpointIO.save_sharded_model (cyclomatic 20): HybridParallelCheckpointIO.save_sharded_model has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":252}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa4d4a70de72eccdd5a5b1f63d0f12a84aca775d965c7b6a30d6b1e07546afb6"}},{"ruleId":"D1","level":"warning","message":{"text":"MoECheckpointIO.save_sharded_model (cyclomatic 20): MoECheckpointIO.save_sharded_model has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/moe_checkpoint.py"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"73f7a3c66d6a47f167675d1f2ae500665823e588a67b89b91862b2b770accf13"}},{"ruleId":"D1","level":"warning","message":{"text":"_meta_regist_12.meta_index_Tensor (cyclomatic 20): _meta_regist_12.meta_index_Tensor has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/_meta_regist_12.py"},"region":{"startLine":435}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c12fd314dea1a9fcec90fa1ecb5910dde5e1db411fdf4609e7ebfbad9ab99f6"}},{"ruleId":"D1","level":"warning","message":{"text":"LLMEngine.add_request (cyclomatic 20): LLMEngine.add_request has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/core/llm_engine.py"},"region":{"startLine":580}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9015f7ccc6342e7b760360ca772d4a5d3846cb98d7279c376c258affcbfe25c"}},{"ruleId":"D1","level":"warning","message":{"text":"stablediffusion3.sd3_forward (cyclomatic 20): stablediffusion3.sd3_forward has cyclomatic complexity 20 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/modeling/models/stablediffusion3.py"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"70a50cea3cab68e8b3d4afc925922cdc84b73f7d631ff4ca56f0996447aca256"}},{"ruleId":"D1","level":"warning","message":{"text":"PipelineSchedule.forward_backward_step (cyclomatic 20): PipelineSchedule.forward_backward_step has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/engine/schedule/_pipeline_schedule.py"},"region":{"startLine":321}}}],"partialFingerprints":{"codehealthFindingId/v1":"8267b32f03156aaa180e3785b74745dcbf65b6a373bda093cebb9ff19fdffe4d"}},{"ruleId":"D1","level":"warning","message":{"text":"WhisperPipelineForwards.whisper_model_forward (cyclomatic 20): WhisperPipelineForwards.whisper_model_forward has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_whisper_tf5.py"},"region":{"startLine":363}}}],"partialFingerprints":{"codehealthFindingId/v1":"2cff202b554c947865b6b41c9b40755c1ea606b1548c86b166fc9f144fb34637"}},{"ruleId":"D1","level":"warning","message":{"text":"MixtralPolicy.module_policy (cyclomatic 20): MixtralPolicy.module_policy has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_mixtral_tf5.py"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"08e977116d1229b2c4622af7c40b53c6774a2ad84541a8aa7578bf4e178c84d8"}},{"ruleId":"D1","level":"warning","message":{"text":"LowLevelZeroOptimizer.step (cyclomatic 20): LowLevelZeroOptimizer.step has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/low_level/low_level_optim.py"},"region":{"startLine":537}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c7617d612f01be6bb530ad0a67b14b2795e807d240e99e5e45d3aa4ae32a016"}},{"ruleId":"D1","level":"warning","message":{"text":"check_pr_runner_policy.validate_fork_workflow (cyclomatic 19): check_pr_runner_policy.validate_fork_workflow has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":".github/scripts/ci/check_pr_runner_policy.py"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f107f322bd49b2ad9e0d409f9bc8a127d689349cc7a5e72ef0c334fa11724d4"}},{"ruleId":"D1","level":"warning","message":{"text":"generate_leaderboard_and_send_to_lark.get_discussion_comments (cyclomatic 19): generate_leaderboard_and_send_to_lark.get_discussion_comments has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":".github/workflows/scripts/generate_leaderboard_and_send_to_lark.py"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d7fda7073bede8d38f384cdffedc83ac620be098492d8f2dcf488dcbc0ed8b3"}},{"ruleId":"D1","level":"warning","message":{"text":"CostGraph.merge_node (cyclomatic 19): CostGraph.merge_node has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/solver/cost_graph.py"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd9b9b93163f9c4d3ad235a393f666052313329aee5e37f07ab4902b3ab77eb7"}},{"ruleId":"D1","level":"warning","message":{"text":"StrategiesConstructor.build_strategies_and_cost (cyclomatic 19): StrategiesConstructor.build_strategies_and_cost has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/solver/strategies_constructor.py"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"524fe3294191e1fb83c737ef5eb526969f27cb8e84e45655d0818d69ee155cc9"}},{"ruleId":"D1","level":"warning","message":{"text":"ColoTracer.trace (cyclomatic 19): ColoTracer.trace has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/tracer.py"},"region":{"startLine":317}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9d1bf4617fee032cc464ad8b0ec7992af50a9be884541d51edb82d6248f1935"}},{"ruleId":"D1","level":"warning","message":{"text":"PipelinableContext.to_layer_list (cyclomatic 19): PipelinableContext.to_layer_list has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/pipeline/pipelinable.py"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cbb391851bb06a4d9fe74d8f5926ef8ffbd6a56bd0753cfe5d29c6e22818ce4"}},{"ruleId":"D1","level":"warning","message":{"text":"GenerateSchedule.generate_step_broadcast (cyclomatic 19): GenerateSchedule.generate_step_broadcast has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/pipeline/schedule/generate.py"},"region":{"startLine":348}}}],"partialFingerprints":{"codehealthFindingId/v1":"f934957573d5bf9bcc6ee6cf6fb162219284e736530d19d58236c718fea5860d"}},{"ruleId":"D1","level":"warning","message":{"text":"WhisperPipelineForwards.whisper_encoder_forward (cyclomatic 19): WhisperPipelineForwards.whisper_encoder_forward has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_whisper_tf5.py"},"region":{"startLine":252}}}],"partialFingerprints":{"codehealthFindingId/v1":"1140f344523d2445be6c49f0bb92aa4f7ab72d9e04644bf7bdbbd57143297e00"}},{"ruleId":"D1","level":"warning","message":{"text":"GPT2PipelineForwards.gpt2_for_sequence_classification_forward (cyclomatic 19): GPT2PipelineForwards.gpt2_for_sequence_classification_forward has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/gpt2.py"},"region":{"startLine":693}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a0498fcb985494f43c0f55f184e1ac7d1793fc91755b3ad78a2e2337df3e418"}},{"ruleId":"D1","level":"warning","message":{"text":"GPTJPipelineForwards.gptj_for_sequence_classification_forward (cyclomatic 19): GPTJPipelineForwards.gptj_for_sequence_classification_forward has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/gptj.py"},"region":{"startLine":356}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b2f427dd3358f4e3c96e1e649a537e1d22bac517ec1d218eb5a0dfa311ff338"}},{"ruleId":"D1","level":"warning","message":{"text":"MixtralPolicy.module_policy (cyclomatic 19): MixtralPolicy.module_policy has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_mixtral_tf4.py"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"726d28bb65b14b23239f4ba29affbd69136dfe7be0e26c9050ae878d6c3160bc"}},{"ruleId":"D1","level":"warning","message":{"text":"Qwen2Policy.module_policy (cyclomatic 19): Qwen2Policy.module_policy has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_qwen2_tf4.py"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ff8ba50f620b0814fd29a0ede1c91aeaa5965d37b9026b39054898c7203d05b"}},{"ruleId":"D1","level":"warning","message":{"text":"Qwen2Policy.module_policy (cyclomatic 19): Qwen2Policy.module_policy has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_qwen2_tf5.py"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c7d89cd307e006f2509436c57942c338b9673bdbc081db28db0be8a80b13b2d"}},{"ruleId":"D1","level":"warning","message":{"text":"Qwen3Policy.module_policy (cyclomatic 19): Qwen3Policy.module_policy has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_qwen3_tf4.py"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"c325a57f843c6768ab597fb47b71a981268ca685c52c3ffe48bf06bb289a15aa"}},{"ruleId":"D1","level":"warning","message":{"text":"Qwen3Policy.module_policy (cyclomatic 19): Qwen3Policy.module_policy has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_qwen3_tf5.py"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6e43c32177911ea955e845e7e325be649625d0cdee0349a0f9433c9d2978256"}},{"ruleId":"D1","level":"warning","message":{"text":"DeepseekPolicy.module_policy (cyclomatic 19): DeepseekPolicy.module_policy has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/deepseek.py"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2db7c88d1fcd2f39c60aefc013169373f401cdb716a3a6e48a5b24359d979dd"}},{"ruleId":"D1","level":"warning","message":{"text":"TensorDetector.collect_tensors_state (cyclomatic 19): TensorDetector.collect_tensors_state has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/utils/tensor_detector/tensor_detector.py"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b3be8480c79777ebed588b4dc503db8ce466005841781495c693e2c9f9cdefd"}},{"ruleId":"D1","level":"warning","message":{"text":"LowLevelZeroOptimizer.state_dict_shard (cyclomatic 19): LowLevelZeroOptimizer.state_dict_shard has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/low_level/low_level_optim.py"},"region":{"startLine":836}}}],"partialFingerprints":{"codehealthFindingId/v1":"56cc268d0de441da3e3625fc37d780f7f3fd69ce4d462e64d33df2156f48c63c"}},{"ruleId":"D1","level":"warning","message":{"text":"DPOTrainer._train (cyclomatic 18): DPOTrainer._train has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/dpo.py"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"d700f076176c617467ebd69d13c8dee3c0e6391e76f4e4f83789cdcaee0f8328"}},{"ruleId":"D1","level":"warning","message":{"text":"HuggingFaceModel.inference (cyclomatic 18): HuggingFaceModel.inference has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/models/huggingface.py"},"region":{"startLine":334}}}],"partialFingerprints":{"codehealthFindingId/v1":"929b23de9525b0ec5de1d614887a3f217db48ee28dbc82e8cab16ac12e4f7a63"}},{"ruleId":"D1","level":"warning","message":{"text":"vLLMModel.inference (cyclomatic 18): vLLMModel.inference has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/models/vllm.py"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae635a29d01796c5b117cd5a16bb8dc63bc2d23290b58e43d7cb2a1da87a7512"}},{"ruleId":"D1","level":"warning","message":{"text":"colossalai_suite.main (cyclomatic 18): colossalai_suite.main has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":".github/scripts/e1/colossalai_suite.py"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b56c37de8ea89b328a6cf11787f7052b1806c94c88c4e82dbeda7282723eaad"}},{"ruleId":"D1","level":"warning","message":{"text":"TraceFlow._assign_single_node_flow (cyclomatic 18): TraceFlow._assign_single_node_flow has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/autochunk/trace_flow.py"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed2fbf53f5adaa0ca683639a570b7b5c24682ea183e16d21231afc2560d0010c"}},{"ruleId":"D1","level":"warning","message":{"text":"MoeHybridParallelPlugin.configure (cyclomatic 18): MoeHybridParallelPlugin.configure has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/plugin/moe_hybrid_parallel_plugin.py"},"region":{"startLine":427}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e7991c852ae494fe3a3aee2cf522411806680fbbf17b1b5853f978b0b186a45"}},{"ruleId":"D1","level":"warning","message":{"text":"HybridParallelCheckpointIO._model_sharder (cyclomatic 18): HybridParallelCheckpointIO._model_sharder has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"c048373b02a608ef32b9668288feef9137947bf4e0e46ac0edaec6d079753458"}},{"ruleId":"D1","level":"warning","message":{"text":"experimental._meta_data_computing_v0 (cyclomatic 18): experimental._meta_data_computing_v0 has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/experimental.py"},"region":{"startLine":525}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa6768dc189cc6078152c8d55fd8b61229acf2e2ae8a482fd8ab96c2e527c88b"}},{"ruleId":"D1","level":"warning","message":{"text":"module_utils.check_colo_module (cyclomatic 18): module_utils.check_colo_module has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/parallel/layers/module_utils.py"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"b74520067477173c5cc18a18a558ea33f62bed584177f7da5b83ba7353fcf721"}},{"ruleId":"D1","level":"warning","message":{"text":"RingAttention.forward (cyclomatic 18): RingAttention.forward has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/attn.py"},"region":{"startLine":623}}}],"partialFingerprints":{"codehealthFindingId/v1":"c11e11168d781f1821db978ed15a79ca02b7fe53495b00b750cb24233bab7d6f"}},{"ruleId":"D1","level":"warning","message":{"text":"loss.dist_cross_entropy (cyclomatic 18): loss.dist_cross_entropy has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/loss.py"},"region":{"startLine":262}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3b53e2617f3738c199584ef32f87f55afcef9dda7e839ba79679eca55eacfb3"}},{"ruleId":"D1","level":"warning","message":{"text":"MistralForwards.mistral_for_sequence_classification_forward (cyclomatic 18): MistralForwards.mistral_for_sequence_classification_forward has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/mistral.py"},"region":{"startLine":276}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c033be2c98bb93a0a9356c0f08c4c5ad7a75fbf792eae740d6ca8aa85e50bfe"}},{"ruleId":"D1","level":"warning","message":{"text":"OPTPipelineForwards.opt_for_sequence_classification_forward (cyclomatic 18): OPTPipelineForwards.opt_for_sequence_classification_forward has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/opt.py"},"region":{"startLine":359}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d35d71375f43cea2e1916cea787308c8f08791c18e8e2f4aecec1d0b2d6f55a"}},{"ruleId":"D1","level":"warning","message":{"text":"T5PipelineForwards.t5_model_forward (cyclomatic 18): T5PipelineForwards.t5_model_forward has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/t5.py"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"7354b21b5dc95f08062709f7c768e3e024982e8daaabbf269dc10dbb0ade7a62"}},{"ruleId":"D1","level":"warning","message":{"text":"BlipPolicy.module_policy (cyclomatic 18): BlipPolicy.module_policy has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/blip2.py"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"862b2260c17c96b137b3805b76a7446fae4f2e7031f4818600cfa09f2f38762a"}},{"ruleId":"D1","level":"warning","message":{"text":"GeminiDDP.__init__ (cyclomatic 18): GeminiDDP.__init__ has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/gemini/gemini_ddp.py"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ea38b54b30455bd1f8d142a58f48fc27d6967bf109c8ebe34c40276df2ea018"}},{"ruleId":"D1","level":"warning","message":{"text":"generation._sample (cyclomatic 17): generation._sample has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/models/generation.py"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"2440ea035848067693d8c9adc97b26664098610facfadca1c34d10863da3793f"}},{"ruleId":"D1","level":"warning","message":{"text":"QuantLinear.pack (cyclomatic 17): QuantLinear.pack has cyclomatic complexity 17 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/quant/llama_gptq/quant.py"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2f270f493c06784773458ab50207dd8058fed761f94145e9b39d1dfd63feb3a"}},{"ruleId":"D1","level":"warning","message":{"text":"DPOTrainer._eval (cyclomatic 17): DPOTrainer._eval has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/dpo.py"},"region":{"startLine":406}}}],"partialFingerprints":{"codehealthFindingId/v1":"a23d4e8734538546c3d2047a86b0b6e1ee43811cbaa31921cbf0fa908e3e638b"}},{"ruleId":"D1","level":"warning","message":{"text":"linear.matmul_meta_info (cyclomatic 17): linear.matmul_meta_info has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/meta_profiler/meta_registry/linear.py"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"26150dec7b9b3306f0021fe4baa4842d2f106882c056f72b4eb372c9ec815d2d"}},{"ruleId":"D1","level":"warning","message":{"text":"SearchChunk._search_max_chunk_region (cyclomatic 17): SearchChunk._search_max_chunk_region has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/autochunk/search_chunk.py"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff6ec139be297edb9469247814ce512475635e7a6e5c820c1772ab4bdc28fb66"}},{"ruleId":"D1","level":"warning","message":{"text":"TraceIndice._assign_getitem_indice (cyclomatic 17): TraceIndice._assign_getitem_indice has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/autochunk/trace_indice.py"},"region":{"startLine":647}}}],"partialFingerprints":{"codehealthFindingId/v1":"9adba2c1fbba3208515fd18e2a071ae2ae9afbaef55295e9e49df241d23fe66d"}},{"ruleId":"D1","level":"warning","message":{"text":"MoECheckpointIO._model_sharder (cyclomatic 17): MoECheckpointIO._model_sharder has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/moe_checkpoint.py"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"aab3e9fcd52a5c6a19188fe61925098f54b561e82b43cebef41dd885cdef3371"}},{"ruleId":"D1","level":"warning","message":{"text":"module_checkpoint.load_checkpoint (cyclomatic 17): module_checkpoint.load_checkpoint has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/utils/checkpoint/module_checkpoint.py"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"de88580a7dc847b9b076f54e8e8accae90b9e40d7717a5fa7491c3d4802445eb"}},{"ruleId":"D1","level":"warning","message":{"text":"GaLoreAdamW8bit.step (cyclomatic 17): GaLoreAdamW8bit.step has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/galore.py"},"region":{"startLine":235}}}],"partialFingerprints":{"codehealthFindingId/v1":"be7e3c93eaf8ff899b20a318266f4053430270ab3ea1f97aa9eb03210df41a82"}},{"ruleId":"D1","level":"warning","message":{"text":"p2p._broadcast_object_list (cyclomatic 17): p2p._broadcast_object_list has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/pipeline/p2p.py"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"c16e1ecb9a9fc9eb2e41598d6be9ca1b46f17b45257ce07c63a481d62720b83f"}},{"ruleId":"D1","level":"warning","message":{"text":"BertPipelineForwards.bert_for_sequence_classification_forward (cyclomatic 17): BertPipelineForwards.bert_for_sequence_classification_forward has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":659}}}],"partialFingerprints":{"codehealthFindingId/v1":"6629af8a56f98294c5ebfe58900b984b27ecf7fdc7512c628e5f37423812621b"}},{"ruleId":"D1","level":"warning","message":{"text":"BertPipelineForwards.bert_for_sequence_classification_forward (cyclomatic 17): BertPipelineForwards.bert_for_sequence_classification_forward has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf5.py"},"region":{"startLine":672}}}],"partialFingerprints":{"codehealthFindingId/v1":"985aa70024eb6bc76bc9968c31a4d8eb0df18e595cb60a58e63965f2bfee2b47"}},{"ruleId":"D1","level":"warning","message":{"text":"MixtralPipelineForwards.mixtral_for_causal_lm_forward (cyclomatic 17): MixtralPipelineForwards.mixtral_for_causal_lm_forward has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_mixtral_tf5.py"},"region":{"startLine":774}}}],"partialFingerprints":{"codehealthFindingId/v1":"81ec71fa926b0bf8316a7d38a5523ab9fbefae91df498b21a7b72b2f70856135"}},{"ruleId":"D1","level":"warning","message":{"text":"ChatGLMForConditionalGeneration.stream_generate (cyclomatic 17): ChatGLMForConditionalGeneration.stream_generate has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/chatglm2_6b/modeling_chatglm.py"},"region":{"startLine":1267}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab8971e713aa6f01ce14f90384a29a82bf89e084f72a926ff3155f45e51a1942"}},{"ruleId":"D1","level":"warning","message":{"text":"GPT2Policy.module_policy (cyclomatic 17): GPT2Policy.module_policy has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/gpt2.py"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"26c695cd9bf8b25a1987c6402e293a811ab7c8945520e0af8afeb21b2013deea"}},{"ruleId":"D1","level":"warning","message":{"text":"BaseProducer.__init__ (cyclomatic 16): BaseProducer.__init__ has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/producer.py"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b725fcfcb638b1e79f4b04e3ebe2714ae6befb3f4a465acfdeb2b13c2089d66"}},{"ruleId":"D1","level":"warning","message":{"text":"gpt_evaluate.evaluate (cyclomatic 16): gpt_evaluate.evaluate has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/evaluate/gpt_evaluate.py"},"region":{"startLine":496}}}],"partialFingerprints":{"codehealthFindingId/v1":"6be14fe0d086d1683f07195e3f82f83283c21f7dbc411e13172aca1539c0b263"}},{"ruleId":"D1","level":"warning","message":{"text":"CheckpointSolverBase._linearize_graph (cyclomatic 16): CheckpointSolverBase._linearize_graph has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/checkpoint/ckpt_solver_base.py"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"52a03cc5d484fc9d01c8192a391f3214fe62630e24a67fdebf89304d68fdef6b"}},{"ruleId":"D1","level":"warning","message":{"text":"runtime_apply_pass._comm_spec_apply (cyclomatic 16): runtime_apply_pass._comm_spec_apply has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/passes/runtime_apply_pass.py"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"093c5294fb083fe46e95e4fe897beace4ca648f579f654548a1fcf92db9dd5ae"}},{"ruleId":"D1","level":"warning","message":{"text":"CostGraph._build_cost_graph (cyclomatic 16): CostGraph._build_cost_graph has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/solver/cost_graph.py"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f5f26b76b135f649c8134a26ff908523996188b9fcb2dc3335b16841e965ae7"}},{"ruleId":"D1","level":"warning","message":{"text":"HybridParallelModule.__init__ (cyclomatic 16): HybridParallelModule.__init__ has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/plugin/hybrid_parallel_plugin.py"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"5527f65f4eb54e129e72780a9ae85ceee2d1c212e8a5b6dde63f85968c57af83"}},{"ruleId":"D1","level":"warning","message":{"text":"HybridParallelPlugin.configure (cyclomatic 16): HybridParallelPlugin.configure has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/plugin/hybrid_parallel_plugin.py"},"region":{"startLine":1239}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9de2954ceff8a2ed54c165ab0d7ed6cb11a90daa48bc7853c83baacac9a4add"}},{"ruleId":"D1","level":"warning","message":{"text":"MoECheckpointIO.gather_from_sharded_optimizer_state (cyclomatic 16): MoECheckpointIO.gather_from_sharded_optimizer_state has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/moe_checkpoint.py"},"region":{"startLine":291}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f05d73381db76f308799e0699ae5c92d96dbe7bb3082dff6b0e553f48ff8166"}},{"ruleId":"D1","level":"warning","message":{"text":"MoECheckpointIO.save_sharded_optimizer (cyclomatic 16): MoECheckpointIO.save_sharded_optimizer has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/moe_checkpoint.py"},"region":{"startLine":431}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc171214350c62c13ef0301e29882ef98e31982b395d5f6ebfce4b955670c1e2"}},{"ruleId":"D1","level":"warning","message":{"text":"calc_pipeline_strategy.alpa_dp_impl (cyclomatic 16): calc_pipeline_strategy.alpa_dp_impl has cyclomatic complexity 16 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/device/calc_pipeline_strategy.py"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"57d74ec6d12c4b934d1e0738ad3ef88b7b0271a8d4980c2b32de0961853b47e0"}},{"ruleId":"D1","level":"warning","message":{"text":"InferCheckpoint_io.load_sharded_model (cyclomatic 16): InferCheckpoint_io.load_sharded_model has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/core/plugin.py"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"a96cbadee2c4427cc7c87dba827a4d2f0a454569621de94c51f15ffb9b72e841"}},{"ruleId":"D1","level":"warning","message":{"text":"ChatGLM2InferenceForwards.chatglm_for_conditional_generation_forward (cyclomatic 16): ChatGLM2InferenceForwards.chatglm_for_conditional_generation_forward has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/tensor_parallel/modeling/chatglm2.py"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"7648da41c20ef1a825681596fd2ef7d238694fbe328b9bd929e5a18cd3116cb8"}},{"ruleId":"D1","level":"warning","message":{"text":"train.main (cyclomatic 16): train.main has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/openmoe/train.py"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"40b35adf880912163669fbb85fe9ded5fac19f78ced0e67682a5a444b542197f"}},{"ruleId":"D1","level":"warning","message":{"text":"ZeroBubbleVPipeScheduler.schedule_f (cyclomatic 16): ZeroBubbleVPipeScheduler.schedule_f has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/pipeline/schedule/zero_bubble_pp.py"},"region":{"startLine":638}}}],"partialFingerprints":{"codehealthFindingId/v1":"da0110242128af94acd5e7ed39adc34c2d0713849b073e6553cf03da766e244b"}},{"ruleId":"D1","level":"warning","message":{"text":"ColoAttention.prepare_attn_kwargs (cyclomatic 16): ColoAttention.prepare_attn_kwargs has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/attn.py"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"074fdbd66cd7b74f9db419f3112ec982b66171e33243b15559fa6cc6cc3ae327"}},{"ruleId":"D1","level":"warning","message":{"text":"ChatGLMModel.forward (cyclomatic 16): ChatGLMModel.forward has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/chatglm2_6b/modeling_chatglm.py"},"region":{"startLine":916}}}],"partialFingerprints":{"codehealthFindingId/v1":"096a59f6166b246260d37f9ee54b5173c6e0491222d8be387b6f2078dae31304"}},{"ruleId":"D1","level":"warning","message":{"text":"BertPolicy.module_policy (cyclomatic 16): BertPolicy.module_policy has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_bert_tf4.py"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"6297b3d4c54a321b3b35a48225f5d40bd35a9fc397343388ceb804b54ac55de1"}},{"ruleId":"D1","level":"warning","message":{"text":"BertPolicy.module_policy (cyclomatic 16): BertPolicy.module_policy has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_bert_tf5.py"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ace17a31403884628ddef07c9a51f63f2f1886b68b3cf9a3a92c7958187606d"}},{"ruleId":"D1","level":"warning","message":{"text":"ShapeConsistencyManager.get_all_all_to_all_spec (cyclomatic 16): ShapeConsistencyManager.get_all_all_to_all_spec has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/tensor/shape_consistency.py"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"b41a911895cfa5c82806cd80680987dd7f6f61c5dc1e541f5fc01a5b79d8dfc4"}},{"ruleId":"D1","level":"warning","message":{"text":"GeminiDDP.grad_handle (cyclomatic 16): GeminiDDP.grad_handle has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/gemini/gemini_ddp.py"},"region":{"startLine":358}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd150d48a45542803bae6bae53abcb806fcd768fde014c999bce89befb6c820f"}},{"ruleId":"D1","level":"warning","message":{"text":"LowLevelZeroOptimizer.state_dict (cyclomatic 16): LowLevelZeroOptimizer.state_dict has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/low_level/low_level_optim.py"},"region":{"startLine":762}}}],"partialFingerprints":{"codehealthFindingId/v1":"08bbd232a7a062e6cbf6aef1d5bb051862a905cc5edfeb8d0b354bb22e7257db"}},{"ruleId":"D2","level":"warning","message":{"text":"BaseProducer.loop (cognitive 125): BaseProducer.loop has cognitive complexity 125 (threshold 15). Drivers by points: if/else 20 (78 pts), loops 8 (30 pts), boolean chains 10, ternaries 1 (7 pts) (nesting depth added 86). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/zero_bubble/producer.py"},"region":{"startLine":212}}}],"partialFingerprints":{"codehealthFindingId/v1":"4588f46f0de23eaeff877df74034174bfe42f7214789d8325f25ce67995797a4"}},{"ruleId":"D2","level":"warning","message":{"text":"BaseProducer.loop (cognitive 122): BaseProducer.loop has cognitive complexity 122 (threshold 15). Drivers by points: if/else 23 (78 pts), loops 8 (29 pts), boolean chains 8, ternaries 1 (7 pts) (nesting depth added 82). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/producer.py"},"region":{"startLine":218}}}],"partialFingerprints":{"codehealthFindingId/v1":"db8326b3bcaea41461574e15500977c50f43786fe80e2732d2d76e589e00b2ef"}},{"ruleId":"D2","level":"warning","message":{"text":"PipelineGraph.try_v_schedule (cognitive 114): PipelineGraph.try_v_schedule has cognitive complexity 114 (threshold 15). Drivers by points: if/else 22 (60 pts), loops 21 (42 pts), boolean chains 12 (nesting depth added 59). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/pipeline/schedule/v_schedule.py"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab2e3eac800cf1d2b8fb989878e56720509911d7594e8d8fa889b701e3ed2918"}},{"ruleId":"D2","level":"warning","message":{"text":"BaseConsumer.loop (cognitive 108): BaseConsumer.loop has cognitive complexity 108 (threshold 15). Drivers by points: if/else 17 (64 pts), loops 7 (25 pts), ternaries 2 (11 pts), boolean chains 8 (nesting depth added 74). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/consumer.py"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"480e7ec12d84340ca3b44fa033140cd5902abdd8e523d8517e371d60f0f20e67"}},{"ruleId":"D2","level":"warning","message":{"text":"train.train (cognitive 106): train.train has cognitive complexity 106 (threshold 15). Drivers by points: if/else 31 (78 pts), boolean chains 9, ternaries 6 (8 pts), loops 3 (7 pts), error handling 2 (4 pts) (nesting depth added 55). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/train.py"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"83680cd8c0cd875613db2b0863718c32b1be9974820d0e42848c78917a751c8d"}},{"ruleId":"D2","level":"warning","message":{"text":"DistributedAdaFactor.step (cognitive 104): DistributedAdaFactor.step has cognitive complexity 104 (threshold 15). Drivers by points: if/else 31 (101 pts), loops 2 (3 pts) (nesting depth added 71). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/distributed_adafactor.py"},"region":{"startLine":286}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b5b7153421a20b5002fc5410a6479f579c915c618e6f858678b814a3acc8312"}},{"ruleId":"D2","level":"warning","message":{"text":"DistributedCAME.step (cognitive 102): DistributedCAME.step has cognitive complexity 102 (threshold 15). Drivers by points: if/else 31 (99 pts), loops 2 (3 pts) (nesting depth added 69). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/distributed_came.py"},"region":{"startLine":333}}}],"partialFingerprints":{"codehealthFindingId/v1":"e98f90ef26b40d660956914b368f16c6c8fe2418dbd35ad93a9542529c597e82"}},{"ruleId":"D2","level":"warning","message":{"text":"InterleavedPipelineSchedule.forward_backward_step (cognitive 89): InterleavedPipelineSchedule.forward_backward_step has cognitive complexity 89 (threshold 15). Drivers by points: if/else 35 (66 pts), ternaries 5 (12 pts), loops 4 (8 pts), boolean chains 3 (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/engine/schedule/_pipeline_schedule.py"},"region":{"startLine":560}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8f7242d43de0def5bbacc460f129af9485407cd5873753f9ca7dc0015114032"}},{"ruleId":"D2","level":"warning","message":{"text":"generate_leaderboard_and_send_to_lark.get_discussion_comments (cognitive 87): generate_leaderboard_and_send_to_lark.get_discussion_comments has cognitive complexity 87 (threshold 15). Drivers by points: if/else 19 (70 pts), loops 6 (17 pts) (nesting depth added 62). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":".github/workflows/scripts/generate_leaderboard_and_send_to_lark.py"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"8239182fa04b6866d95fd3c5f0993256bca27e57ff583bdd7c31031cb93e0e4c"}},{"ruleId":"D2","level":"warning","message":{"text":"activation_checkpoint_codegen.emit_code_with_activation_checkpoint (cognitive 86): activation_checkpoint_codegen.emit_code_with_activation_checkpoint has cognitive complexity 86 (threshold 15). Drivers by points: if/else 19 (67 pts), loops 7 (18 pts), boolean chains 1 (nesting depth added 59). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/codegen/activation_checkpoint_codegen.py"},"region":{"startLine":490}}}],"partialFingerprints":{"codehealthFindingId/v1":"881bcb5517e6a0192b20ae0b12cbf9b5cfd554ee5f708adfc80dbfa5cb74c4a6"}},{"ruleId":"D2","level":"warning","message":{"text":"GPT2PipelineForwards.gpt2_model_forward (cognitive 86): GPT2PipelineForwards.gpt2_model_forward has cognitive complexity 86 (threshold 15). Drivers by points: if/else 38 (60 pts), ternaries 8 (14 pts), boolean chains 11, loops 1 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/gpt2.py"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d91035463fb323d6cf0bf30a29881bd6acf3d05b28eb17983f1a354437c4aef"}},{"ruleId":"D2","level":"warning","message":{"text":"OPTPipelineForwards.opt_model_forward (cognitive 86): OPTPipelineForwards.opt_model_forward has cognitive complexity 86 (threshold 15). Drivers by points: if/else 34 (53 pts), ternaries 16 (26 pts), boolean chains 5, loops 2 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/opt.py"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"f268b0ef384f20d54149ad032e8c2b9e01df382e77196155853f83ee2ce841aa"}},{"ruleId":"D2","level":"warning","message":{"text":"DistGaloreAdamW.step (cognitive 85): DistGaloreAdamW.step has cognitive complexity 85 (threshold 15). Drivers by points: if/else 21 (79 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 59). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/distributed_galore.py"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"43d1b23cfadafbed7deccdb7733ccd9736a83ac9efe96f8127be880cf78529ed"}},{"ruleId":"D2","level":"warning","message":{"text":"pretrained.new_from_pretrained (cognitive 84): pretrained.new_from_pretrained has cognitive complexity 84 (threshold 15). Drivers by points: if/else 36 (63 pts), boolean chains 10, error handling 3 (8 pts), ternaries 2 (3 pts) (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/lazy/pretrained.py"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8e7da90437b22fcc6abfcf2833bd805703cea07658757491d7cf6186427a2cd"}},{"ruleId":"D2","level":"warning","message":{"text":"BertPipelineForwards.bert_model_forward (cognitive 84): BertPipelineForwards.bert_model_forward has cognitive complexity 84 (threshold 15). Drivers by points: if/else 36 (54 pts), ternaries 16 (21 pts), boolean chains 8, loops 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d6cd2da6ec1a49dbe127e838723a7a9a47281423153e14b1ce25148855ddcd5"}},{"ruleId":"D2","level":"warning","message":{"text":"WorkerBase._consume_work_item_by_phase (cognitive 82): WorkerBase._consume_work_item_by_phase has cognitive complexity 82 (threshold 15). Drivers by points: if/else 29 (66 pts), loops 4 (12 pts), boolean chains 4 (nesting depth added 45). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/pipeline/rpc/_pipeline_base.py"},"region":{"startLine":804}}}],"partialFingerprints":{"codehealthFindingId/v1":"fea5e4930b640ba950b52d22341516d115586c47a05cf69e1f957fab6afb82e0"}},{"ruleId":"D2","level":"warning","message":{"text":"LlamaPipelineForwards.llama_model_forward (cognitive 80): LlamaPipelineForwards.llama_model_forward has cognitive complexity 80 (threshold 15). Drivers by points: if/else 36 (53 pts), ternaries 10 (14 pts), boolean chains 12, loops 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_llama_tf4.py"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"7aa65f2f70dbf1287110ca8fd416d3de49c2ec302e783b24a37db0fb27dc6bcc"}},{"ruleId":"D2","level":"warning","message":{"text":"BaseConsumer.loop (cognitive 78): BaseConsumer.loop has cognitive complexity 78 (threshold 15). Drivers by points: if/else 10 (41 pts), loops 7 (23 pts), boolean chains 9, ternaries 1 (5 pts) (nesting depth added 51). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/zero_bubble/consumer.py"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbd6dc373c7726e7bba2e5d205c618aaa7f0bfc5e39993a6eb1136f3f9c9882e"}},{"ruleId":"D2","level":"warning","message":{"text":"LlamaPipelineForwards.llama_model_forward (cognitive 78): LlamaPipelineForwards.llama_model_forward has cognitive complexity 78 (threshold 15). Drivers by points: if/else 32 (49 pts), boolean chains 15, ternaries 10 (13 pts), loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_llama_tf5.py"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"531fc5dedbb2da6c7669acade8e60d20b5aef0c2276f048b5e66edf2479cf615"}},{"ruleId":"D2","level":"warning","message":{"text":"WhisperPipelineForwards.whisper_decoder_forward (cognitive 77): WhisperPipelineForwards.whisper_decoder_forward has cognitive complexity 77 (threshold 15). Drivers by points: if/else 23 (42 pts), ternaries 16 (28 pts), boolean chains 5, loops 2 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_whisper_tf4.py"},"region":{"startLine":601}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fcddf6fcec053c4ebabce1d13909dcedfaf91e6d4302070762918f37c61b997"}},{"ruleId":"D2","level":"warning","message":{"text":"GRPOConsumer.step (cognitive 75): GRPOConsumer.step has cognitive complexity 75 (threshold 15). Drivers by points: if/else 27 (56 pts), boolean chains 11, ternaries 3 (7 pts), loops 1 (nesting depth added 33). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/grpo_consumer.py"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d7e84b7839a7eec2c1340540e917b05605b2eb4260788912587e50741f89917"}},{"ruleId":"D2","level":"warning","message":{"text":"initialize.initialize (cognitive 74): initialize.initialize has cognitive complexity 74 (threshold 15). Drivers by points: if/else 38 (66 pts), boolean chains 6, loops 1 (2 pts) (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/initialize.py"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d872a6edb0e034bfec9aeed9ec518f1921e8bf0f09d73cf00c03a50843302f6"}},{"ruleId":"D2","level":"warning","message":{"text":"Qwen2PipelineForwards.qwen2_model_forward (cognitive 73): Qwen2PipelineForwards.qwen2_model_forward has cognitive complexity 73 (threshold 15). Drivers by points: if/else 31 (47 pts), ternaries 12 (19 pts), boolean chains 6, loops 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen2_tf4.py"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b2f40526635d6ef3bcf9be31607a8a04bb814d94580a81dcf57bd8026d34fbc"}},{"ruleId":"D2","level":"warning","message":{"text":"Qwen3PipelineForwards.qwen3_model_forward (cognitive 73): Qwen3PipelineForwards.qwen3_model_forward has cognitive complexity 73 (threshold 15). Drivers by points: if/else 31 (47 pts), ternaries 12 (19 pts), boolean chains 6, loops 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen3_tf4.py"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e236641700ec33019a63773e49fc5e7dd620288ed965a4e09a36d3c8c48f752"}},{"ruleId":"D2","level":"warning","message":{"text":"GRPOConsumer.step (cognitive 70): GRPOConsumer.step has cognitive complexity 70 (threshold 15). Drivers by points: if/else 24 (52 pts), boolean chains 10, ternaries 3 (7 pts), loops 1 (nesting depth added 32). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/zero_bubble/grpo_consumer.py"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"6000cceb05cd39f9716b5fbaa27b2971c43161fdc40af8afddfe40f78ba6df46"}},{"ruleId":"D2","level":"warning","message":{"text":"BertPipelineForwards.bert_model_forward (cognitive 70): BertPipelineForwards.bert_model_forward has cognitive complexity 70 (threshold 15). Drivers by points: if/else 33 (46 pts), ternaries 13 (16 pts), boolean chains 7, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf5.py"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"b652a2f3732ab3efd654a62eb8e067f15f4040b1e4e37c8e498fd6972a6e4818"}},{"ruleId":"D2","level":"warning","message":{"text":"BloomPipelineForwards.bloom_model_forward (cognitive 70): BloomPipelineForwards.bloom_model_forward has cognitive complexity 70 (threshold 15). Drivers by points: if/else 34 (49 pts), ternaries 10 (14 pts), boolean chains 6, loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/bloom.py"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"62b3185fc23b185b28a10a10ed6788e6b0d82eb598f620acdcf5c92698063588"}},{"ruleId":"D2","level":"warning","message":{"text":"CommandPipelineForwards.command_model_forward (cognitive 68): CommandPipelineForwards.command_model_forward has cognitive complexity 68 (threshold 15). Drivers by points: if/else 33 (47 pts), ternaries 9 (14 pts), boolean chains 6, loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/command.py"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"98fee2744427fc93e4e480e2fc13644a82fae731276043ea983282f18d55b5f5"}},{"ruleId":"D2","level":"warning","message":{"text":"split_module.split_module (cognitive 67): split_module.split_module has cognitive complexity 67 (threshold 15). Drivers by points: if/else 19 (41 pts), loops 13 (20 pts), ternaries 2 (6 pts) (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/passes/split_module.py"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c8e8d2a95d2f29d9e0c0571b9bcde94ce2c805aa2b8d46950da62605cc1ea46"}},{"ruleId":"D2","level":"warning","message":{"text":"PipelineGraph.get_v_schedule (cognitive 67): PipelineGraph.get_v_schedule has cognitive complexity 67 (threshold 15). Drivers by points: if/else 13 (36 pts), loops 11 (18 pts), boolean chains 7, ternaries 2 (6 pts) (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/pipeline/schedule/v_schedule.py"},"region":{"startLine":318}}}],"partialFingerprints":{"codehealthFindingId/v1":"07704eef274630aafabb86ebd33015ebaec8a704e5c5dd985bdd7dd6a2e6919c"}},{"ruleId":"D2","level":"warning","message":{"text":"PipelinableContext.to_layer_list (cognitive 66): PipelinableContext.to_layer_list has cognitive complexity 66 (threshold 15). Drivers by points: if/else 14 (43 pts), loops 6 (22 pts), boolean chains 1 (nesting depth added 45). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/pipeline/pipelinable.py"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"4afaadfa39fe08ea07ee0af2a0c7bb49ddffeb648ea8009364732e521492331b"}},{"ruleId":"D2","level":"warning","message":{"text":"CheckpointSolverRotor._annotate_from_sequence (cognitive 65): CheckpointSolverRotor._annotate_from_sequence has cognitive complexity 65 (threshold 15). Drivers by points: loops 15 (51 pts), if/else 6 (14 pts) (nesting depth added 44). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/checkpoint/ckpt_solver_rotor.py"},"region":{"startLine":361}}}],"partialFingerprints":{"codehealthFindingId/v1":"05e3e97c651c92d2d3ab1b3838fc0502c473435345c00638ea252a113325491a"}},{"ruleId":"D2","level":"warning","message":{"text":"RegionManager._linearize_graph (cognitive 65): RegionManager._linearize_graph has cognitive complexity 65 (threshold 15). Drivers by points: if/else 18 (50 pts), boolean chains 6, loops 3 (6 pts), error handling 1 (3 pts) (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/offload/region_manager.py"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b59e69effd7391bfd3fb1875791d2f54a29052a85dfa4829485a737edb9e34c"}},{"ruleId":"D2","level":"warning","message":{"text":"MixtralPipelineForwards.mixtral_model_forward (cognitive 65): MixtralPipelineForwards.mixtral_model_forward has cognitive complexity 65 (threshold 15). Drivers by points: if/else 29 (40 pts), ternaries 13 (19 pts), boolean chains 5, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_mixtral_tf4.py"},"region":{"startLine":183}}}],"partialFingerprints":{"codehealthFindingId/v1":"898200c4aa698e79a2a9edc8cf144408a736966b0b26b9b18dfebcb01fe411df"}},{"ruleId":"D2","level":"warning","message":{"text":"T5PipelineForwards.t5_stack_forward (cognitive 64): T5PipelineForwards.t5_stack_forward has cognitive complexity 64 (threshold 15). Drivers by points: if/else 29 (42 pts), ternaries 7 (13 pts), boolean chains 8, loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/t5.py"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b28617a532bd47580ee54e4d21c5b6d1e094cd72d1aea6bb356a995f072d0c0"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatGLMPipelineForwards.chatglm_model_forward (cognitive 63): ChatGLMPipelineForwards.chatglm_model_forward has cognitive complexity 63 (threshold 15). Drivers by points: if/else 32 (50 pts), boolean chains 7, ternaries 5, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/chatglm2.py"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b672e01636a94fcb877d9d73fa0c8a31ac8efe93943bcc195016c34b83d77ac"}},{"ruleId":"D2","level":"warning","message":{"text":"WorkerBase._get_real_args_kwargs_fwd (cognitive 59): WorkerBase._get_real_args_kwargs_fwd has cognitive complexity 59 (threshold 15). Drivers by points: if/else 17 (47 pts), loops 2 (12 pts) (nesting depth added 40). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/pipeline/rpc/_pipeline_base.py"},"region":{"startLine":653}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1b6600f9283c79ce8dda5b3bf04d294f639a148ab01fc1cb6b9c990f15c98e5"}},{"ruleId":"D2","level":"warning","message":{"text":"Solver._call_solver_serialized_args (cognitive 58): Solver._call_solver_serialized_args has cognitive complexity 58 (threshold 15). Drivers by points: if/else 17 (30 pts), loops 18 (24 pts), boolean chains 3, ternaries 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/solver/solver.py"},"region":{"startLine":211}}}],"partialFingerprints":{"codehealthFindingId/v1":"77ca3010f101068a6fdc64dd87821e39df46442aebef21d2bb4259511a28b4f5"}},{"ruleId":"D2","level":"warning","message":{"text":"TraceFlow._get_prepose_nodes (cognitive 56): TraceFlow._get_prepose_nodes has cognitive complexity 56 (threshold 15). Drivers by points: if/else 13 (40 pts), loops 7 (15 pts), boolean chains 1 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/autochunk/trace_flow.py"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"a52df1120b7327f1e9c35ba2c8eeaf388b3d404474f7f3eb75454bbd6f9068c7"}},{"ruleId":"D2","level":"warning","message":{"text":"DeepseekPipelineForwards.deepseek_model_forward (cognitive 55): DeepseekPipelineForwards.deepseek_model_forward has cognitive complexity 55 (threshold 15). Drivers by points: if/else 25 (35 pts), ternaries 10 (15 pts), boolean chains 4, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/deepseek.py"},"region":{"startLine":286}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc8b491903ce9a5f517ccd291c3e746cb8a24386bcd749595b57b84fcf4f823c"}},{"ruleId":"D2","level":"warning","message":{"text":"GeminiDDP.state_dict_shard (cognitive 55): GeminiDDP.state_dict_shard has cognitive complexity 55 (threshold 15). Drivers by points: if/else 15 (40 pts), ternaries 3 (11 pts), loops 3, boolean chains 1 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/gemini/gemini_ddp.py"},"region":{"startLine":900}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a2c74279437a03ef2f6ac0905ad02fe93ee168dae915625e979df2e8060f635"}},{"ruleId":"D2","level":"warning","message":{"text":"GeminiOptimizer.collect_states (cognitive 55): GeminiOptimizer.collect_states has cognitive complexity 55 (threshold 15). Drivers by points: if/else 18 (41 pts), loops 5 (10 pts), ternaries 3, boolean chains 1 (nesting depth added 28). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/gemini/gemini_optimizer.py"},"region":{"startLine":421}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f4e706ce5ac8326223ed4639f418eb629e06c88413f7a0966be197e4e828ffb"}},{"ruleId":"D2","level":"warning","message":{"text":"TensorDetector.collect_tensors_state (cognitive 54): TensorDetector.collect_tensors_state has cognitive complexity 54 (threshold 15). Drivers by points: if/else 11 (41 pts), loops 2 (7 pts), boolean chains 6 (nesting depth added 35). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/utils/tensor_detector/tensor_detector.py"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"b36e37756c8375df297921d0ab58d7dc08cbd9baf70264c8205af7422d481f85"}},{"ruleId":"D2","level":"warning","message":{"text":"NodeHandler.register_strategy (cognitive 52): NodeHandler.register_strategy has cognitive complexity 52 (threshold 15). Drivers by points: if/else 10 (27 pts), loops 9 (19 pts), boolean chains 6 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/node_handler.py"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"10f96320c907a36385cfc5bf2a83935f2c4c9f0dca3ba4999ca038fcf6c705eb"}},{"ruleId":"D2","level":"warning","message":{"text":"pixart_alpha.pixart_alpha_forward (cognitive 52): pixart_alpha.pixart_alpha_forward has cognitive complexity 52 (threshold 15). Drivers by points: if/else 22 (34 pts), ternaries 3 (10 pts), boolean chains 7, loops 1 (nesting depth added 19). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/modeling/models/pixart_alpha.py"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"db26f206930600d2635267816e6f19b79baa919c4dd52d71f67d32e1efab0fb1"}},{"ruleId":"D2","level":"warning","message":{"text":"_deepseek_v3_tf4.deepseek_v3_model_forward (cognitive 52): _deepseek_v3_tf4.deepseek_v3_model_forward has cognitive complexity 52 (threshold 15). Drivers by points: if/else 23 (30 pts), ternaries 10 (15 pts), boolean chains 6, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_deepseek_v3_tf4.py"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c9da4479656d2f653283ff6ffa9c8cbcc8a3d350f958cf844fb99500ea59c5e"}},{"ruleId":"D2","level":"warning","message":{"text":"utils.get_lora_state_dict (cognitive 51): utils.get_lora_state_dict has cognitive complexity 51 (threshold 15). Drivers by points: if/else 19 (39 pts), boolean chains 8, loops 2 (4 pts) (nesting depth added 22). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/utils.py"},"region":{"startLine":1049}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffff32d9068b7ef3fee3ea2a6e899856f9c43aa3b9b1994bb3ba7a38cfbcbb23"}},{"ruleId":"D2","level":"warning","message":{"text":"MistralForwards.mistral_model_forward (cognitive 51): MistralForwards.mistral_model_forward has cognitive complexity 51 (threshold 15). Drivers by points: if/else 25 (33 pts), ternaries 7 (12 pts), boolean chains 5, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/mistral.py"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"8af2b3eebafa8d5950085c0fd9b246146b90c98e8cbef2534ee27f633925239e"}},{"ruleId":"D2","level":"warning","message":{"text":"OpenMoePipelineForwards.openmoe_model_forward (cognitive 50): OpenMoePipelineForwards.openmoe_model_forward has cognitive complexity 50 (threshold 15). Drivers by points: if/else 23 (30 pts), ternaries 11 (15 pts), boolean chains 4, loops 1 (nesting depth added 11). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/openmoe/model/openmoe_policy.py"},"region":{"startLine":231}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b9bf1b0514f2f9edb9bc0c7506ce57c1259a211b8360ab5b7e1772c7db0c8ac"}},{"ruleId":"D2","level":"warning","message":{"text":"WhisperPolicy.get_held_layers (cognitive 50): WhisperPolicy.get_held_layers has cognitive complexity 50 (threshold 15). Drivers by points: if/else 20 (38 pts), boolean chains 6, loops 2 (6 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_whisper_tf4.py"},"region":{"startLine":593}}}],"partialFingerprints":{"codehealthFindingId/v1":"e703ab593c12af8f5e5c7b5de2aa67264378b06c8b8039a92218c511aa90f812"}},{"ruleId":"D2","level":"warning","message":{"text":"WhisperPolicy.get_held_layers (cognitive 50): WhisperPolicy.get_held_layers has cognitive complexity 50 (threshold 15). Drivers by points: if/else 20 (38 pts), boolean chains 6, loops 2 (6 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_whisper_tf5.py"},"region":{"startLine":580}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e0ef5d142c4088d38dbd6940163c1158753f739229f6a55771b8930a8f89f99"}},{"ruleId":"D2","level":"warning","message":{"text":"ShapeConsistencyManager.get_all_all_to_all_spec (cognitive 50): ShapeConsistencyManager.get_all_all_to_all_spec has cognitive complexity 50 (threshold 15). Drivers by points: if/else 15 (39 pts), loops 3 (6 pts), error handling 1 (3 pts), boolean chains 2 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/tensor/shape_consistency.py"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"190dbd85bc8d5097de7484242286e7915fa228af92d739563e50a68961921367"}},{"ruleId":"D2","level":"warning","message":{"text":"MixtralPipelineForwards.mixtral_model_forward (cognitive 49): MixtralPipelineForwards.mixtral_model_forward has cognitive complexity 49 (threshold 15). Drivers by points: if/else 23 (29 pts), ternaries 12 (15 pts), boolean chains 5 (nesting depth added 9). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_mixtral_tf5.py"},"region":{"startLine":528}}}],"partialFingerprints":{"codehealthFindingId/v1":"d06e95582fac01df4dc779d86225fbe0e51f2434fd71aa49509eebb9e8ff34c1"}},{"ruleId":"D2","level":"warning","message":{"text":"Qwen2PipelineForwards.qwen2_model_forward (cognitive 49): Qwen2PipelineForwards.qwen2_model_forward has cognitive complexity 49 (threshold 15). Drivers by points: if/else 21 (30 pts), ternaries 7 (11 pts), boolean chains 7, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen2_tf5.py"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"c57cfce119a7c218635048f779e0bd8ceb386f9e3cd8bbf50d9d4b8915be2344"}},{"ruleId":"D2","level":"warning","message":{"text":"Qwen3PipelineForwards.qwen3_model_forward (cognitive 49): Qwen3PipelineForwards.qwen3_model_forward has cognitive complexity 49 (threshold 15). Drivers by points: if/else 21 (30 pts), ternaries 7 (11 pts), boolean chains 7, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen3_tf5.py"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"5df3445c64cb3d5072ce966638ddcc631741d060b61432de9c61ad43e258b9dd"}},{"ruleId":"D2","level":"warning","message":{"text":"p2p._send_recv_serialization_object (cognitive 48): p2p._send_recv_serialization_object has cognitive complexity 48 (threshold 15). Drivers by points: if/else 25 (39 pts), boolean chains 5, loops 2 (4 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/pipeline/p2p.py"},"region":{"startLine":273}}}],"partialFingerprints":{"codehealthFindingId/v1":"c85ec308ba3972b98b67651be679125aa78ab7f34f54718cd8f78b395df96a38"}},{"ruleId":"D2","level":"warning","message":{"text":"FalconPipelineForwards.falcon_model_forward (cognitive 48): FalconPipelineForwards.falcon_model_forward has cognitive complexity 48 (threshold 15). Drivers by points: if/else 22 (32 pts), ternaries 9 (12 pts), boolean chains 3, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/falcon.py"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa3c800e1312188ea0423d72549c0e3428a726f192f541bc68107659ed872b21"}},{"ruleId":"D2","level":"warning","message":{"text":"DPOTrainer._train (cognitive 47): DPOTrainer._train has cognitive complexity 47 (threshold 15). Drivers by points: if/else 13 (34 pts), ternaries 2 (6 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 27). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/dpo.py"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bc34400c18460a4b7262d339c859ba12a9d9fd80cd26d539b02e0825a3b6075"}},{"ruleId":"D2","level":"warning","message":{"text":"BloomInferenceForwards.bloom_model_forward (cognitive 47): BloomInferenceForwards.bloom_model_forward has cognitive complexity 47 (threshold 15). Drivers by points: if/else 25 (32 pts), ternaries 8 (10 pts), boolean chains 4, loops 1 (nesting depth added 9). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/tensor_parallel/modeling/bloom.py"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f3701ea908a83439537a8add1380e478a2308ab5a4385da543146625bb4013d"}},{"ruleId":"D2","level":"warning","message":{"text":"module_utils.check_colo_module (cognitive 47): module_utils.check_colo_module has cognitive complexity 47 (threshold 15). Drivers by points: if/else 12 (36 pts), loops 4 (11 pts) (nesting depth added 31). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/parallel/layers/module_utils.py"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"a660e5ec02abacc0f7ec2a0bcf3e35d9a8b436409b8c199fc173b0f0fa83aecc"}},{"ruleId":"D2","level":"warning","message":{"text":"common.clip_grad_norm_fp32 (cognitive 47): common.clip_grad_norm_fp32 has cognitive complexity 47 (threshold 15). Drivers by points: if/else 21 (35 pts), boolean chains 6, loops 3 (6 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/utils/common.py"},"region":{"startLine":254}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e9e3941ae4a38c7d099737879a95637227f0ad6c6985b3b2b63ce4132000af2"}},{"ruleId":"D2","level":"warning","message":{"text":"T5BasePolicy.get_held_layers (cognitive 47): T5BasePolicy.get_held_layers has cognitive complexity 47 (threshold 15). Drivers by points: if/else 16 (34 pts), boolean chains 6, loops 2 (6 pts), ternaries 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/t5.py"},"region":{"startLine":501}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a3f04a0b7fcbb58d909376f38b3df0c99da9ebebb396bd503ded125f3221b0e"}},{"ruleId":"D2","level":"warning","message":{"text":"LayoutConverter.all_to_all_transform_layout (cognitive 47): LayoutConverter.all_to_all_transform_layout has cognitive complexity 47 (threshold 15). Drivers by points: if/else 15 (39 pts), error handling 1 (3 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/tensor/d_tensor/layout_converter.py"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"57e4fdf8c2f9f69792503d21b61497d75e0701ef16837afdbe8c27cd625ac87e"}},{"ruleId":"D2","level":"warning","message":{"text":"LowLevelZeroOptimizer.state_dict_shard (cognitive 47): LowLevelZeroOptimizer.state_dict_shard has cognitive complexity 47 (threshold 15). Drivers by points: if/else 9 (32 pts), loops 5 (9 pts), boolean chains 6 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/low_level/low_level_optim.py"},"region":{"startLine":836}}}],"partialFingerprints":{"codehealthFindingId/v1":"60b7d925de03196a1498709dddb0ee1fcde1e95f25f613acc11983841d92ba47"}},{"ruleId":"D2","level":"warning","message":{"text":"CheckpointSolverRotor._compute_table (cognitive 46): CheckpointSolverRotor._compute_table has cognitive complexity 46 (threshold 15). Drivers by points: if/else 12 (36 pts), loops 5 (9 pts), boolean chains 1 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/checkpoint/ckpt_solver_rotor.py"},"region":{"startLine":209}}}],"partialFingerprints":{"codehealthFindingId/v1":"de9cf8d29bca243237731d71eaca0642817c6557ee41bbced1f8811f6485ffe1"}},{"ruleId":"D2","level":"warning","message":{"text":"GenerateSchedule.generate_step_broadcast (cognitive 46): GenerateSchedule.generate_step_broadcast has cognitive complexity 46 (threshold 15). Drivers by points: if/else 11 (35 pts), boolean chains 6, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/pipeline/schedule/generate.py"},"region":{"startLine":348}}}],"partialFingerprints":{"codehealthFindingId/v1":"a702c88657c15379130dc0bdc1bb5e6ffc0c80c1d3e486a1e9caa177ff9d670f"}},{"ruleId":"D2","level":"warning","message":{"text":"GPTJPipelineForwards.gptj_model_forward (cognitive 46): GPTJPipelineForwards.gptj_model_forward has cognitive complexity 46 (threshold 15). Drivers by points: if/else 27 (38 pts), ternaries 5 (6 pts), boolean chains 1, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/gptj.py"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fdecb07d21da2bb47d5becb64b8f66b9b196e54dd5171ab3559be0ea0cbe631"}},{"ruleId":"D2","level":"warning","message":{"text":"LowLevelZeroOptimizer.step (cognitive 46): LowLevelZeroOptimizer.step has cognitive complexity 46 (threshold 15). Drivers by points: if/else 12 (29 pts), loops 6 (9 pts), error handling 1 (4 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/low_level/low_level_optim.py"},"region":{"startLine":537}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c5b8275bff6aed51991a2a3b982c3d1154e90d89dddbb1d7c8fb9b4e49ddad0"}},{"ruleId":"D2","level":"warning","message":{"text":"llama.llama_model_forward (cognitive 45): llama.llama_model_forward has cognitive complexity 45 (threshold 15). Drivers by points: if/else 22 (27 pts), ternaries 11 (15 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/quant/smoothquant/models/llama.py"},"region":{"startLine":559}}}],"partialFingerprints":{"codehealthFindingId/v1":"7983dc365beaa54866147b3c32b89df3e1aed34125e9c25076a4c2cf73ad1c52"}},{"ruleId":"D2","level":"warning","message":{"text":"NaiveExperienceMaker.make_experience (cognitive 44): NaiveExperienceMaker.make_experience has cognitive complexity 44 (threshold 15). Drivers by points: if/else 19 (32 pts), loops 5 (10 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/experience_maker/naive.py"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"609273733a29355756e371c6936b2b12315cdeab68f30a99977474dd5cb0d2cf"}},{"ruleId":"D2","level":"warning","message":{"text":"HybridParallelPlugin.__init__ (cognitive 44): HybridParallelPlugin.__init__ has cognitive complexity 44 (threshold 15). Drivers by points: if/else 21 (31 pts), boolean chains 8, ternaries 2 (5 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/plugin/hybrid_parallel_plugin.py"},"region":{"startLine":947}}}],"partialFingerprints":{"codehealthFindingId/v1":"5dd8ecf81adbc6b29d5e0abe573eea01a5e5bbf4c31bcb106e844c43349b6790"}},{"ruleId":"D2","level":"warning","message":{"text":"fx.find_output_in_partition (cognitive 44): fx.find_output_in_partition has cognitive complexity 44 (threshold 15). Drivers by points: if/else 7 (28 pts), loops 5 (16 pts) (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/pipeline/middleware/adaptor/fx.py"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"f71a32abd01a61c487eb1f733ae2c628c94410ea882e6d542c553d5876cadc86"}},{"ruleId":"D2","level":"warning","message":{"text":"ShardedModelV2._colo_load_from_state_dict (cognitive 44): ShardedModelV2._colo_load_from_state_dict has cognitive complexity 44 (threshold 15). Drivers by points: if/else 13 (31 pts), boolean chains 5, error handling 1 (4 pts), loops 3 (4 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/zero/sharded_model/sharded_model_v2.py"},"region":{"startLine":481}}}],"partialFingerprints":{"codehealthFindingId/v1":"9919e4be6c28b4faee8ad56f331815d697881f1dd9a83f8bcfd3d5ef71ad536d"}},{"ruleId":"D2","level":"warning","message":{"text":"HybridParallelCheckpointIO.save_sharded_optimizer (cognitive 43): HybridParallelCheckpointIO.save_sharded_optimizer has cognitive complexity 43 (threshold 15). Drivers by points: if/else 19 (30 pts), loops 2 (7 pts), boolean chains 6 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":516}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6e47d1409a4cf0e41283119ad3a76af9bdecf7a96ae8bf0a38eb07bfb020f3b"}},{"ruleId":"D2","level":"warning","message":{"text":"GeminiDDP._load_from_state_dict (cognitive 43): GeminiDDP._load_from_state_dict has cognitive complexity 43 (threshold 15). Drivers by points: if/else 14 (26 pts), loops 8 (11 pts), ternaries 2 (4 pts), boolean chains 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/gemini/gemini_ddp.py"},"region":{"startLine":644}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b7fc7bafa84e108248f02c7629ad20b0f73c573c1d581e9aa4e5b2143f611d4"}},{"ruleId":"D2","level":"warning","message":{"text":"LowLevelZeroOptimizer.state_dict (cognitive 43): LowLevelZeroOptimizer.state_dict has cognitive complexity 43 (threshold 15). Drivers by points: if/else 9 (32 pts), loops 3 (6 pts), boolean chains 5 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/low_level/low_level_optim.py"},"region":{"startLine":762}}}],"partialFingerprints":{"codehealthFindingId/v1":"692fac72378fae4519ba50c41e7a60387dae82eb05d809a1cf3cd9ddbbb1b2c8"}},{"ruleId":"D2","level":"warning","message":{"text":"HuggingFaceModel.inference (cognitive 42): HuggingFaceModel.inference has cognitive complexity 42 (threshold 15). Drivers by points: if/else 14 (37 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/models/huggingface.py"},"region":{"startLine":334}}}],"partialFingerprints":{"codehealthFindingId/v1":"71046269dc18ee183370615e723a0c21d993ea9afb3138ee2dfe61a47cd7027d"}},{"ruleId":"D2","level":"warning","message":{"text":"vLLMModel.inference (cognitive 42): vLLMModel.inference has cognitive complexity 42 (threshold 15). Drivers by points: if/else 14 (37 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/models/vllm.py"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"752015120bdd9fda43bb1ee81d947285996604c2b83b4b2119e5b1c2a74eb91f"}},{"ruleId":"D2","level":"warning","message":{"text":"ColoTracer.trace (cognitive 42): ColoTracer.trace has cognitive complexity 42 (threshold 15). Drivers by points: if/else 13 (26 pts), loops 6 (15 pts), boolean chains 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/tracer.py"},"region":{"startLine":317}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef27faa077a1af9c1462ba9502219cdd6896f7c7da40129de8ae690b83ce39fd"}},{"ruleId":"D2","level":"warning","message":{"text":"OpenMoeModel.forward (cognitive 42): OpenMoeModel.forward has cognitive complexity 42 (threshold 15). Drivers by points: if/else 17 (23 pts), ternaries 11 (15 pts), boolean chains 3, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/openmoe/model/modeling_openmoe.py"},"region":{"startLine":705}}}],"partialFingerprints":{"codehealthFindingId/v1":"527dbc46ed3f534f888475cda68c29998a9413718ed3ef2fee5da5e0e55ddebb"}},{"ruleId":"D2","level":"warning","message":{"text":"WorkerBase._get_real_args_kwargs_bwd (cognitive 42): WorkerBase._get_real_args_kwargs_bwd has cognitive complexity 42 (threshold 15). Drivers by points: if/else 11 (28 pts), loops 4 (14 pts) (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/pipeline/rpc/_pipeline_base.py"},"region":{"startLine":715}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a420e8cc0d6b1631125cdd89c18156a4468b151d546e9fbaa9b6f18496ef206"}},{"ruleId":"D2","level":"warning","message":{"text":"Adafactor.step (cognitive 42): Adafactor.step has cognitive complexity 42 (threshold 15). Drivers by points: if/else 15 (39 pts), loops 2 (3 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/adafactor.py"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8574933e5e4a049a379ef7bc21e8428124b028c0d5b55c202c0f3591dfe6503"}},{"ruleId":"D2","level":"warning","message":{"text":"PaddingParallelModule._load_from_state_dict (cognitive 42): PaddingParallelModule._load_from_state_dict has cognitive complexity 42 (threshold 15). Drivers by points: if/else 13 (30 pts), boolean chains 5, loops 3 (4 pts), error handling 1 (3 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/parallel_module.py"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d1ecead3fdca89ec328b2b22c0b42fa8caf52c425be24044df1dd81844ba829"}},{"ruleId":"D2","level":"warning","message":{"text":"_meta_regist_12.meta_index_Tensor (cognitive 41): _meta_regist_12.meta_index_Tensor has cognitive complexity 41 (threshold 15). Drivers by points: if/else 14 (29 pts), loops 7 (12 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/_meta_regist_12.py"},"region":{"startLine":435}}}],"partialFingerprints":{"codehealthFindingId/v1":"66231d8c73207a7910021a2c00caf9d7d8dabe207cb77573af5a4765f735df5a"}},{"ruleId":"D2","level":"warning","message":{"text":"WhisperPipelineForwards.whisper_encoder_forward (cognitive 41): WhisperPipelineForwards.whisper_encoder_forward has cognitive complexity 41 (threshold 15). Drivers by points: if/else 13 (23 pts), ternaries 7 (15 pts), boolean chains 2, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_whisper_tf4.py"},"region":{"startLine":472}}}],"partialFingerprints":{"codehealthFindingId/v1":"faf2f68f8c4717acd1348b49e0bf1b56571b628aa76f463464524c05cdfd006f"}},{"ruleId":"D2","level":"warning","message":{"text":"LowLevelZeroOptimizer._run_reduction (cognitive 41): LowLevelZeroOptimizer._run_reduction has cognitive complexity 41 (threshold 15). Drivers by points: if/else 12 (26 pts), ternaries 2 (8 pts), loops 3 (7 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/low_level/low_level_optim.py"},"region":{"startLine":337}}}],"partialFingerprints":{"codehealthFindingId/v1":"e06f0db849c7a553f134c59158b289c7b492f6ed6f74ec5a201de8f0f5883175"}},{"ruleId":"D2","level":"warning","message":{"text":"ClosedToConstantLengthSplicedDataset.__iter__ (cognitive 40): ClosedToConstantLengthSplicedDataset.__iter__ has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (29 pts), loops 4 (7 pts), error handling 1 (3 pts), boolean chains 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/colossal_llama/dataset/spliced_and_tokenized_dataset.py"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"4986b78efae165cf13e59e56d6f72d483cf720c819a09c0e809b226627ed4556"}},{"ruleId":"D2","level":"warning","message":{"text":"CostGraph._build_cost_graph (cognitive 40): CostGraph._build_cost_graph has cognitive complexity 40 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 7 (17 pts), boolean chains 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/solver/cost_graph.py"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f33820c363767b2ce36b8462e2406931155da6ab8046e9f5ad6e3e3d5fee353"}},{"ruleId":"D2","level":"warning","message":{"text":"HybridParallelCheckpointIO.save_unsharded_optimizer (cognitive 40): HybridParallelCheckpointIO.save_unsharded_optimizer has cognitive complexity 40 (threshold 15). Drivers by points: if/else 14 (28 pts), loops 4 (12 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":909}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5ad3947b8555ce81997ac249b43a06f656764c2b52b3917ee28c4a0c06556de"}},{"ruleId":"D2","level":"warning","message":{"text":"FusedLAMB.step (cognitive 40): FusedLAMB.step has cognitive complexity 40 (threshold 15). Drivers by points: if/else 15 (30 pts), loops 4 (6 pts), ternaries 2 (4 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/fused_lamb.py"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c0cd4d08907b71bde7c94fd3eccecd3f350188ee4cc89fdfb23bf49ed0f7ddb"}},{"ruleId":"D2","level":"warning","message":{"text":"GaLoreAdamW8bit.step (cognitive 40): GaLoreAdamW8bit.step has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (36 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/galore.py"},"region":{"startLine":235}}}],"partialFingerprints":{"codehealthFindingId/v1":"802dd1c84b5852334b2d8ee2f888d228fc798b000a4a812fbb18c6472d0bd896"}},{"ruleId":"D2","level":"warning","message":{"text":"Quantizer.find_params (cognitive 39): Quantizer.find_params has cognitive complexity 39 (threshold 15). Drivers by points: if/else 20 (31 pts), ternaries 2 (6 pts), loops 1 (2 pts) (nesting depth added 16). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/quant/llama_gptq/quant.py"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"9128850cefc9ed5fad1bd9d88e0d21d9269303b06d7965860178902498d6f7e4"}},{"ruleId":"D2","level":"warning","message":{"text":"DPOTrainer._eval (cognitive 39): DPOTrainer._eval has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (23 pts), loops 4 (9 pts), ternaries 2 (6 pts), boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/dpo.py"},"region":{"startLine":406}}}],"partialFingerprints":{"codehealthFindingId/v1":"5dd885c931c1dca85bf4703e041950250afa2187d92962e4a33a6f3d47dc8ad8"}},{"ruleId":"D2","level":"warning","message":{"text":"AsynGreedySolver._call_solver (cognitive 39): AsynGreedySolver._call_solver has cognitive complexity 39 (threshold 15). Drivers by points: if/else 9 (30 pts), loops 3 (7 pts), boolean chains 2 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/offload/solver.py"},"region":{"startLine":320}}}],"partialFingerprints":{"codehealthFindingId/v1":"be66a7805b892d53c456f9ff707f6f098fcdaf38599a3df744e89e9ea830157e"}},{"ruleId":"D2","level":"warning","message":{"text":"runtime_apply_pass._comm_spec_apply (cognitive 39): runtime_apply_pass._comm_spec_apply has cognitive complexity 39 (threshold 15). Drivers by points: if/else 10 (31 pts), loops 3 (7 pts), boolean chains 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/passes/runtime_apply_pass.py"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac065c0c78c3476e142f0fab1986b661b1072ff4afcb4c8f080f24aead0e5668"}},{"ruleId":"D2","level":"warning","message":{"text":"HybridParallelCheckpointIO.save_sharded_model (cognitive 39): HybridParallelCheckpointIO.save_sharded_model has cognitive complexity 39 (threshold 15). Drivers by points: if/else 17 (27 pts), loops 2 (7 pts), boolean chains 5 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":252}}}],"partialFingerprints":{"codehealthFindingId/v1":"97ab79a3e26908ef348d4e73fa9225ecb9f864b5df48d7cece30499181d10d6b"}},{"ruleId":"D2","level":"warning","message":{"text":"PipelineSchedule.forward_backward_step (cognitive 39): PipelineSchedule.forward_backward_step has cognitive complexity 39 (threshold 15). Drivers by points: if/else 18 (29 pts), loops 4 (8 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/engine/schedule/_pipeline_schedule.py"},"region":{"startLine":321}}}],"partialFingerprints":{"codehealthFindingId/v1":"59f6c025cf37d0ced13bfca5fed3aa43c3c9c371a5f34987ba50bbc599399e8d"}},{"ruleId":"D2","level":"warning","message":{"text":"PipelineGraph.print_details (cognitive 39): PipelineGraph.print_details has cognitive complexity 39 (threshold 15). Drivers by points: if/else 5 (20 pts), loops 6 (17 pts), boolean chains 2 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/pipeline/schedule/v_schedule.py"},"region":{"startLine":290}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2fec41d161d485ea17e6ffafb52c5934800a741102baf30de914f92c09d6b12"}},{"ruleId":"D2","level":"warning","message":{"text":"ParallelModule._load_from_state_dict (cognitive 39): ParallelModule._load_from_state_dict has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (27 pts), boolean chains 5, loops 3 (4 pts), error handling 1 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/parallel_module.py"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f79f8491d1fab95f0d4cd55ffc097d1d5ebe5bf0622c7ff5d52b998b5d40f10"}},{"ruleId":"D2","level":"warning","message":{"text":"gpt_evaluate.evaluate (cognitive 38): gpt_evaluate.evaluate has cognitive complexity 38 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 6 (11 pts), ternaries 2 (7 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/evaluate/gpt_evaluate.py"},"region":{"startLine":496}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2f7166a1ee3c7d5294e854a856292c8f5af2302be95a9b76dfcb0eaf6ff1ed8"}},{"ruleId":"D2","level":"warning","message":{"text":"CostGraph.merge_node (cognitive 38): CostGraph.merge_node has cognitive complexity 38 (threshold 15). Drivers by points: if/else 13 (24 pts), loops 8 (14 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/solver/cost_graph.py"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"63b8ff1c31b3031bb793c023fb0afbed1168ffb7b0e021dfc0e3dd59b74d99c5"}},{"ruleId":"D2","level":"warning","message":{"text":"HybridParallelNaiveOptimizer._compute_grad_norm (cognitive 38): HybridParallelNaiveOptimizer._compute_grad_norm has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (32 pts), loops 2 (6 pts) (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: one other method here (HybridParallelAMPOptimizer._compute_grad_norm) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/plugin/hybrid_parallel_plugin.py"},"region":{"startLine":386}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6f73a4f1aa75b53a8f584609c1312da33d161fb3b9c3878b106e5aa0852751f"}},{"ruleId":"D2","level":"warning","message":{"text":"HybridParallelAMPOptimizer._compute_grad_norm (cognitive 38): HybridParallelAMPOptimizer._compute_grad_norm has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (32 pts), loops 2 (6 pts) (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: one other method here (HybridParallelNaiveOptimizer._compute_grad_norm) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/plugin/hybrid_parallel_plugin.py"},"region":{"startLine":590}}}],"partialFingerprints":{"codehealthFindingId/v1":"42b73da6222a861dc75128233e7c9188005b8434e442afb04f00e85cc3c37174"}},{"ruleId":"D2","level":"warning","message":{"text":"LlamaPipelineForwards.llama_for_sequence_classification_forward (cognitive 38): LlamaPipelineForwards.llama_for_sequence_classification_forward has cognitive complexity 38 (threshold 15). Drivers by points: if/else 17 (31 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_llama_tf4.py"},"region":{"startLine":377}}}],"partialFingerprints":{"codehealthFindingId/v1":"c59d36b7bc8a0b06b1c8204b7ca2798e28d8ab2235988f1239abb91939b85fb6"}},{"ruleId":"D2","level":"warning","message":{"text":"LlamaPipelineForwards.llama_for_sequence_classification_forward (cognitive 38): LlamaPipelineForwards.llama_for_sequence_classification_forward has cognitive complexity 38 (threshold 15). Drivers by points: if/else 17 (31 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_llama_tf5.py"},"region":{"startLine":419}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee740d910108320e4cb326df44d2780ca47252ca85dab66bc899ee79596902e6"}},{"ruleId":"D2","level":"warning","message":{"text":"Qwen2PipelineForwards.qwen2_for_sequence_classification_forward (cognitive 38): Qwen2PipelineForwards.qwen2_for_sequence_classification_forward has cognitive complexity 38 (threshold 15). Drivers by points: if/else 17 (31 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen2_tf4.py"},"region":{"startLine":368}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb4891749056293d4cf1604160e534b53cb6b29e43d6fe8bd8c2f66b70cf827f"}},{"ruleId":"D2","level":"warning","message":{"text":"BloomPipelineForwards.bloom_for_sequence_classification_forward (cognitive 38): BloomPipelineForwards.bloom_for_sequence_classification_forward has cognitive complexity 38 (threshold 15). Drivers by points: if/else 17 (31 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/bloom.py"},"region":{"startLine":412}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6c94767a88742cb51ae5b19584bf41b90572dc22f716b40a65ebaed2f15649d"}},{"ruleId":"D2","level":"warning","message":{"text":"CheckpointSolverBase._linearize_graph (cognitive 37): CheckpointSolverBase._linearize_graph has cognitive complexity 37 (threshold 15). Drivers by points: if/else 10 (25 pts), loops 3 (6 pts), boolean chains 3, error handling 1 (3 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/checkpoint/ckpt_solver_base.py"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c6328b6e6657d6963e3660ae388402f05b2c1423902d34a6966cbe2270a3897"}},{"ruleId":"D2","level":"warning","message":{"text":"HybridParallelCheckpointIO._model_sharder (cognitive 37): HybridParallelCheckpointIO._model_sharder has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (31 pts), ternaries 1 (3 pts), loops 2, boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"da35e6422f53c3515b17a28e8a38bed30bf848f0900034e3a021ecd692d60a08"}},{"ruleId":"D2","level":"warning","message":{"text":"calc_pipeline_strategy.alpa_dp_impl (cognitive 37): calc_pipeline_strategy.alpa_dp_impl has cognitive complexity 37 (threshold 15). Drivers by points: loops 7 (18 pts), if/else 4 (15 pts), boolean chains 4 (nesting depth added 22). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/device/calc_pipeline_strategy.py"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7c94f8173ef74f8fde93c9d2082564175235d3a898cafc753ecd829e351b7bc"}},{"ruleId":"D2","level":"warning","message":{"text":"activation_checkpoint_codegen.emit_code_with_nested_activation_checkpoint (cognitive 37): activation_checkpoint_codegen.emit_code_with_nested_activation_checkpoint has cognitive complexity 37 (threshold 15). Drivers by points: if/else 10 (24 pts), loops 4 (12 pts), boolean chains 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/codegen/activation_checkpoint_codegen.py"},"region":{"startLine":400}}}],"partialFingerprints":{"codehealthFindingId/v1":"14b0f11cb3d84af253b21ef57220c2cd9d86211df52dc0239110c0f997384d79"}},{"ruleId":"D2","level":"warning","message":{"text":"TraceFlow._assign_single_node_flow (cognitive 36): TraceFlow._assign_single_node_flow has cognitive complexity 36 (threshold 15). Drivers by points: if/else 17 (33 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/autochunk/trace_flow.py"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"c283a46373284dbbbdf6774137749cb13064b23268a4a0df3ea1f2d8449bae9c"}},{"ruleId":"D2","level":"warning","message":{"text":"ColoTracer._meta_data_computing (cognitive 36): ColoTracer._meta_data_computing has cognitive complexity 36 (threshold 15). Drivers by points: if/else 19 (30 pts), boolean chains 3, loops 1 (2 pts), error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/tracer.py"},"region":{"startLine":218}}}],"partialFingerprints":{"codehealthFindingId/v1":"aff3f39f9e8c27d1f4615b04e72fa6e86d7c20b06b3f4313dfc4c9032f89beaa"}},{"ruleId":"D2","level":"warning","message":{"text":"LlamaInferenceForwards.llama_model_forward (cognitive 36): LlamaInferenceForwards.llama_model_forward has cognitive complexity 36 (threshold 15). Drivers by points: if/else 17 (20 pts), ternaries 9 (13 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/tensor_parallel/modeling/llama.py"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b9c129cc7c676b3b439a8d5b205310250f4ce560de9047e5f5908ad001725a5"}},{"ruleId":"D2","level":"warning","message":{"text":"FalconPipelineForwards.falcon_for_sequence_classification_forward (cognitive 36): FalconPipelineForwards.falcon_for_sequence_classification_forward has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (29 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/falcon.py"},"region":{"startLine":453}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd18e83d9fe80cc9756dc6f29115f39727e157f661b465f5ffaaae442d79090f"}},{"ruleId":"D2","level":"warning","message":{"text":"ShapeConsistencyManager.get_all_mix_gather_spec (cognitive 36): ShapeConsistencyManager.get_all_mix_gather_spec has cognitive complexity 36 (threshold 15). Drivers by points: if/else 8 (24 pts), loops 3 (6 pts), boolean chains 3, error handling 1 (3 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/tensor/shape_consistency.py"},"region":{"startLine":340}}}],"partialFingerprints":{"codehealthFindingId/v1":"04e5a3efe85f0cc71e58d1c348a8317fdcc2fd3e44de77876d9077232718e12c"}},{"ruleId":"D2","level":"warning","message":{"text":"GeminiOptimizer._maybe_move_fp32_params (cognitive 36): GeminiOptimizer._maybe_move_fp32_params has cognitive complexity 36 (threshold 15). Drivers by points: if/else 5 (19 pts), loops 5 (15 pts), boolean chains 2 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/gemini/gemini_optimizer.py"},"region":{"startLine":313}}}],"partialFingerprints":{"codehealthFindingId/v1":"47f032f08ba0ad1e2886fe157e3d7c64d0ebbbf33420168485a37e382af8bba5"}},{"ruleId":"D2","level":"warning","message":{"text":"launch_zero_bubble.launch_distributed (cognitive 35): launch_zero_bubble.launch_distributed has cognitive complexity 35 (threshold 15). Drivers by points: loops 14 (23 pts), if/else 7 (11 pts), boolean chains 1 (nesting depth added 13). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/launch_zero_bubble.py"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee5d892b7c61de336e427a5240ff927046d2cd7efe09c8bf553628ecdf9c685a"}},{"ruleId":"D2","level":"warning","message":{"text":"ColoTracer.trace (cognitive 35): ColoTracer.trace has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 4 (12 pts), boolean chains 1 (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/fx/tracer/tracer.py"},"region":{"startLine":166}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0dbe1e9759a23cb3dbe13c44d73e99ba104f8a0f1616bee3022d96f90651266"}},{"ruleId":"D2","level":"warning","message":{"text":"TraceFlow._get_input_nodes_dim (cognitive 35): TraceFlow._get_input_nodes_dim has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (31 pts), loops 3 (4 pts) (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/autochunk/trace_flow.py"},"region":{"startLine":197}}}],"partialFingerprints":{"codehealthFindingId/v1":"6382d33c66e4d78fee2b359c7e6da55f55898fe2e60f636dd69f12747739fa50"}},{"ruleId":"D2","level":"warning","message":{"text":"TraceIndice._assign_view_reshape_indice (cognitive 35): TraceIndice._assign_view_reshape_indice has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (20 pts), loops 9 (13 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/autochunk/trace_indice.py"},"region":{"startLine":718}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b0266afc785e5a9e3822cd9b69b26ca4a96a3e662339718faadee01c7603468"}},{"ruleId":"D2","level":"warning","message":{"text":"HybridParallelCheckpointIO.save_unsharded_model (cognitive 35): HybridParallelCheckpointIO.save_unsharded_model has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (24 pts), loops 3 (11 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":808}}}],"partialFingerprints":{"codehealthFindingId/v1":"93c41d884c011aa899ffca087f50dedc915b4f3b9151acc9b2d61108c1069b73"}},{"ruleId":"D2","level":"warning","message":{"text":"MoECheckpointIO.save_sharded_model (cognitive 35): MoECheckpointIO.save_sharded_model has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 7, loops 2 (7 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/moe_checkpoint.py"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"de5a82ddcf23191eed08924b92fcae98357dca00dd3aeefc409d2d0b5889000b"}},{"ruleId":"D2","level":"warning","message":{"text":"MoECheckpointIO.gather_from_sharded_optimizer_state (cognitive 35): MoECheckpointIO.gather_from_sharded_optimizer_state has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (29 pts), boolean chains 3, ternaries 2, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/moe_checkpoint.py"},"region":{"startLine":291}}}],"partialFingerprints":{"codehealthFindingId/v1":"32ca6a9d81510c18d26163a2ff4abde80b685bc1f800f44a19d9a2df12e5d9c3"}},{"ruleId":"D2","level":"warning","message":{"text":"p2p._communicate (cognitive 35): p2p._communicate has cognitive complexity 35 (threshold 15). Drivers by points: if/else 19 (23 pts), loops 3 (8 pts), boolean chains 4 (nesting depth added 9). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/communication/p2p.py"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca1ee2161cc27d01874d753086f84b374ad1e716252a364159a1e37391bf8bb1"}},{"ruleId":"D2","level":"warning","message":{"text":"generation._sample_streaming (cognitive 34): generation._sample_streaming has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (23 pts), loops 2 (5 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/models/generation.py"},"region":{"startLine":262}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a4a39db5568d5c5ad753be26d02777ea02c878d007fc9b7795ee855c0366d59"}},{"ruleId":"D2","level":"warning","message":{"text":"QuantLinear.pack (cognitive 34): QuantLinear.pack has cognitive complexity 34 (threshold 15). Drivers by points: loops 11 (27 pts), if/else 5 (7 pts) (nesting depth added 18). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/quant/llama_gptq/quant.py"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9f21421aaa522ca48a36ddf30168310693bf4c61a995eab071aed2cc2296b67"}},{"ruleId":"D2","level":"warning","message":{"text":"GraphAnalyser.liveness_analysis (cognitive 34): GraphAnalyser.liveness_analysis has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (26 pts), loops 4 (8 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/solver/graph_analysis.py"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c52af353c4403cb812ab9f6be7e2edf2bbfeb489aaa406711eec4a52184a607"}},{"ruleId":"D2","level":"warning","message":{"text":"MoECheckpointIO._model_sharder (cognitive 34): MoECheckpointIO._model_sharder has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (23 pts), ternaries 2 (7 pts), boolean chains 2, loops 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/moe_checkpoint.py"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"d128aeb14e316d6697f1313c93be9ac4689f55d90bc2c01cae86a16c5d0ce1bb"}},{"ruleId":"D2","level":"warning","message":{"text":"DistributedLamb.step (cognitive 34): DistributedLamb.step has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (28 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/distributed_lamb.py"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"b261b6dd1130410a05c43e8283ce1c6913dc83ba0be95a4dcba72f14355401ce"}},{"ruleId":"D2","level":"warning","message":{"text":"LowLevelZeroOptimizer.__init__ (cognitive 34): LowLevelZeroOptimizer.__init__ has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (15 pts), loops 7 (13 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/low_level/low_level_optim.py"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"70254ca5e47f106954cf7e1b6e5d00d01a83c914ad04c139db13a3a691f07a6f"}},{"ruleId":"D2","level":"warning","message":{"text":"GRPOTrainer._training_step (cognitive 33): GRPOTrainer._training_step has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 2 (7 pts), error handling 1 (4 pts), boolean chains 3, ternaries 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/grpo.py"},"region":{"startLine":228}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdbb5f428313446f1ffd8747db4eaacccccc4432493ae5b1b0a4a728095d5543"}},{"ruleId":"D2","level":"warning","message":{"text":"conversation.get_batch_prompt (cognitive 33): conversation.get_batch_prompt has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (18 pts), ternaries 2 (9 pts), loops 2 (6 pts) (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/utils/conversation.py"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a88c2077a0510c96db1fca3f45d6715cc97b4843867176fd60c5acb29b399d9"}},{"ruleId":"D2","level":"warning","message":{"text":"module_checkpoint.save_checkpoint (cognitive 33): module_checkpoint.save_checkpoint has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 6 (15 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/utils/checkpoint/module_checkpoint.py"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"68f3ccbde73c4499bb367cfdce5b5ea6bac105e152e462b0bc70e6728c25b0d2"}},{"ruleId":"D2","level":"warning","message":{"text":"module_checkpoint.load_checkpoint (cognitive 33): module_checkpoint.load_checkpoint has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 6 (12 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/utils/checkpoint/module_checkpoint.py"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8774968558abcf10d37fd4fd0f7815ffac9dd42b35de7aff243de32810f2db3"}},{"ruleId":"D2","level":"warning","message":{"text":"p2p._communicate (cognitive 33): p2p._communicate has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 8 (14 pts), boolean chains 11, if/else 5 (6 pts), loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/pipeline/p2p.py"},"region":{"startLine":364}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0227e20643e4fbac82fd04490fd95ba7aa63d8db857c9f50b23f1ba4a5f2f1d"}},{"ruleId":"D2","level":"warning","message":{"text":"OPTPipelineForwards.opt_for_sequence_classification_forward (cognitive 33): OPTPipelineForwards.opt_for_sequence_classification_forward has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (25 pts), ternaries 3 (6 pts), boolean chains 2 (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/opt.py"},"region":{"startLine":359}}}],"partialFingerprints":{"codehealthFindingId/v1":"681ef279878451ce38f0a984598e189078c6ecf9f44b1a587f5d8e5b26855931"}},{"ruleId":"D2","level":"warning","message":{"text":"GeminiDDP.grad_handle (cognitive 33): GeminiDDP.grad_handle has cognitive complexity 33 (threshold 15). Drivers by points: if/else 19 (32 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/gemini/gemini_ddp.py"},"region":{"startLine":358}}}],"partialFingerprints":{"codehealthFindingId/v1":"c438d9be8f1c2407fc586157177a3c17a91a5e03037faa8c813e438e781d25c9"}},{"ruleId":"D2","level":"warning","message":{"text":"PPOTrainer._training_step (cognitive 32): PPOTrainer._training_step has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 2 (7 pts), error handling 1 (4 pts), boolean chains 3, ternaries 3 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/ppo.py"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"39cdc805096cd92dbf5672d4b6253a4ef5de9405903b7cecb05f7eca98986258"}},{"ruleId":"D2","level":"warning","message":{"text":"MoeHybridParallelPlugin.configure (cognitive 32): MoeHybridParallelPlugin.configure has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 7, ternaries 2 (6 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/plugin/moe_hybrid_parallel_plugin.py"},"region":{"startLine":427}}}],"partialFingerprints":{"codehealthFindingId/v1":"30d61abd00109fe82d741f77e15ed480ca92ee20c700f1d0dd5567402661f8bc"}},{"ruleId":"D2","level":"warning","message":{"text":"run.launch_multi_processes (cognitive 32): run.launch_multi_processes has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (19 pts), loops 6 (9 pts), boolean chains 4 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/cli/launcher/run.py"},"region":{"startLine":212}}}],"partialFingerprints":{"codehealthFindingId/v1":"084208388774dec3ddde793643454248b4152ebec92d6355a5b1fe8507ff2ccd"}},{"ruleId":"D2","level":"warning","message":{"text":"InterleavedSchedule.run_forward_backward (cognitive 32): InterleavedSchedule.run_forward_backward has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 10, loops 3, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/pipeline/schedule/interleaved_pp.py"},"region":{"startLine":441}}}],"partialFingerprints":{"codehealthFindingId/v1":"058e7843e37da59d35b38a019cfefebc6c56b7f3d49aece9f50936944e0c3e58"}},{"ruleId":"D2","level":"warning","message":{"text":"ColoAttention.prepare_attn_kwargs (cognitive 32): ColoAttention.prepare_attn_kwargs has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (27 pts), boolean chains 5 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/attn.py"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"681f5d9c288c5a7655cf16ece2fe826f723e2ec9c5099cb1c0b678deb9be0e32"}},{"ruleId":"D2","level":"warning","message":{"text":"MetaInfoProp.node_handler (cognitive 31): MetaInfoProp.node_handler has cognitive complexity 31 (threshold 15). Drivers by points: loops 8 (17 pts), if/else 5 (13 pts), boolean chains 1 (nesting depth added 17). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/passes/meta_info_prop.py"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbecc0b08b793c80c840c8b0bccbc00341c54f3aac8c7a37f0eedf43153514f2"}},{"ruleId":"D2","level":"warning","message":{"text":"reshape.detect_reshape_mapping (cognitive 31): reshape.detect_reshape_mapping has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (28 pts), boolean chains 2, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/utils/reshape.py"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5ad077fe28070f93258428ab428bde051746f40496f0430fde6e8a296ac3ebe"}},{"ruleId":"D2","level":"warning","message":{"text":"MoeHybridParallelPlugin.__init__ (cognitive 31): MoeHybridParallelPlugin.__init__ has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 8, ternaries 2 (5 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/plugin/moe_hybrid_parallel_plugin.py"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"84fc72b87600d2b7aecbe17c1141bf85c40526ed2d2ac1a3a640a516c91498c5"}},{"ruleId":"D2","level":"warning","message":{"text":"loss.dist_cross_entropy (cognitive 31): loss.dist_cross_entropy has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (18 pts), ternaries 2 (8 pts), boolean chains 5 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/loss.py"},"region":{"startLine":262}}}],"partialFingerprints":{"codehealthFindingId/v1":"16b7ae91a2924510a22aa0443e3f87e5176cda2538526841a0db43c9cd05b664"}},{"ruleId":"D2","level":"warning","message":{"text":"_deepseek_v3_tf5.deepseek_v3_model_forward (cognitive 31): _deepseek_v3_tf5.deepseek_v3_model_forward has cognitive complexity 31 (threshold 15). Drivers by points: if/else 17 (22 pts), boolean chains 4, ternaries 3 (4 pts), loops 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_deepseek_v3_tf5.py"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"87eae784ba81e96a6a124d0d1f72d20a1b5a77c2611948f32faaf0b9bfae409f"}},{"ruleId":"D2","level":"warning","message":{"text":"MixtralPipelineForwards.mixtral_for_causal_lm_forward (cognitive 31): MixtralPipelineForwards.mixtral_for_causal_lm_forward has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (21 pts), ternaries 6 (10 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_mixtral_tf5.py"},"region":{"startLine":774}}}],"partialFingerprints":{"codehealthFindingId/v1":"6671c7df7c01d5037bfb13911c7f0f64bc9b7fecee6f05636ed8dbcb3c8ec4a1"}},{"ruleId":"D2","level":"warning","message":{"text":"SFTTrainer._eval (cognitive 30): SFTTrainer._eval has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 4 (9 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/sft.py"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f45c126291267b27c9b70dd28cf03e6271da50c9640d12ce842c176c0523534"}},{"ruleId":"D2","level":"warning","message":{"text":"MoECheckpointIO.pre_save_model (cognitive 30): MoECheckpointIO.pre_save_model has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (24 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/moe_checkpoint.py"},"region":{"startLine":805}}}],"partialFingerprints":{"codehealthFindingId/v1":"89a013b0ba8732b3509d9d628e39b5538a97f5de82c224156ff847eebf8695ce"}},{"ruleId":"D2","level":"warning","message":{"text":"experimental.bias_addition_pass (cognitive 30): experimental.bias_addition_pass has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (24 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/experimental.py"},"region":{"startLine":595}}}],"partialFingerprints":{"codehealthFindingId/v1":"99a2a6619e74ffcfa6cb5e4f9411a611eb702f19c5248eabc9a43f3cc7e8e0c3"}},{"ruleId":"D2","level":"warning","message":{"text":"RequestHandler.schedule (cognitive 30): RequestHandler.schedule has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 5 (15 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/core/request_handler.py"},"region":{"startLine":235}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc37de9a317565da98da1a08d2e4ec7c770086ecfc7e7761a49c0e45e3c93fb5"}},{"ruleId":"D2","level":"warning","message":{"text":"stablediffusion3.sd3_forward (cognitive 30): stablediffusion3.sd3_forward has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 6, loops 2 (4 pts), ternaries 1 (2 pts) (nesting depth added 10). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/modeling/models/stablediffusion3.py"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5b26447a44bb9141892fd2d0ec7f73be2699a66eb2258c6fd68a12592d0aaa0"}},{"ruleId":"D2","level":"warning","message":{"text":"LlamaInferenceForwards.llama_model_forward (cognitive 30): LlamaInferenceForwards.llama_model_forward has cognitive complexity 30 (threshold 15). Drivers by points: if/else 18 (21 pts), boolean chains 4, ternaries 3 (4 pts), loops 1 (nesting depth added 4). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/hybridengine/modeling/llama.py"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"11d174e736b6bd575d301e5ebe373328c54e79d20f4b0ea99e218bdb2e91d3d0"}},{"ruleId":"D2","level":"warning","message":{"text":"BertPipelineForwards.bert_for_sequence_classification_forward (cognitive 30): BertPipelineForwards.bert_for_sequence_classification_forward has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (24 pts), ternaries 2 (4 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":659}}}],"partialFingerprints":{"codehealthFindingId/v1":"4983e3c28bf6393241648538801417afc5ef0182d8d459ad6706d39863c5b218"}},{"ruleId":"D2","level":"warning","message":{"text":"BertPipelineForwards.bert_for_sequence_classification_forward (cognitive 30): BertPipelineForwards.bert_for_sequence_classification_forward has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (24 pts), ternaries 2 (4 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf5.py"},"region":{"startLine":672}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f1d1397fe8d5eab1082602140004f32461f66e0eba2da89d228c87fbd507aab"}},{"ruleId":"D2","level":"warning","message":{"text":"MistralForwards.mistral_for_sequence_classification_forward (cognitive 30): MistralForwards.mistral_for_sequence_classification_forward has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (27 pts), boolean chains 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/mistral.py"},"region":{"startLine":276}}}],"partialFingerprints":{"codehealthFindingId/v1":"987e8e4d6e0e6583d7ad36d1a5c87734ab3035a3b54a20bf6b028db82c0332db"}},{"ruleId":"D2","level":"warning","message":{"text":"ColoTracer._post_check (cognitive 29): ColoTracer._post_check has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 3 (11 pts) (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/fx/tracer/tracer.py"},"region":{"startLine":306}}}],"partialFingerprints":{"codehealthFindingId/v1":"43b314de37411e4fba1d9119e8541735628eb84bdc93c6c93c3de5b90d5f0a8e"}},{"ruleId":"D2","level":"warning","message":{"text":"factory.find_repeat_blocks (cognitive 29): factory.find_repeat_blocks has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 5 (8 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/utils/factory.py"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a80b18266135b2750054cf1581dccb9b8ec75a73b799557897bc02e111cec9a"}},{"ruleId":"D2","level":"warning","message":{"text":"MoECheckpointIO.save_sharded_optimizer (cognitive 29): MoECheckpointIO.save_sharded_optimizer has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 2 (7 pts), boolean chains 5 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/moe_checkpoint.py"},"region":{"startLine":431}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a03543094071ca5059407a7cf8ffc25d28be8b44a83d3936e68a72e8edc58ca"}},{"ruleId":"D2","level":"warning","message":{"text":"ColoTracer._post_check (cognitive 29): ColoTracer._post_check has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 3 (11 pts) (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/experimental.py"},"region":{"startLine":334}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd36eaa63c9e267674e83cb8bb1944a45d5bd0fcdb090066dcc8a412e7b62261"}},{"ruleId":"D2","level":"warning","message":{"text":"CAME.step (cognitive 29): CAME.step has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (26 pts), loops 2 (3 pts) (nesting depth added 16). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/came.py"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"de1eb716a1848a15e7bf1fe6bafaabe5879e0494294db501e448794de5a2b17b"}},{"ruleId":"D2","level":"warning","message":{"text":"HybridAdam.step (cognitive 29): HybridAdam.step has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (18 pts), ternaries 2 (6 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/hybrid_adam.py"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf3d9124c4b03eaf5935c10facabd208b63f3d521a1ad0dab04704ca533922a7"}},{"ruleId":"D2","level":"warning","message":{"text":"bnb._replace_with_bnb_layers (cognitive 29): bnb._replace_with_bnb_layers has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/quantization/bnb.py"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bb90f189ca791db8476653f4fb5aa2e0935ad55690baf66cd90dc410fef0786"}},{"ruleId":"D2","level":"warning","message":{"text":"Distributor.loop (cognitive 28): Distributor.loop has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 3 (9 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/zero_bubble/distributor.py"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"0dfa035354771f07421fd3444f54b7f9ca5fb3f0b3a3ed9876c6953f92461848"}},{"ruleId":"D2","level":"warning","message":{"text":"runtime_apply_pass._shape_consistency_apply (cognitive 28): runtime_apply_pass._shape_consistency_apply has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 3 (7 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/passes/runtime_apply_pass.py"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddec9e2e955ccac94dbe27c4e3e52c2c4c02dfd371748c39a0acaf8f98c534ce"}},{"ruleId":"D2","level":"warning","message":{"text":"StrategiesConstructor.build_strategies_and_cost (cognitive 28): StrategiesConstructor.build_strategies_and_cost has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (25 pts), loops 3 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/solver/strategies_constructor.py"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd87f1ee8a911d9c0c9d861118aef6f1f1ce6ddbfecc73be40fefc70fafdcbd0"}},{"ruleId":"D2","level":"warning","message":{"text":"activation_checkpoint_codegen.emit_ckpt_func (cognitive 28): activation_checkpoint_codegen.emit_ckpt_func has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 3 (8 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/codegen/activation_checkpoint_codegen.py"},"region":{"startLine":302}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a459095c9c60f625e6c25d71c4040be1a7122675da25d671dca95fbcf5ecd3e"}},{"ruleId":"D2","level":"warning","message":{"text":"bnb.find_tied_parameters (cognitive 28): bnb.find_tied_parameters has cognitive complexity 28 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 3 (7 pts), ternaries 2 (5 pts) (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/quantization/bnb.py"},"region":{"startLine":261}}}],"partialFingerprints":{"codehealthFindingId/v1":"73fa31141ef344721ef59af88da7364e22929cfb8732e1f4936899f4f541d17a"}},{"ruleId":"D2","level":"warning","message":{"text":"comparison.check_state_dict_equal (cognitive 28): comparison.check_state_dict_equal has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (24 pts), loops 2 (4 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/testing/comparison.py"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"930cf0995af69d3e03af5a0f437aa1a09b4fcd50f15c3704c12528770f574aa6"}},{"ruleId":"D2","level":"warning","message":{"text":"GeminiDDP._save_to_state_dict (cognitive 28): GeminiDDP._save_to_state_dict has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (15 pts), ternaries 3 (8 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/gemini/gemini_ddp.py"},"region":{"startLine":534}}}],"partialFingerprints":{"codehealthFindingId/v1":"0dec8fb741d103ce6b5128416cf804b29e15d88fb60f23d4a8c5786a4d3dac2d"}},{"ruleId":"D2","level":"warning","message":{"text":"spliced_and_tokenized_dataset.supervised_tokenize_sft (cognitive 27): spliced_and_tokenized_dataset.supervised_tokenize_sft has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 4, boolean chains 3, ternaries 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/colossal_llama/dataset/spliced_and_tokenized_dataset.py"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"38ae743fe994cbecf10c68f7288472ca605097ef11bf9032b70e353ac34048a0"}},{"ruleId":"D2","level":"warning","message":{"text":"KTOTrainer._train (cognitive 27): KTOTrainer._train has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (20 pts), ternaries 2 (4 pts), boolean chains 2, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/kto.py"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ad6ea1161a02c0668da642a2bfd80bca427673fb8363e264146bba93a315bc7"}},{"ruleId":"D2","level":"warning","message":{"text":"SFTTrainer._train (cognitive 27): SFTTrainer._train has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 2 (4 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/sft.py"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"a894fe239ee789071ae05ac00deb8716f64132fc654492aa25c1fa52f3a5aba0"}},{"ruleId":"D2","level":"warning","message":{"text":"train.main (cognitive 27): train.main has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 2 (3 pts), ternaries 2 (3 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalMoE/train.py"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6f1a423b679c7d406a4ac1b7dd52bef31c3f4801a625cac1343392a05386b52"}},{"ruleId":"D2","level":"warning","message":{"text":"PermuteHandler.get_operation_data_mapping (cognitive 27): PermuteHandler.get_operation_data_mapping has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 3 (5 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/permute_handler.py"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d21c6160fb197786ee3587ce271b335df2897ca4162c4fd0c40300421fa1c65"}},{"ruleId":"D2","level":"warning","message":{"text":"HybridParallelPlugin.configure (cognitive 27): HybridParallelPlugin.configure has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 6, ternaries 2 (6 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/plugin/hybrid_parallel_plugin.py"},"region":{"startLine":1239}}}],"partialFingerprints":{"codehealthFindingId/v1":"646f0d2ab11a220167a68578d2f4173dbdb1f8264625b8ea86854d707ed223f0"}},{"ruleId":"D2","level":"warning","message":{"text":"BaseSmoothForCausalLM.save_quantized (cognitive 27): BaseSmoothForCausalLM.save_quantized has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (18 pts), error handling 1 (5 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 16). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/quant/smoothquant/models/base_model.py"},"region":{"startLine":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"b67e6022b6c22a6f3c10048debcd417dd6d7544654a46425dcfe068f08dfbdaa"}},{"ruleId":"D2","level":"warning","message":{"text":"train.main (cognitive 27): train.main has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/openmoe/train.py"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"d13fca0f5a0dedac618d86408c48cc792c6f032cf4bf753d3105869171e6e308"}},{"ruleId":"D2","level":"warning","message":{"text":"WorkerBase._subscribe_producer (cognitive 27): WorkerBase._subscribe_producer has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 3 (8 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/pipeline/rpc/_pipeline_base.py"},"region":{"startLine":378}}}],"partialFingerprints":{"codehealthFindingId/v1":"662c5afec66f48b20d53062953a848958b24434b1f09deeca6273428c965ba0a"}},{"ruleId":"D2","level":"warning","message":{"text":"Lamb.step (cognitive 27): Lamb.step has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (23 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/lamb.py"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"33ccd780eff796eb84d4d19fda8821f6b1dfa3754cada8a253c4df288a194913"}},{"ruleId":"D2","level":"warning","message":{"text":"p2p._broadcast_object_list (cognitive 27): p2p._broadcast_object_list has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16 (23 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/pipeline/p2p.py"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"41cbb106e639944d30bfb419f92b3e5aad08267fee2e6ef9a865677a50d1fe1a"}},{"ruleId":"D2","level":"warning","message":{"text":"RingAttention.forward (cognitive 27): RingAttention.forward has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16 (21 pts), ternaries 3, boolean chains 2, loops 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/attn.py"},"region":{"startLine":623}}}],"partialFingerprints":{"codehealthFindingId/v1":"561ec8a053d70c2091e1e8983c283fb84a5c0d837ed570c257affd0cc1cd3d4b"}},{"ruleId":"D2","level":"warning","message":{"text":"WhisperPipelineForwards.whisper_model_forward (cognitive 27): WhisperPipelineForwards.whisper_model_forward has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (15 pts), ternaries 6 (10 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_whisper_tf4.py"},"region":{"startLine":845}}}],"partialFingerprints":{"codehealthFindingId/v1":"4317f10424a26f3f5726af2692638ed85be8ac4e99938d56e6b5dde5f0f45e3c"}},{"ruleId":"D2","level":"warning","message":{"text":"WhisperPipelineForwards.whisper_model_forward (cognitive 27): WhisperPipelineForwards.whisper_model_forward has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (18 pts), ternaries 3 (7 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_whisper_tf5.py"},"region":{"startLine":363}}}],"partialFingerprints":{"codehealthFindingId/v1":"08884956428d15299ea5ffee034430906d1a79b1579a05315b41e05613cecf84"}},{"ruleId":"D2","level":"warning","message":{"text":"GeminiDDP.__init__ (cognitive 27): GeminiDDP.__init__ has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (14 pts), loops 5 (7 pts), ternaries 2 (4 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/gemini/gemini_ddp.py"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"876dfaf3ff798a9afe06111c1c566692baa730ab4090995b2a70ad88d0669848"}},{"ruleId":"D2","level":"warning","message":{"text":"AGIEvalDataset.load (cognitive 26): AGIEvalDataset.load has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 12). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/dataset/agieval.py"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"a17dacf81bd486b6bbfb86bdd19a2d19935f09407bceadf4393959d459e9bceb"}},{"ruleId":"D2","level":"warning","message":{"text":"Conversation.get_prompt (cognitive 26): Conversation.get_prompt has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 4 (8 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/utils/conversation.py"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"42bfd31b839bdf53053d180c54a395de184f434b0d55482a9831ca30c7c192b4"}},{"ruleId":"D2","level":"warning","message":{"text":"runtime_preparation_pass.module_params_sharding_pass (cognitive 26): runtime_preparation_pass.module_params_sharding_pass has cognitive complexity 26 (threshold 15). Drivers by points: loops 5 (14 pts), if/else 5 (11 pts), boolean chains 1 (nesting depth added 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/passes/runtime_preparation_pass.py"},"region":{"startLine":384}}}],"partialFingerprints":{"codehealthFindingId/v1":"994f6ebd0794de558077de6cf1a1ac02eabbe5fcf6f42867a3818a210558d60f"}},{"ruleId":"D2","level":"warning","message":{"text":"TraceFlow._get_all_node_info (cognitive 26): TraceFlow._get_all_node_info has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (20 pts), loops 3 (6 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/autochunk/trace_flow.py"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d05608a948e15bb310befaebf63306e9c7f2f6478c8a4acbf088a250f23bad7"}},{"ruleId":"D2","level":"warning","message":{"text":"HybridParallelCheckpointIO.load_sharded_optimizer (cognitive 26): HybridParallelCheckpointIO.load_sharded_optimizer has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 5 (7 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":694}}}],"partialFingerprints":{"codehealthFindingId/v1":"618233b6ce94268eb3b2262967a1f1af8c5cfef3b6b187bc93c4514987af3994"}},{"ruleId":"D2","level":"warning","message":{"text":"glide_llama.glide_llama_model_forward (cognitive 26): glide_llama.glide_llama_model_forward has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (15 pts), ternaries 7 (8 pts), boolean chains 2, loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/modeling/models/glide_llama.py"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"afa83e54c32d0ca836c1c23f5a9746e87d4273741faa8ceb4231709308c346b2"}},{"ruleId":"D2","level":"warning","message":{"text":"BlipPolicy.module_policy (cognitive 26): BlipPolicy.module_policy has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (21 pts), loops 1 (2 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/blip2.py"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fe780146098adbbbbc074df26a3eb4aafeec458bb3ecfeaae4525dc097ef2d9"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatGLMPolicy.module_policy (cognitive 26): ChatGLMPolicy.module_policy has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16 (20 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/chatglm2.py"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"956da920aab825f710f8824744f80d56d9811ae6738d38dc11c972b728a418e7"}},{"ruleId":"D2","level":"warning","message":{"text":"conversation.setup_conversation_template (cognitive 25): conversation.setup_conversation_template has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (17 pts), error handling 2 (6 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/dataset/conversation.py"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3e64bf3acd2dc01da035c7e64214b67a3622c05ed19438b9f857796b4972ed2"}},{"ruleId":"D2","level":"warning","message":{"text":"comm.ray_broadcast_tensor_dict (cognitive 25): comm.ray_broadcast_tensor_dict has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (20 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/comm.py"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"d06819d9138c92f0bcf7ae1c9338486eaf5869ffe4a932fad06c0ec973f034be"}},{"ruleId":"D2","level":"warning","message":{"text":"generation._sample (cognitive 25): generation._sample has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 2 (4 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/models/generation.py"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"1146112710bb6bc87972ca00f85a16081d8525199cac4e1921f7048aa9263e51"}},{"ruleId":"D2","level":"warning","message":{"text":"agieval.combine_prompt (cognitive 25): agieval.combine_prompt has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 4 (8 pts), boolean chains 4, loops 2 (nesting depth added 7). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/dataset/agieval.py"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"24b38854ba61008909c87c459e314461c45c8f4d1d226c7b04477a27783573ad"}},{"ruleId":"D2","level":"warning","message":{"text":"GaoKaoBenchDataset.load (cognitive 25): GaoKaoBenchDataset.load has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/dataset/gaokaobench.py"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf3d54bf302b2ca430ed737a693418f7783ccd0d1fb87524671348caa26265b7"}},{"ruleId":"D2","level":"warning","message":{"text":"check_pr_runner_policy.validate_fork_workflow (cognitive 25): check_pr_runner_policy.validate_fork_workflow has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 3, loops 2 (3 pts), error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":".github/scripts/ci/check_pr_runner_policy.py"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc90b8a50a89fd54614e3623e8345a37ded4fbf8e275a8e51ca900dddb79f244"}},{"ruleId":"D2","level":"warning","message":{"text":"MatMulHandler.post_process (cognitive 25): MatMulHandler.post_process has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 3 (7 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/matmul_handler.py"},"region":{"startLine":448}}}],"partialFingerprints":{"codehealthFindingId/v1":"99439989e5f6904a56a1d9fa000e5a9c45d12d695bd19ac0850cb5eb0ccde72c"}},{"ruleId":"D2","level":"warning","message":{"text":"MoECheckpointIO.shard_from_complete_optimizer_state (cognitive 25): MoECheckpointIO.shard_from_complete_optimizer_state has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (19 pts), boolean chains 4, loops 1, ternaries 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/moe_checkpoint.py"},"region":{"startLine":734}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfd4fa4d3d7ec30b773458e75161a39fdf1027b2437944a958cf5c1b5edff1ec"}},{"ruleId":"D2","level":"warning","message":{"text":"adding_split_node_pass.balanced_split_pass (cognitive 25): adding_split_node_pass.balanced_split_pass has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 4 (7 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/passes/adding_split_node_pass.py"},"region":{"startLine":232}}}],"partialFingerprints":{"codehealthFindingId/v1":"649b5b220589bcc61d305ee0b95c43c4d04e26a48731629114941f278cd3b902"}},{"ruleId":"D2","level":"warning","message":{"text":"LLMEngine.add_request (cognitive 25): LLMEngine.add_request has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 6, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/core/llm_engine.py"},"region":{"startLine":580}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2fb5f9df5246f86c9f40eb3674e431a4c12fe987ea49895af8133b011a6f8b1"}},{"ruleId":"D2","level":"warning","message":{"text":"GradScaler._unscale_grads_ (cognitive 25): GradScaler._unscale_grads_ has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 5 (8 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/amp/torch_amp/_grad_scaler.py"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"527833a5d466e5bcf417c57d58905a8913ff5a9404ca247fbc29b806fe8615ea"}},{"ruleId":"D2","level":"warning","message":{"text":"PipelineScheduleV2.forward_backward_step (cognitive 25): PipelineScheduleV2.forward_backward_step has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (19 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/engine/schedule/_pipeline_schedule_v2.py"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"1752fec344e633e8d858d111fc1d370f012498b094ae6af3ce81f1fb0546273b"}},{"ruleId":"D2","level":"warning","message":{"text":"ShardedOptimizerV2._maybe_move_fp32_shards (cognitive 25): ShardedOptimizerV2._maybe_move_fp32_shards has cognitive complexity 25 (threshold 15). Drivers by points: if/else 4 (15 pts), loops 3 (10 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/zero/sharded_optim/sharded_optim_v2.py"},"region":{"startLine":304}}}],"partialFingerprints":{"codehealthFindingId/v1":"31f64325fe6c546ce22d36b444e90472fa62e482f6587904bf546276a310f041"}},{"ruleId":"D2","level":"warning","message":{"text":"ZeroBubbleVPipeScheduler.schedule_f (cognitive 25): ZeroBubbleVPipeScheduler.schedule_f has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15 (17 pts), loops 2 (5 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/pipeline/schedule/zero_bubble_pp.py"},"region":{"startLine":638}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d613b4ac0ecd854605c2c7abbdf3feda10ca87cb1fd277efb9e44ad576937eb"}},{"ruleId":"D2","level":"warning","message":{"text":"utils.split_varlen_zigzag (cognitive 25): utils.split_varlen_zigzag has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (22 pts), loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/utils.py"},"region":{"startLine":381}}}],"partialFingerprints":{"codehealthFindingId/v1":"f15f863a7ee3719f1df9d47bfe28d1bc103e015063310ad798aa50892ab9bf40"}},{"ruleId":"D2","level":"warning","message":{"text":"MixtralPipelineForwards.mixtral_for_causal_lm_forward (cognitive 25): MixtralPipelineForwards.mixtral_for_causal_lm_forward has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (18 pts), ternaries 5 (7 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_mixtral_tf4.py"},"region":{"startLine":408}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d84a4b7259ef718d492c5f0c8fc557b38426ef91f4fffe18672d2eb6f2f27bd"}},{"ruleId":"D2","level":"warning","message":{"text":"GPT2PipelineForwards.gpt2_for_sequence_classification_forward (cognitive 25): GPT2PipelineForwards.gpt2_for_sequence_classification_forward has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 3, ternaries 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/gpt2.py"},"region":{"startLine":693}}}],"partialFingerprints":{"codehealthFindingId/v1":"76adc55d3fe2b505cdcd0d70a911c74f56187a49fb48405faac2ec7997d5e7d6"}},{"ruleId":"D2","level":"warning","message":{"text":"GPTJPipelineForwards.gptj_for_sequence_classification_forward (cognitive 25): GPTJPipelineForwards.gptj_for_sequence_classification_forward has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 3, ternaries 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/gptj.py"},"region":{"startLine":356}}}],"partialFingerprints":{"codehealthFindingId/v1":"45893d5a7de83b26e06e4e7a6744e134d44d4031138e6cac3553cdc2d533b787"}},{"ruleId":"D2","level":"warning","message":{"text":"T5PipelineForwards.t5_for_conditional_generation_forward (cognitive 25): T5PipelineForwards.t5_for_conditional_generation_forward has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16 (18 pts), ternaries 3 (4 pts), boolean chains 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/t5.py"},"region":{"startLine":403}}}],"partialFingerprints":{"codehealthFindingId/v1":"01537fdec98549f9f095aadcb0c960a960764e8bd84442550b3c07ebe62f0b3c"}},{"ruleId":"D2","level":"warning","message":{"text":"CommandPolicy.module_policy (cognitive 25): CommandPolicy.module_policy has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 8, ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/command.py"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"e796d806b9b1631ae0f84a5409e11652daf5c7fea537336f389726cfd7775a5f"}},{"ruleId":"D2","level":"warning","message":{"text":"ChineseTextSplitter.split_text (cognitive 24): ChineseTextSplitter.split_text has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 4 (5 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalQA/colossalqa/text_splitter/chinese_text_splitter.py"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"50eb9e79cef109cba908779a50521c34568b3c6a8576a33603530a33c00cf5cb"}},{"ruleId":"D2","level":"warning","message":{"text":"runtime_preparation_pass.solution_annotation_pass (cognitive 24): runtime_preparation_pass.solution_annotation_pass has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 5 (7 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/passes/runtime_preparation_pass.py"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"2005105c902ba5ef7903fc280e1b1c83b2e0de8f6de81336d7fc7c5eb2a9bab0"}},{"ruleId":"D2","level":"warning","message":{"text":"runtime_preparation_pass.size_value_converting_pass (cognitive 24): runtime_preparation_pass.size_value_converting_pass has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/passes/runtime_preparation_pass.py"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"19e863b9f98491160e9e121b80ccbcc556ac62495f4393331548dc87dc106cd9"}},{"ruleId":"D2","level":"warning","message":{"text":"LowLevelZeroCheckpointIO.load_sharded_optimizer (cognitive 24): LowLevelZeroCheckpointIO.load_sharded_optimizer has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/plugin/low_level_zero_plugin.py"},"region":{"startLine":247}}}],"partialFingerprints":{"codehealthFindingId/v1":"4245f72a30395f3871fc7d3b68e7b5c70cd3624ea21c197def0cbf168074b187"}},{"ruleId":"D2","level":"warning","message":{"text":"HybridParallelCheckpointIO.gather_from_sharded_optimizer_state (cognitive 24): HybridParallelCheckpointIO.gather_from_sharded_optimizer_state has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (21 pts), boolean chains 1, loops 1, ternaries 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":1065}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bec6bd623d072b56c9296acb6e0c8af89ac849dbd076376d871fc409737ef71"}},{"ruleId":"D2","level":"warning","message":{"text":"hybrid_parallel_checkpoint_io._route_padded_parameter_aliases (cognitive 24): hybrid_parallel_checkpoint_io._route_padded_parameter_aliases has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 6 (9 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"a04231079241f40de6784e3b3b9b0c68eaa21240010e0dcf7ed6d56f8acb70c0"}},{"ruleId":"D2","level":"warning","message":{"text":"MoECheckpointIO.load_sharded_optimizer (cognitive 24): MoECheckpointIO.load_sharded_optimizer has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 6 (8 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/moe_checkpoint.py"},"region":{"startLine":578}}}],"partialFingerprints":{"codehealthFindingId/v1":"102ac48f2d3dd8126d77dd9f31f17437877ed7eec5687c5b7ffc72408caa3002"}},{"ruleId":"D2","level":"warning","message":{"text":"experimental._meta_data_computing_v0 (cognitive 24): experimental._meta_data_computing_v0 has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (20 pts), loops 1 (2 pts), boolean chains 1, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/experimental.py"},"region":{"startLine":525}}}],"partialFingerprints":{"codehealthFindingId/v1":"227db7765044efb82e83c9cb71e601026b0bda0e55090f2ea9bdd737d6e6d63c"}},{"ruleId":"D2","level":"warning","message":{"text":"p2p_v2._broadcast_object_list (cognitive 24): p2p_v2._broadcast_object_list has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/communication/p2p_v2.py"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd1eb0fbf7e0eba83308f256b009ae104a6ac7053f9798e31162ed9fdc74252b"}},{"ruleId":"D2","level":"warning","message":{"text":"BaseSmoothForCausalLM.from_quantized (cognitive 24): BaseSmoothForCausalLM.from_quantized has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (18 pts), loops 3 (6 pts) (nesting depth added 9). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/quant/smoothquant/models/base_model.py"},"region":{"startLine":363}}}],"partialFingerprints":{"codehealthFindingId/v1":"c68bbfd23676046bfb7ef49bd4334484775589c603eb8ebdf57f87b970b04da6"}},{"ruleId":"D2","level":"warning","message":{"text":"GaLoreProjector.project (cognitive 24): GaLoreProjector.project has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (16 pts), ternaries 2 (6 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/galore.py"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc24ded392eebe657993c60c12736d5e30a2d277bb996aa7ca005df078bf05c3"}},{"ruleId":"D2","level":"warning","message":{"text":"LlamaPolicy.module_policy (cognitive 24): LlamaPolicy.module_policy has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 7, ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_llama_tf4.py"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"86baf7f3d2e053cfaa269a2e097ff7f8eb6216fbf54325c35f3674545503d589"}},{"ruleId":"D2","level":"warning","message":{"text":"verify_image.verify_lora_checkpoints (cognitive 24): verify_image.verify_lora_checkpoints has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 3 (9 pts), if/else 3 (7 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"docker/torch213/verify_image.py"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6bdb838d69374582a1eb75c1735f78bf37e67950bdb356e7f993a8908071b83"}},{"ruleId":"D2","level":"warning","message":{"text":"GSMDataset.load (cognitive 23): GSMDataset.load has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 3 (9 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/dataset/gsm.py"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf7443ab949d54d656eb1c59e1fcd85795f32c92b170f505bb26a5527cf15a5c"}},{"ruleId":"D2","level":"warning","message":{"text":"vLLMModel.get_loss (cognitive 23): vLLMModel.get_loss has cognitive complexity 23 (threshold 15). Drivers by points: loops 6 (13 pts), if/else 6 (10 pts) (nesting depth added 11). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/models/vllm.py"},"region":{"startLine":366}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d3523f5b58b14ca2e3bb08a83c9aad00259792217b0f82a30317d2869e7d48d"}},{"ruleId":"D2","level":"warning","message":{"text":"run.get_launch_command (cognitive 23): run.get_launch_command has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (16 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/cli/launcher/run.py"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"26371d8090613b80bd78cabdac30fa6695442fa6488c200518ab79ca3f55e274"}},{"ruleId":"D2","level":"warning","message":{"text":"SparseMLP._ep_process (cognitive 23): SparseMLP._ep_process has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/layer/layers.py"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"1486435c782845e8432c4a83d1c58886f376bab3e31b2bbeceff6e3159de13e3"}},{"ruleId":"D2","level":"warning","message":{"text":"OpenMoeAttention.forward (cognitive 23): OpenMoeAttention.forward has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (20 pts), ternaries 2, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/openmoe/model/modeling_openmoe.py"},"region":{"startLine":325}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e210dec371878aac7f5cc0372f0aad330a9a275ffdcb50b9f33ac7f35c91f86"}},{"ruleId":"D2","level":"warning","message":{"text":"CachedParamMgr._prepare_rows_on_cuda (cognitive 23): CachedParamMgr._prepare_rows_on_cuda has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (23 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/parallel/layers/cache_embedding/cache_mgr.py"},"region":{"startLine":386}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2c3490d0ccb421a7e2f2031b3d153d709032de3ce2f6eccc8aa5102fb50b4a3"}},{"ruleId":"D2","level":"warning","message":{"text":"fx.find_input_in_partition (cognitive 23): fx.find_input_in_partition has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 4 (9 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/pipeline/middleware/adaptor/fx.py"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2fa29d07d88a05e6830c030aff2bc9ff3b1b1f82e6bd727285f8a803cfd2906"}},{"ruleId":"D2","level":"warning","message":{"text":"ShardedModelV2.__init__ (cognitive 23): ShardedModelV2.__init__ has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 4 (5 pts), boolean chains 3, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/zero/sharded_model/sharded_model_v2.py"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"6604959b1ef358d4c698e3cabe2be86e4e8a2b4ef9189abd66b9b83abb354a77"}},{"ruleId":"D2","level":"warning","message":{"text":"Lars.step (cognitive 23): Lars.step has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/lars.py"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"bec0ece1647a3babf28dca6d9925e9ea8f218c21f830d1f4ff15b70091db16d0"}},{"ruleId":"D2","level":"warning","message":{"text":"WhisperPipelineForwards.whisper_encoder_forward (cognitive 23): WhisperPipelineForwards.whisper_encoder_forward has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 4 (6 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_whisper_tf5.py"},"region":{"startLine":252}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7e06d752c08153a6bd2187a11856cf487536fe83f2f98d06022d270468679f5"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatGLMPolicy.get_held_layers (cognitive 23): ChatGLMPolicy.get_held_layers has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/chatglm2.py"},"region":{"startLine":284}}}],"partialFingerprints":{"codehealthFindingId/v1":"a814c2c7960893b37bfa0e5c1733fd5eb2dba76b6839515165d0321fe073cf72"}},{"ruleId":"D2","level":"warning","message":{"text":"tokenization_utils.tokenize_sft (cognitive 22): tokenization_utils.tokenize_sft has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 3, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/dataset/tokenization_utils.py"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"d64dfb5fea23b4067cd2616fa18bb20fab194b8d3245ef13f4a3fa74b5ea5ad6"}},{"ruleId":"D2","level":"warning","message":{"text":"lora._convert_to_lora_recursively (cognitive 22): lora._convert_to_lora_recursively has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (17 pts), boolean chains 4, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/models/lora.py"},"region":{"startLine":287}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb258be0e994fba27aa0cff7af9e824cdf8ba4489eaa776ddff8a47198ae959a"}},{"ruleId":"D2","level":"warning","message":{"text":"metrics._fix_fracs (cognitive 22): metrics._fix_fracs has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (16 pts), error handling 1 (4 pts), loops 1 (2 pts) (nesting depth added 13). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/evaluate/dataset_evaluator/metrics.py"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ce3aafa44b5ffecf0572dd3bcc707c58619e85f28257745edb2210ba226fada"}},{"ruleId":"D2","level":"warning","message":{"text":"TensorStrategyGenerator.collate_strategies (cognitive 22): TensorStrategyGenerator.collate_strategies has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 5 (9 pts), error handling 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/getitem_generator.py"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2a9d5056ebbf3c8af23f2e079716573e37b622fc197f531c1c3c6d38f48ed12"}},{"ruleId":"D2","level":"warning","message":{"text":"Solver._prepare_data_for_solver (cognitive 22): Solver._prepare_data_for_solver has cognitive complexity 22 (threshold 15). Drivers by points: loops 8 (12 pts), if/else 5 (10 pts) (nesting depth added 9). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/solver/solver.py"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"07108f7c3d1203f16d59925fb78c472a62ced9fc47aa9d4b9bdec564e681d4f2"}},{"ruleId":"D2","level":"warning","message":{"text":"SearchChunk._search_max_chunk_region (cognitive 22): SearchChunk._search_max_chunk_region has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 4 (6 pts), boolean chains 4 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/autochunk/search_chunk.py"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f2135b306ae34f74f0bc96493fa6c581f32bc01b73b8ad5d73a43ac058790c5"}},{"ruleId":"D2","level":"warning","message":{"text":"TraceFlow._get_other_output_info (cognitive 22): TraceFlow._get_other_output_info has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/autochunk/trace_flow.py"},"region":{"startLine":374}}}],"partialFingerprints":{"codehealthFindingId/v1":"4160a2fbbb502842fc9d91ca3de3709bef5269b2a5486709488c7f731baee687"}},{"ruleId":"D2","level":"warning","message":{"text":"NopadLlamaAttention._load_from_state_dict (cognitive 22): NopadLlamaAttention._load_from_state_dict has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (15 pts), error handling 1 (3 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/modeling/models/nopadding_llama.py"},"region":{"startLine":592}}}],"partialFingerprints":{"codehealthFindingId/v1":"63c0b22937b43e99070c1667d440d74ad4b9e5c89db6d8f356b5306c905077c9"}},{"ruleId":"D2","level":"warning","message":{"text":"lazy_init._apply_to_lazy_module (cognitive 22): lazy_init._apply_to_lazy_module has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 2, ternaries 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/lazy/lazy_init.py"},"region":{"startLine":638}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca735985d86051790814d039302a832c1285e4d13766f2cda734baca521bf631"}},{"ruleId":"D2","level":"warning","message":{"text":"PipelineSharedModuleGradientHandler.handle_gradient (cognitive 22): PipelineSharedModuleGradientHandler.handle_gradient has cognitive complexity 22 (threshold 15). Drivers by points: loops 4 (11 pts), if/else 2 (4 pts), ternaries 1 (4 pts), boolean chains 3 (nesting depth added 12). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/engine/gradient_handler/_pipeline_parallel_gradient_handler.py"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2b3e75f98fd114d36542ea353f160386b7f081886237eb7e0eb6ac07c065d68"}},{"ruleId":"D2","level":"warning","message":{"text":"FusedAdam.step (cognitive 22): FusedAdam.step has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/fused_adam.py"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"37eb70c81118efe1d732d62776fe71d5cb6ece9c55d5aaa698a0a0acaac1ba0a"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatGLMForConditionalGeneration.stream_generate (cognitive 22): ChatGLMForConditionalGeneration.stream_generate has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 3 (4 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/chatglm2_6b/modeling_chatglm.py"},"region":{"startLine":1267}}}],"partialFingerprints":{"codehealthFindingId/v1":"bca26a9159f759a757d920d1c745e8fe967b6fb9b0bcb4301e822a8b1f8dd493"}},{"ruleId":"D2","level":"warning","message":{"text":"LlamaPolicy.module_policy (cognitive 22): LlamaPolicy.module_policy has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 7, ternaries 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_llama_tf5.py"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"05e12bfcc77fd3e65b2f1ed51f21056f29c6ec8a63f7ae5c95a59864abd1e3b2"}},{"ruleId":"D2","level":"warning","message":{"text":"prepare_sft_dataset.main (cognitive 21): prepare_sft_dataset.main has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (16 pts), loops 4 (5 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/dataset/prepare_sft_dataset.py"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"12d00eaff7725e644736b425ceb9f4fe7e108a54e30ee573a8f8829faf95ac62"}},{"ruleId":"D2","level":"warning","message":{"text":"colossalai_suite.main (cognitive 21): colossalai_suite.main has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 4, loops 1 (2 pts), ternaries 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":".github/scripts/e1/colossalai_suite.py"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"08f7c517d8057934fb3c46f589355cc52773ab42462e2ab60f407e12047446b2"}},{"ruleId":"D2","level":"warning","message":{"text":"generate_leaderboard_and_send_to_lark.get_issue_pull_request_comments (cognitive 21): generate_leaderboard_and_send_to_lark.get_issue_pull_request_comments has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 2 (4 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":".github/workflows/scripts/generate_leaderboard_and_send_to_lark.py"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"bacca96a8d3d93b551b995d4abac84b8424b75a7c13bc9f2fd8d36b62d1d122a"}},{"ruleId":"D2","level":"warning","message":{"text":"runtime_apply_pass._act_annotation_pass (cognitive 21): runtime_apply_pass._act_annotation_pass has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 3 (7 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/passes/runtime_apply_pass.py"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"47cfa826a1958ee1a7cee80baf36c8685218e0cd4571f8f6c9f694eff77458b8"}},{"ruleId":"D2","level":"warning","message":{"text":"TraceFlow._reassign_reshape_size (cognitive 21): TraceFlow._reassign_reshape_size has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/autochunk/trace_flow.py"},"region":{"startLine":433}}}],"partialFingerprints":{"codehealthFindingId/v1":"37bc3991e77ae4794c518bb2a223075dc116a9744786f3bfb07942f7c835ec53"}},{"ruleId":"D2","level":"warning","message":{"text":"HybridParallelCheckpointIO.shard_from_complete_optimizer_state (cognitive 21): HybridParallelCheckpointIO.shard_from_complete_optimizer_state has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (18 pts), boolean chains 1, loops 1, ternaries 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":1130}}}],"partialFingerprints":{"codehealthFindingId/v1":"80cfc91a31f4f878b7c50f3b7f3a4e80b600923cdf9e64912f811dad25b3906b"}},{"ruleId":"D2","level":"warning","message":{"text":"ColoTracer.create_proxy (cognitive 21): ColoTracer.create_proxy has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/tracer.py"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"a94a98ce56f3e6e2b86713d4f71d773afeeca549703b446d2532d5471747f1cc"}},{"ruleId":"D2","level":"warning","message":{"text":"LLMEngine.init_model (cognitive 21): LLMEngine.init_model has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (15 pts), error handling 2 (4 pts), ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/core/llm_engine.py"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"c186b58c400f1739f3fa9b8df71121b2b6d06517cb7edebaa874793c45ad9e97"}},{"ruleId":"D2","level":"warning","message":{"text":"model.extract_lora_layers (cognitive 21): model.extract_lora_layers has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/interface/model.py"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddee58f5301cb8cd275af5c8c0c83e29d38baf7a67b3cd32bb881e33e0e2ded0"}},{"ruleId":"D2","level":"warning","message":{"text":"InterleavedSchedule.backward_step (cognitive 21): InterleavedSchedule.backward_step has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 3 (7 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/pipeline/schedule/interleaved_pp.py"},"region":{"startLine":343}}}],"partialFingerprints":{"codehealthFindingId/v1":"a45233eb4a370b81d0d8fccdf97b800b5b87d3f832b7b9d0f269e0c3c12b4478"}},{"ruleId":"D2","level":"warning","message":{"text":"OneForwardOneBackwardSchedule.backward_step (cognitive 21): OneForwardOneBackwardSchedule.backward_step has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 3 (7 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/pipeline/schedule/one_f_one_b.py"},"region":{"startLine":284}}}],"partialFingerprints":{"codehealthFindingId/v1":"49637b47dfb0f746a7eea3cccc6e6f0c4105b46676d0b55d338cc0cc2be9f9fe"}},{"ruleId":"D2","level":"warning","message":{"text":"BnbQuantizationConfig.__post_init__ (cognitive 21): BnbQuantizationConfig.__post_init__ has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 5 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/quantization/bnb_config.py"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b3ee66970a8c84f51d09dfc54ff52b8317f5c3f80a42b16abc8347b2b982dd3"}},{"ruleId":"D2","level":"warning","message":{"text":"MixtralPolicy.module_policy (cognitive 21): MixtralPolicy.module_policy has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_mixtral_tf5.py"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7bb8c5c7cc439d650c1ac550eb2bd1d0c8d6b256c997d8b2aff25d339eebf77"}},{"ruleId":"D2","level":"warning","message":{"text":"Qwen2Policy.module_policy (cognitive 21): Qwen2Policy.module_policy has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 5, ternaries 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_qwen2_tf4.py"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"075d4e99df4b7d5cf1151db3c4abe16d0c30639a6cf769c3721bd306beaf5e8f"}},{"ruleId":"D2","level":"warning","message":{"text":"Qwen2Policy.module_policy (cognitive 21): Qwen2Policy.module_policy has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 5, ternaries 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_qwen2_tf5.py"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"b02b35f248260dafbce918f8d408aa072bf9fa69b5bbcc34feeac8e64e018f68"}},{"ruleId":"D2","level":"warning","message":{"text":"Qwen3Policy.module_policy (cognitive 21): Qwen3Policy.module_policy has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 5, ternaries 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_qwen3_tf4.py"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e4630549e96540bc676173dc480e91cedfdb21f31ab98c9e474649fbe4cc5a4"}},{"ruleId":"D2","level":"warning","message":{"text":"Qwen3Policy.module_policy (cognitive 21): Qwen3Policy.module_policy has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 5, ternaries 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_qwen3_tf5.py"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce4fd942c65b958b77e22ad9da8960fb9e78b114ee1f996bb86040b49294ab8f"}},{"ruleId":"D2","level":"warning","message":{"text":"BaseProducer.__init__ (cognitive 20): BaseProducer.__init__ has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16 (17 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/producer.py"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"db919549bdd28a5d024160be4b010f704f864e857bf458e7c96ed75af4717e36"}},{"ruleId":"D2","level":"warning","message":{"text":"ExperienceMakerHolder.update_experience_maker (cognitive 20): ExperienceMakerHolder.update_experience_maker has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/ray/experience_maker_holder.py"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"393c3b7e71bf540b0a6e032e3b0745ccd3143afd4d1be777cd73bfadb0487b23"}},{"ruleId":"D2","level":"warning","message":{"text":"DatasetEvaluator._evaluate (cognitive 20): DatasetEvaluator._evaluate has cognitive complexity 20 (threshold 15). Drivers by points: loops 6 (16 pts), if/else 3 (4 pts) (nesting depth added 11). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/evaluate/dataset_evaluator/dataset_evaluator.py"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"97532e396cd2cf7b0f1b9502eac2127a74b8611efdc2ecb84dbc9a3acd28618e"}},{"ruleId":"D2","level":"warning","message":{"text":"gpt_evaluate.get_gpt_evaluation_without_logprobs (cognitive 20): gpt_evaluate.get_gpt_evaluation_without_logprobs has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 2 (4 pts), error handling 1 (3 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/evaluate/gpt_evaluate.py"},"region":{"startLine":355}}}],"partialFingerprints":{"codehealthFindingId/v1":"85110cf84a7ad89c80bb16fa6e8536d2f20b8b0273dbdb696020d19d5805da7e"}},{"ruleId":"D2","level":"warning","message":{"text":"run_gpu_batch.find_idle (cognitive 20): run_gpu_batch.find_idle has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 3, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":".github/scripts/ci/run_gpu_batch.py"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"023a61637ba536b14fd1aafc189507d2a5aa79e8e7f6e560cd3abbdcac57e2ee"}},{"ruleId":"D2","level":"warning","message":{"text":"MixedPrecisionOptimizer.step (cognitive 20): MixedPrecisionOptimizer.step has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 4 (6 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/amp/naive_amp/mixed_precision_optimizer.py"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae6dae07cb603b624997f487a96eb24e8adde7578cfa695a7b3f3285b70819c8"}},{"ruleId":"D2","level":"warning","message":{"text":"RegionManager._process_shared_region (cognitive 20): RegionManager._process_shared_region has cognitive complexity 20 (threshold 15). Drivers by points: loops 3 (9 pts), if/else 3 (7 pts), boolean chains 4 (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/offload/region_manager.py"},"region":{"startLine":241}}}],"partialFingerprints":{"codehealthFindingId/v1":"afbb7916c27ac86b49e625d57c8818ea8e488af0453126d6a4296baaec0768e3"}},{"ruleId":"D2","level":"warning","message":{"text":"runtime.runtime_asyn_offload_apply_pass (cognitive 20): runtime.runtime_asyn_offload_apply_pass has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 5, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/offload/runtime.py"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa779c3c94effe35b39e54b12ab2346109a9ca43ac1dfdb711242a26cf6dd2c0"}},{"ruleId":"D2","level":"warning","message":{"text":"AsynTrainingSimulator._eval_bwd_mem_per_region (cognitive 20): AsynTrainingSimulator._eval_bwd_mem_per_region has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 3 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/offload/training_simulator.py"},"region":{"startLine":361}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c4142750c661f68c9871a70c4107a581db046288d4f5dbe1a8ac495ddc32271"}},{"ruleId":"D2","level":"warning","message":{"text":"PipelineSchedule._backward_step (cognitive 20): PipelineSchedule._backward_step has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 2 (6 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/engine/schedule/_pipeline_schedule.py"},"region":{"startLine":279}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5351339fe7e1bc0f3c61f5a2b7587550696514db3dc9dc6afaf49034284883e"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatGLM2InferenceForwards.chatglm_for_conditional_generation_forward (cognitive 20): ChatGLM2InferenceForwards.chatglm_for_conditional_generation_forward has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (14 pts), ternaries 3 (4 pts), boolean chains 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/tensor_parallel/modeling/chatglm2.py"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"26401501528647b9f55bc6d1273c885ee40f172b43a1abac696e053317851484"}},{"ruleId":"D2","level":"warning","message":{"text":"SparseMLP._tp_process (cognitive 20): SparseMLP._tp_process has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/layer/layers.py"},"region":{"startLine":303}}}],"partialFingerprints":{"codehealthFindingId/v1":"31b3ef7d32751909fd6b4870b8cddf402f11f1aebc2ea9c77803a03246f98212"}},{"ruleId":"D2","level":"warning","message":{"text":"OpenMoePipelineForwards.llama_for_causal_lm_forward (cognitive 20): OpenMoePipelineForwards.llama_for_causal_lm_forward has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 4 (6 pts), loops 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/openmoe/model/openmoe_policy.py"},"region":{"startLine":409}}}],"partialFingerprints":{"codehealthFindingId/v1":"35dcb8fa6b14ddc16d67b440c914d31b9b3762682502ed6623f8282f7c9c7831"}},{"ruleId":"D2","level":"warning","message":{"text":"module_utils.init_colo_module (cognitive 20): module_utils.init_colo_module has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 4 (10 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/parallel/layers/module_utils.py"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffb7aabda001feffd19578c5a5de92a2f7c3ca0f6de2f8707620af3a9af5bb29"}},{"ruleId":"D2","level":"warning","message":{"text":"fx.get_topology (cognitive 20): fx.get_topology has cognitive complexity 20 (threshold 15). Drivers by points: loops 7 (11 pts), if/else 5 (9 pts) (nesting depth added 8). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/pipeline/middleware/adaptor/fx.py"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"8117246f34a9771c06054378ed54117950d75b916fdad249d16b17881b34a5d5"}},{"ruleId":"D2","level":"warning","message":{"text":"checkpointing.partition_pipeline_parallel_state_dict (cognitive 20): checkpointing.partition_pipeline_parallel_state_dict has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 3 (6 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/utils/checkpointing.py"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d930db4ea4d706b55734dc4693072dbfa7d94707cfaf126ad37adf8838c9a01"}},{"ruleId":"D2","level":"warning","message":{"text":"p2p._batch_send_recv_tensor (cognitive 20): p2p._batch_send_recv_tensor has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/pipeline/p2p.py"},"region":{"startLine":228}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7dbe51eebc4a8e172660518b2d5ea09ed5d680fd18487ed9fecbe5d2bd31c1f"}},{"ruleId":"D2","level":"warning","message":{"text":"BertPipelineForwards.bert_for_multiple_choice_forward (cognitive 20): BertPipelineForwards.bert_for_multiple_choice_forward has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 8 (11 pts), if/else 7 (9 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":828}}}],"partialFingerprints":{"codehealthFindingId/v1":"cce0b8a5aa104273ee957a2e0afa72a85625f04d3879914e79f4d982e17e35db"}},{"ruleId":"D2","level":"warning","message":{"text":"BertPipelineForwards.bert_for_multiple_choice_forward (cognitive 20): BertPipelineForwards.bert_for_multiple_choice_forward has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 8 (11 pts), if/else 7 (9 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf5.py"},"region":{"startLine":841}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e2aa9e55e27994f9d44e964e341080608e4813e6669fa832d64eb5f9c12b8ad"}},{"ruleId":"D2","level":"warning","message":{"text":"LlamaPipelineForwards.llama_for_causal_lm_forward (cognitive 20): LlamaPipelineForwards.llama_for_causal_lm_forward has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 4 (6 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_llama_tf4.py"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"3469c218dfcc5b0d3d67d4761708b79b208ce281bb9e12f44d974817c1744086"}},{"ruleId":"D2","level":"warning","message":{"text":"LlamaPipelineForwards.llama_for_causal_lm_forward (cognitive 20): LlamaPipelineForwards.llama_for_causal_lm_forward has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 4 (6 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_llama_tf5.py"},"region":{"startLine":306}}}],"partialFingerprints":{"codehealthFindingId/v1":"9790972df31a19e65cedf527c3926a286284d6b86c6ec0ec242e1d7054c24087"}},{"ruleId":"D2","level":"warning","message":{"text":"Qwen2PipelineForwards.qwen2_for_sequence_classification_forward (cognitive 20): Qwen2PipelineForwards.qwen2_for_sequence_classification_forward has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (15 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen2_tf5.py"},"region":{"startLine":278}}}],"partialFingerprints":{"codehealthFindingId/v1":"73636119f9de5abe99a45c5a66fab99193208cb58d6a99383f4a820cf1098a5c"}},{"ruleId":"D2","level":"warning","message":{"text":"Qwen3PipelineForwards.qwen3_for_sequence_classification_forward (cognitive 20): Qwen3PipelineForwards.qwen3_for_sequence_classification_forward has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (15 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen3_tf4.py"},"region":{"startLine":366}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f29bf9824b1cc84828b0e72f39e747582bf10e87bdb5984b5ebd2032187719a"}},{"ruleId":"D2","level":"warning","message":{"text":"Qwen3PipelineForwards.qwen3_for_sequence_classification_forward (cognitive 20): Qwen3PipelineForwards.qwen3_for_sequence_classification_forward has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (15 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen3_tf5.py"},"region":{"startLine":279}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a1c4b621005334a812ce5a0dd58316ffe0e5daa8a61b477b08483047c763165"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatGLMModel.forward (cognitive 20): ChatGLMModel.forward has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 3, ternaries 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/chatglm2_6b/modeling_chatglm.py"},"region":{"startLine":916}}}],"partialFingerprints":{"codehealthFindingId/v1":"a53b6301aaad15ab5c7a5651d93e9108d7f9eb3a73e6e8a919783e7a6ee0f5b7"}},{"ruleId":"D2","level":"warning","message":{"text":"T5PipelineForwards.t5_model_forward (cognitive 20): T5PipelineForwards.t5_model_forward has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 2, ternaries 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/t5.py"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"4602dce68a158fbd39d9458efc829dc997d28b5c3d038e60addfb5da5b8ff6d7"}},{"ruleId":"D2","level":"warning","message":{"text":"MixtralPolicy.module_policy (cognitive 20): MixtralPolicy.module_policy has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_mixtral_tf4.py"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"1552086b39bc84bcf2b73fff580537be0355be9b6a213ab4f6d44707c1cd242c"}},{"ruleId":"D2","level":"warning","message":{"text":"DeepseekPolicy.module_policy (cognitive 20): DeepseekPolicy.module_policy has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/deepseek.py"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"9594e9f34e6674391913f4219abce40f283dc5bb2a2b26c906ce8f61882b6b6b"}},{"ruleId":"D2","level":"warning","message":{"text":"stream_chat_patch.stream_generate (cognitive 19): stream_chat_patch.stream_generate has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 4 (5 pts), boolean chains 1, loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/colossal_llama/utils/stream_chat_patch.py"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"677f3d12fce3f59d8e491cca531d7f6bce143fddea0c912e673f55e2073564f1"}},{"ruleId":"D2","level":"warning","message":{"text":"gpt_judge.get_mtbench_judgements (cognitive 19): gpt_judge.get_mtbench_judgements has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 4, loops 1 (nesting depth added 7). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/evaluate/dataset_evaluator/gpt_judge.py"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"7230b52e047718ded50dcc92aed781206a8e9e5436e67e687c82fc333dd0def1"}},{"ruleId":"D2","level":"warning","message":{"text":"linear.matmul_meta_info (cognitive 19): linear.matmul_meta_info has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 5, loops 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/meta_profiler/meta_registry/linear.py"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"41ba2f8aeb5b9a5f2d627b588312097e107b2d5624cdaf5da38b59e2757a24b7"}},{"ruleId":"D2","level":"warning","message":{"text":"autochunk_codegen._add_node_slice (cognitive 19): autochunk_codegen._add_node_slice has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (8 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/autochunk/autochunk_codegen.py"},"region":{"startLine":211}}}],"partialFingerprints":{"codehealthFindingId/v1":"c20d7e762af9d719360b74de31e28de0a3aa9d6e5afcc8faf3cd561a3e4ce8dd"}},{"ruleId":"D2","level":"warning","message":{"text":"EstimateMemory._get_tmp_memory (cognitive 19): EstimateMemory._get_tmp_memory has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/autochunk/estimate_memory.py"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9024c212629906cfca3509276c79d385a7a8b0c3c0af6d57786b47573a9890e"}},{"ruleId":"D2","level":"warning","message":{"text":"EstimateMemory.estimate_chunk_inference_mem (cognitive 19): EstimateMemory.estimate_chunk_inference_mem has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 3 (5 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/autochunk/estimate_memory.py"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4325828a1c04e001abeb27e860d5d2638e264d1bd127181a281512da232d170"}},{"ruleId":"D2","level":"warning","message":{"text":"TraceIndice._assign_getitem_indice (cognitive 19): TraceIndice._assign_getitem_indice has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 4, ternaries 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/autochunk/trace_indice.py"},"region":{"startLine":647}}}],"partialFingerprints":{"codehealthFindingId/v1":"1295273c2480e47ef92539db61b4bcfe4d2faa50984b541fafe105d487751207"}},{"ruleId":"D2","level":"warning","message":{"text":"FP16Optimizer.__init__ (cognitive 19): FP16Optimizer.__init__ has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/amp/naive_amp/_fp16_optimizer.py"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a346dcf66b7918f0cb3fe58ee2b96f3bc8506bd219b3b4b029c141670dbf14f"}},{"ruleId":"D2","level":"warning","message":{"text":"CaiQuantLinear.pack (cognitive 19): CaiQuantLinear.pack has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (9 pts), loops 5 (9 pts), ternaries 1 (nesting depth added 6). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/quant/gptq/cai_gptq/cai_quant_linear.py"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"a86d02350cc8f7a17ea2d5656e7314943b09a23eae3171790a071ea21e8cf04f"}},{"ruleId":"D2","level":"warning","message":{"text":"CachedParamMgr.reorder (cognitive 19): CachedParamMgr.reorder has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/parallel/layers/cache_embedding/cache_mgr.py"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"21d29d8a63ecf141a418e974b76e43f0ee66b69b2eeb1f56380161b4a62989ad"}},{"ruleId":"D2","level":"warning","message":{"text":"WorkerBase._get_input_offsets_by_index (cognitive 19): WorkerBase._get_input_offsets_by_index has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/pipeline/rpc/_pipeline_base.py"},"region":{"startLine":584}}}],"partialFingerprints":{"codehealthFindingId/v1":"d64a1e7c4aa2ad1ffa56aff5cda8f1302777a08ae88c9dae511824fc79c6e06f"}},{"ruleId":"D2","level":"warning","message":{"text":"ColoInitContext._post_init_method (cognitive 19): ColoInitContext._post_init_method has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 5 (6 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/zero/gemini/colo_init_context.py"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9228c342e9cac022f1c558016069168bce519e6db397adead3f9e110ea35b10"}},{"ruleId":"D2","level":"warning","message":{"text":"CPUAdam.step (cognitive 19): CPUAdam.step has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/cpu_adam.py"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7b6d7663565f615cc6cb60d0e1cfefcc695dbbb5b6bf9e285c6ee28963fc614"}},{"ruleId":"D2","level":"warning","message":{"text":"ZeroBubbleVPipeScheduler.backward_b_step (cognitive 19): ZeroBubbleVPipeScheduler.backward_b_step has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 5, loops 1 (2 pts), error handling 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/pipeline/schedule/zero_bubble_pp.py"},"region":{"startLine":517}}}],"partialFingerprints":{"codehealthFindingId/v1":"65d0ad88b6c346659f2c49221750f9332da729e2dc2860506bb1b16ef4dbde3c"}},{"ruleId":"D2","level":"warning","message":{"text":"RingAttention.backward (cognitive 19): RingAttention.backward has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (18 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/attn.py"},"region":{"startLine":942}}}],"partialFingerprints":{"codehealthFindingId/v1":"edd7e61f47aa9bd39494d56d4de6eb4118ac0a0a2c2b4a72ff0d4b25c1c914f7"}},{"ruleId":"D2","level":"warning","message":{"text":"SeqParallelUtils.allreduce_partial_data_grad (cognitive 19): SeqParallelUtils.allreduce_partial_data_grad has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (6 pts), ternaries 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/utils.py"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"1bc74c2d54d605a14d295d68edba97792ed85cde4f2ee81b4f635792e7258d71"}},{"ruleId":"D2","level":"warning","message":{"text":"BertPipelineForwards.bert_for_question_answering_forward (cognitive 19): BertPipelineForwards.bert_for_question_answering_forward has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (14 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":919}}}],"partialFingerprints":{"codehealthFindingId/v1":"880c0bb6c452401b48cd0a60b6b993f0e681ed72703e0db625bc1a92db247b4e"}},{"ruleId":"D2","level":"warning","message":{"text":"BertPipelineForwards.bert_for_question_answering_forward (cognitive 19): BertPipelineForwards.bert_for_question_answering_forward has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (14 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf5.py"},"region":{"startLine":932}}}],"partialFingerprints":{"codehealthFindingId/v1":"1577285923b616309c42f92a7da9156df8b6dfd055ced021e9a404e2565793ce"}},{"ruleId":"D2","level":"warning","message":{"text":"BloomPipelineForwards.bloom_for_question_answering_forward (cognitive 19): BloomPipelineForwards.bloom_for_question_answering_forward has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (14 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/bloom.py"},"region":{"startLine":632}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9b69884dbdbe718bd67cd32f8642f9212ecfb2293ec6a7be954525771228c7a"}},{"ruleId":"D2","level":"warning","message":{"text":"FalconPipelineForwards.falcon_for_question_answering_forward (cognitive 19): FalconPipelineForwards.falcon_for_question_answering_forward has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (14 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/falcon.py"},"region":{"startLine":649}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfd8048cad067ac612ced464ff54479ad5197087568382765594033e336cc7bf"}},{"ruleId":"D2","level":"warning","message":{"text":"GeminiOptimizer.state_shard (cognitive 19): GeminiOptimizer.state_shard has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 2 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/gemini/gemini_optimizer.py"},"region":{"startLine":811}}}],"partialFingerprints":{"codehealthFindingId/v1":"d054c88d4b88ac40e8136570d761bee3d91b1f3be2c922d7592a3ddbd81fb87c"}},{"ruleId":"D2","level":"warning","message":{"text":"BaseProducer.__init__ (cognitive 18): BaseProducer.__init__ has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14 (15 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/zero_bubble/producer.py"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"daf635ad624a6f336efd1773364dcd18106a91b0b1c1feb8c0ab51895f298257"}},{"ruleId":"D2","level":"warning","message":{"text":"DatasetEvaluator._calculate_combined_metrics (cognitive 18): DatasetEvaluator._calculate_combined_metrics has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 4 (7 pts), ternaries 1 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/evaluate/dataset_evaluator/dataset_evaluator.py"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a350d47b57ef6f0f485343ff5e6f956bdc2b8238b3b5c66efc37cbe43dcdc09"}},{"ruleId":"D2","level":"warning","message":{"text":"gpt_evaluate.save_gpt_evaluation_statistics (cognitive 18): gpt_evaluate.save_gpt_evaluation_statistics has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 5 (9 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/evaluate/gpt_evaluate.py"},"region":{"startLine":716}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2e54cc63b809b14120a5656e43e8ce061457daa29b211f8922db14c3f46cc3b"}},{"ruleId":"D2","level":"warning","message":{"text":"check_pr_runner_policy.validate_private_pr_runners (cognitive 18): check_pr_runner_policy.validate_private_pr_runners has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (10 pts), boolean chains 3, loops 2 (3 pts), error handling 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":".github/scripts/ci/check_pr_runner_policy.py"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa7c6bb3482dd9de3885f56f934cdc4d78cea26022dd2db45b3a3ea517dee8aa"}},{"ruleId":"D2","level":"warning","message":{"text":"pr_gpu.select_idle (cognitive 18): pr_gpu.select_idle has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 2, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":".github/scripts/e1/pr_gpu.py"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"1760ea2ccf25fab8174610aaeb17e7b2718e468000d874ac4c0e34702e7eaf82"}},{"ruleId":"D2","level":"warning","message":{"text":"util.compute_act_peak_mem (cognitive 18): util.compute_act_peak_mem has cognitive complexity 18 (threshold 15). Drivers by points: if/else 2 (9 pts), loops 5 (9 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/offload/util.py"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c202e29f1b73d0a0fa0b6060109821870f9c5826cd67991109a79a405f66bc2"}},{"ruleId":"D2","level":"warning","message":{"text":"SumHandler.get_operation_data_mapping (cognitive 18): SumHandler.get_operation_data_mapping has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/sum_handler.py"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"672625b4200af52eacc683bde5f0a4d97990637358029530f2fc1237395e73cf"}},{"ruleId":"D2","level":"warning","message":{"text":"autochunk_codegen.emit_code_with_chunk (cognitive 18): autochunk_codegen.emit_code_with_chunk has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/autochunk/autochunk_codegen.py"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1bb6bb6c0e08b508e2919b5c5907d949f83722109dfb1f801f2b21eebe279c0"}},{"ruleId":"D2","level":"warning","message":{"text":"HybridParallelModule.__init__ (cognitive 18): HybridParallelModule.__init__ has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (13 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/plugin/hybrid_parallel_plugin.py"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"e844407f54e6e6bd2310616b104a32e4df5400df8d01f5a7cea265108814c6b4"}},{"ruleId":"D2","level":"warning","message":{"text":"MoECheckpointIO.load_unsharded_optimizer (cognitive 18): MoECheckpointIO.load_unsharded_optimizer has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 5 (7 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/moe_checkpoint.py"},"region":{"startLine":930}}}],"partialFingerprints":{"codehealthFindingId/v1":"3625e3ff736b301d60c374c507170cceef7dd17519b0996f454fce7327c57b77"}},{"ruleId":"D2","level":"warning","message":{"text":"utils.gather_state_dict_fast (cognitive 18): utils.gather_state_dict_fast has cognitive complexity 18 (threshold 15). Drivers by points: loops 5 (12 pts), if/else 4 (6 pts) (nesting depth added 9). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/utils.py"},"region":{"startLine":1145}}}],"partialFingerprints":{"codehealthFindingId/v1":"99e43f1702065708f73d6c355acaef9d3cebe7e56bc24d0d559203b5231acdcf"}},{"ruleId":"D2","level":"warning","message":{"text":"dataflow.autograd_graph_analysis (cognitive 18): dataflow.autograd_graph_analysis has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/profiler/dataflow.py"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ba6e73373747da0145892c34e1b6c79157548d6b727fbaaa20b6584c919e1fa"}},{"ruleId":"D2","level":"warning","message":{"text":"BatchInferState.init_from_batch (cognitive 18): BatchInferState.init_from_batch has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 3 (8 pts), if/else 6, loops 2 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/tensor_parallel/batch_infer_state.py"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"25720565cf55b56b4f0276e8e18ea8ee406e1c3eea6a2a54202f320b3f6a5a20"}},{"ruleId":"D2","level":"warning","message":{"text":"TPInferEngine.prepare_batch_state (cognitive 18): TPInferEngine.prepare_batch_state has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 3 (8 pts), if/else 6, loops 2 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/tensor_parallel/engine.py"},"region":{"startLine":258}}}],"partialFingerprints":{"codehealthFindingId/v1":"15bdc69b8a5c0e1722f6bbc6bbe3c52259f96fee790b44bf119c1f0f7900b881"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatGLM2InferenceForwards.chatglm_model_forward (cognitive 18): ChatGLM2InferenceForwards.chatglm_model_forward has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, ternaries 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/tensor_parallel/modeling/chatglm2.py"},"region":{"startLine":218}}}],"partialFingerprints":{"codehealthFindingId/v1":"bade941ce5d50ee12e18b9acbdd605f5510ac098ff6d08e7128a7394ac366dbb"}},{"ruleId":"D2","level":"warning","message":{"text":"WorkerBase._get_output_offsets_by_index (cognitive 18): WorkerBase._get_output_offsets_by_index has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 3 (6 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/pipeline/rpc/_pipeline_base.py"},"region":{"startLine":625}}}],"partialFingerprints":{"codehealthFindingId/v1":"10f644c6cef18343582aa447add25c1525229e6670aefbdabfa6b345edee0b27"}},{"ruleId":"D2","level":"warning","message":{"text":"checkpointing.partition_tensor_parallel_state_dict (cognitive 18): checkpointing.partition_tensor_parallel_state_dict has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/utils/checkpointing.py"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b7d0d0043cd33134138ab6d5415d1143af9b5e02a7e3a375ffe5585049061b4"}},{"ruleId":"D2","level":"warning","message":{"text":"bnb.quantize_model (cognitive 18): bnb.quantize_model has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/quantization/bnb.py"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"e302cbc5d6283a9ace63d7fad3a86a8d7f83d6b1342ac0078247bc5392cc9835"}},{"ruleId":"D2","level":"warning","message":{"text":"CoreAttention.forward (cognitive 18): CoreAttention.forward has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/chatglm2_6b/modeling_chatglm.py"},"region":{"startLine":261}}}],"partialFingerprints":{"codehealthFindingId/v1":"31ec3f685ac8f1ed0c999e35824e51fef8b428ab1782b244840c73bd990f1e7e"}},{"ruleId":"D2","level":"warning","message":{"text":"GLMTransformer.forward (cognitive 18): GLMTransformer.forward has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 2, ternaries 2, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/chatglm2_6b/modeling_chatglm.py"},"region":{"startLine":719}}}],"partialFingerprints":{"codehealthFindingId/v1":"70dbbc6ab87f4d8b9c76e67f77ce1f7a793e6bc846df3a2572b263c139e59dde"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatGLMForConditionalGeneration.stream_chat (cognitive 18): ChatGLMForConditionalGeneration.stream_chat has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/chatglm2_6b/modeling_chatglm.py"},"region":{"startLine":1209}}}],"partialFingerprints":{"codehealthFindingId/v1":"3911bbe18823a0e525f219ffe2859d066b750ccae30beb9f9b9a045b1714e650"}},{"ruleId":"D2","level":"warning","message":{"text":"ViTPolicy.module_policy (cognitive 18): ViTPolicy.module_policy has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 3 (8 pts), if/else 5 (6 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_vit_tf5.py"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"67aeff157d89072f213b05336c298d2988a0fb3fcc9a66b06d48b601e48d9859"}},{"ruleId":"D2","level":"warning","message":{"text":"GPT2Policy.module_policy (cognitive 18): GPT2Policy.module_policy has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/gpt2.py"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a1b79f1230c30f22f5a426bc07a9737fed159095c7c11c79ae713e0373ae815"}},{"ruleId":"D2","level":"warning","message":{"text":"ShapeConsistencyManager.get_all_shard_spec (cognitive 18): ShapeConsistencyManager.get_all_shard_spec has cognitive complexity 18 (threshold 15). Drivers by points: loops 5 (9 pts), if/else 4 (6 pts), error handling 1 (3 pts) (nesting depth added 8). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/tensor/shape_consistency.py"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"258fdd0e6e02be11c965ea583aeac66c0b83ddab965433a41307fdd094ba50f7"}},{"ruleId":"D2","level":"warning","message":{"text":"Chunk.shard_move (cognitive 18): Chunk.shard_move has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/gemini/chunk/chunk.py"},"region":{"startLine":321}}}],"partialFingerprints":{"codehealthFindingId/v1":"daa86a7a3a6114a9dcdaffdc99ae4310edcec43e2ea346735787abfc0627ed03"}},{"ruleId":"D2","level":"warning","message":{"text":"search_utils.search_chunk_configuration (cognitive 18): search_utils.search_chunk_configuration has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 6 (8 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/gemini/chunk/search_utils.py"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a4f32d846013a274088b35de0a05913bafe47aa0a81c7a4ae19e1e1e639aea3"}},{"ruleId":"D2","level":"warning","message":{"text":"GeminiOptimizer.__init__ (cognitive 18): GeminiOptimizer.__init__ has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 2, loops 2, ternaries 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/gemini/gemini_optimizer.py"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"7dbf5409346e68d5627815644d1f932d741b4cd78bd1a89eece5b9518c3cd671"}},{"ruleId":"D2","level":"warning","message":{"text":"prepare_pretrain_dataset.main (cognitive 17): prepare_pretrain_dataset.main has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 4 (5 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/dataset/prepare_pretrain_dataset.py"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c4a762da3ae4ff688620acd48d4c340adf300a440e453ff584762895cbdc900"}},{"ruleId":"D2","level":"warning","message":{"text":"loader.apply_chat_template_and_mask (cognitive 17): loader.apply_chat_template_and_mask has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/dataset/loader.py"},"region":{"startLine":351}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6f423ac1962d025602c4c3e7dd60bf140bd610fcba61723c70a11f89ae1fe82"}},{"ruleId":"D2","level":"warning","message":{"text":"metrics.classification_score (cognitive 17): metrics.classification_score has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 6). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/evaluate/dataset_evaluator/metrics.py"},"region":{"startLine":582}}}],"partialFingerprints":{"codehealthFindingId/v1":"16111b15e900237141ddde47cc8ea5c733d3ac26979d4b35b7ebaf2c7428f4ef"}},{"ruleId":"D2","level":"warning","message":{"text":"MixedPrecisionOptimizer.__init__ (cognitive 17): MixedPrecisionOptimizer.__init__ has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 4 (8 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/amp/naive_amp/mixed_precision_optimizer.py"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ab2ed5c1a3218e6f454b462dae41965b20245e34c5046bf4b9bc35967fe82f8"}},{"ruleId":"D2","level":"warning","message":{"text":"ViewGenerator.collate_strategies (cognitive 17): ViewGenerator.collate_strategies has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/reshape_generator.py"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5f1dbbab481f429bf6c1579eff8e6213c04008172dedcc785cddce8ace4ceeb"}},{"ruleId":"D2","level":"warning","message":{"text":"SearchChunk._search_possible_chunk_regions (cognitive 17): SearchChunk._search_possible_chunk_regions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 4 (6 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/autochunk/search_chunk.py"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"244723875e0bd3e4360d5a294e742f838be1b5d2c128eccc8e0c24532026061f"}},{"ruleId":"D2","level":"warning","message":{"text":"TraceIndice.trace_indice (cognitive 17): TraceIndice.trace_indice has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/autochunk/trace_indice.py"},"region":{"startLine":838}}}],"partialFingerprints":{"codehealthFindingId/v1":"0daa3786d23793d7670d52664b8678411a937925de56e489c85e16fd6d512f89"}},{"ruleId":"D2","level":"warning","message":{"text":"LowLevelZeroCheckpointIO.save_sharded_optimizer (cognitive 17): LowLevelZeroCheckpointIO.save_sharded_optimizer has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/plugin/low_level_zero_plugin.py"},"region":{"startLine":163}}}],"partialFingerprints":{"codehealthFindingId/v1":"397381893970521a00f48f27a85701bdc13f1d162812ed841d18b8a49ebdc4d4"}},{"ruleId":"D2","level":"warning","message":{"text":"MoECheckpointIO.save_unsharded_optimizer (cognitive 17): MoECheckpointIO.save_unsharded_optimizer has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/moe_checkpoint.py"},"region":{"startLine":866}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea6e5ea328bf8dd84424a6d1255268ae1c8c69452a7efcbc8cbfd76907614289"}},{"ruleId":"D2","level":"warning","message":{"text":"utils.shard_optimizer_checkpoint (cognitive 17): utils.shard_optimizer_checkpoint has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 2 (5 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/utils.py"},"region":{"startLine":432}}}],"partialFingerprints":{"codehealthFindingId/v1":"b64a77e5fac069b7050e9a6d97245ae79a6f151cf0473c438b631d7dd9d22238"}},{"ruleId":"D2","level":"warning","message":{"text":"activation_checkpoint_codegen._find_nested_ckpt_regions (cognitive 17): activation_checkpoint_codegen._find_nested_ckpt_regions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/codegen/activation_checkpoint_codegen.py"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"a57b51890f38a19fcfedcfb3768142c8d7cca5b1acdd8ebc8dc0857a3376c834"}},{"ruleId":"D2","level":"warning","message":{"text":"arithmetic.torch_matmul (cognitive 17): arithmetic.torch_matmul has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/meta_patch/patched_function/arithmetic.py"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"078cee051a97f44940f80155ee24a03c02f915485b3c24ac0daa6263b2a4224c"}},{"ruleId":"D2","level":"warning","message":{"text":"LLMEngine.steps_spec_dec (cognitive 17): LLMEngine.steps_spec_dec has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 2 (4 pts), loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/core/llm_engine.py"},"region":{"startLine":388}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9747b82c6fdbdd117e6ebbb07e451fc7d27a5bee081839b5706a3ea13f5ac4b"}},{"ruleId":"D2","level":"warning","message":{"text":"NopadLlamaMLP._load_from_state_dict (cognitive 17): NopadLlamaMLP._load_from_state_dict has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (4 pts), error handling 1 (3 pts) (nesting depth added 9). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/modeling/models/nopadding_llama.py"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"379150ba5627b7c2a75c4edf91f06620948eda5777b5c65ec5ee60ff638f7379"}},{"ruleId":"D2","level":"warning","message":{"text":"WorkerBase._get_output_all (cognitive 17): WorkerBase._get_output_all has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/pipeline/rpc/_pipeline_base.py"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e4bfa9f67610db7314527faf9e5bee24dfe8aeb32aa614d38882a0f6ddb8777"}},{"ruleId":"D2","level":"warning","message":{"text":"_mixtral_tf5._slice_fused_expert_param (cognitive 17): _mixtral_tf5._slice_fused_expert_param has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (17 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_mixtral_tf5.py"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"221b777ae4c286d87996d50174044bc385d210bb5ad4c6993ad2d4f8f51d07b0"}},{"ruleId":"D2","level":"warning","message":{"text":"FalconPipelineForwards.falcon_for_causal_lm_forward (cognitive 17): FalconPipelineForwards.falcon_for_causal_lm_forward has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/falcon.py"},"region":{"startLine":354}}}],"partialFingerprints":{"codehealthFindingId/v1":"e80f82dbaec80b3a093ec98b856f3cdd47f60eb648a15749c533fe5ab82544c6"}},{"ruleId":"D2","level":"warning","message":{"text":"OPTPipelineForwards.opt_for_question_answering_forward (cognitive 17): OPTPipelineForwards.opt_for_question_answering_forward has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/opt.py"},"region":{"startLine":461}}}],"partialFingerprints":{"codehealthFindingId/v1":"086a99fa86947ed52f376ec42b2250cd231685a685c2e2b45c3454d0108fb1e9"}},{"ruleId":"D2","level":"warning","message":{"text":"BertPolicy.module_policy (cognitive 17): BertPolicy.module_policy has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_bert_tf4.py"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"27d85e88b05b66d07a06e6ebe1cbc420e1d0a311be5e1b8d75d40c1e554afe11"}},{"ruleId":"D2","level":"warning","message":{"text":"BertPolicy.module_policy (cognitive 17): BertPolicy.module_policy has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_bert_tf5.py"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"95660d387ec78b8ba279e6b4b574ce198f59521cc1fdc1d2130d72a7c2da15a1"}},{"ruleId":"D2","level":"warning","message":{"text":"DeepseekV3Policy.get_held_layers (cognitive 17): DeepseekV3Policy.get_held_layers has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_deepseek_v3_tf4.py"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"024fef7c754da3f57c4e96d27e2fcec2be9b135be839c1f279e2237c05cd54a0"}},{"ruleId":"D2","level":"warning","message":{"text":"DeepseekV3Policy.get_held_layers (cognitive 17): DeepseekV3Policy.get_held_layers has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_deepseek_v3_tf5.py"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"e519783c5c24b00991866c5a6438586398252bf567118fdbfc9bada231958072"}},{"ruleId":"D2","level":"warning","message":{"text":"LlamaPolicy.get_held_layers (cognitive 17): LlamaPolicy.get_held_layers has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_llama_tf4.py"},"region":{"startLine":333}}}],"partialFingerprints":{"codehealthFindingId/v1":"946bb5946e47eb87edc7e121c719abc3d74a985feb6916bf0e2c06e6eaa19b89"}},{"ruleId":"D2","level":"warning","message":{"text":"LlamaPolicy.get_held_layers (cognitive 17): LlamaPolicy.get_held_layers has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_llama_tf5.py"},"region":{"startLine":331}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6fffa5d08de522db85659bd5b088c72f3cca205632ccc66a7f0a4b184bacf94"}},{"ruleId":"D2","level":"warning","message":{"text":"MixtralPolicy.get_held_layers (cognitive 17): MixtralPolicy.get_held_layers has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_mixtral_tf4.py"},"region":{"startLine":310}}}],"partialFingerprints":{"codehealthFindingId/v1":"775f259ff25c1e3fab97f570642709c95a41ceffa59a2747c5b876bef42dbf57"}},{"ruleId":"D2","level":"warning","message":{"text":"MixtralPolicy.get_held_layers (cognitive 17): MixtralPolicy.get_held_layers has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_mixtral_tf5.py"},"region":{"startLine":337}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e0061e5371dd2374fc2c82d503b00cb6551a1a373138451346145853e5d1e5b"}},{"ruleId":"D2","level":"warning","message":{"text":"Qwen2Policy.get_held_layers (cognitive 17): Qwen2Policy.get_held_layers has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_qwen2_tf4.py"},"region":{"startLine":343}}}],"partialFingerprints":{"codehealthFindingId/v1":"0563eb4eae11bd5fce4b6c347a26715f85c579a5a9803331927b52d998c0b66c"}},{"ruleId":"D2","level":"warning","message":{"text":"Qwen2Policy.get_held_layers (cognitive 17): Qwen2Policy.get_held_layers has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_qwen2_tf5.py"},"region":{"startLine":342}}}],"partialFingerprints":{"codehealthFindingId/v1":"439fe8e04383b6132b1fddb4ec52c6ae79a5f63b687cf1d35de89e362968e4bb"}},{"ruleId":"D2","level":"warning","message":{"text":"Qwen3Policy.get_held_layers (cognitive 17): Qwen3Policy.get_held_layers has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_qwen3_tf4.py"},"region":{"startLine":343}}}],"partialFingerprints":{"codehealthFindingId/v1":"58aa9e0a1b5d01a7daa29090c5d297dbb977d2ca12eeb6c5831499743bf29e21"}},{"ruleId":"D2","level":"warning","message":{"text":"Qwen3Policy.postprocess (cognitive 17): Qwen3Policy.postprocess has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 2 (6 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_qwen3_tf5.py"},"region":{"startLine":307}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4b53a93780f534925b3c92d58ac63bc7de70b570a7e79c6528931fc12f9aaa1"}},{"ruleId":"D2","level":"warning","message":{"text":"Qwen3Policy.get_held_layers (cognitive 17): Qwen3Policy.get_held_layers has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_qwen3_tf5.py"},"region":{"startLine":363}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ac386d0dcafe4ba26b6512ce6ee1ea0e485ba4b0b0417619bfb78ca28b643ba"}},{"ruleId":"D2","level":"warning","message":{"text":"BloomPolicy.get_held_layers (cognitive 17): BloomPolicy.get_held_layers has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/bloom.py"},"region":{"startLine":301}}}],"partialFingerprints":{"codehealthFindingId/v1":"8de2c020a17747305b1d621d915bfd8ff984d89e7c3cf59f987fe1ffade9944b"}},{"ruleId":"D2","level":"warning","message":{"text":"CommandPolicy.get_held_layers (cognitive 17): CommandPolicy.get_held_layers has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/command.py"},"region":{"startLine":311}}}],"partialFingerprints":{"codehealthFindingId/v1":"1bab7fff89d2918922c8e4757711b4f0e3013ccdc72feceebb1ec150a7db97c6"}},{"ruleId":"D2","level":"warning","message":{"text":"DeepseekPolicy.get_held_layers (cognitive 17): DeepseekPolicy.get_held_layers has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/deepseek.py"},"region":{"startLine":320}}}],"partialFingerprints":{"codehealthFindingId/v1":"909defb5e95ce1d41adfd5288a9df0f7bc8d16603c52e7fb1ccd2436bbc73c04"}},{"ruleId":"D2","level":"warning","message":{"text":"FalconPolicy.get_held_layers (cognitive 17): FalconPolicy.get_held_layers has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/falcon.py"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5ee49abe370841b25492ba0c4adecfa962676a6d605e77cec5096953fa408d0"}},{"ruleId":"D2","level":"warning","message":{"text":"GPTJPolicy.get_held_layers (cognitive 17): GPTJPolicy.get_held_layers has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/gptj.py"},"region":{"startLine":263}}}],"partialFingerprints":{"codehealthFindingId/v1":"365bd8d9b9c183fa8620cf82e0406158e88c187cc5ae15050d7fe4d3cf51a0bc"}},{"ruleId":"D2","level":"warning","message":{"text":"MistralPolicy.get_held_layers (cognitive 17): MistralPolicy.get_held_layers has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/mistral.py"},"region":{"startLine":294}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5ce2df359313d0b562c40d92f170ad8ded1e9f3d8f3f98efce91fee59f23eef"}},{"ruleId":"D2","level":"warning","message":{"text":"OPTPolicy.get_held_layers (cognitive 17): OPTPolicy.get_held_layers has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/opt.py"},"region":{"startLine":287}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c6496699debc664b81fcac962210ad5d686b97ca01c0a93e7f3912acc420a5a"}},{"ruleId":"D2","level":"warning","message":{"text":"gpt_evaluate.analyze_gpt_evaluation_statistics (cognitive 16): gpt_evaluate.analyze_gpt_evaluation_statistics has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 5 (8 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/evaluate/gpt_evaluate.py"},"region":{"startLine":771}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9302d4c9824b783bb5eb73abc1e1876c3143f3a5176fa2a2a4b28e09d63851b"}},{"ruleId":"D2","level":"warning","message":{"text":"SynTrainingSimulator._eval_bwd_mem_per_region (cognitive 16): SynTrainingSimulator._eval_bwd_mem_per_region has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/offload/training_simulator.py"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2f6682039c83bef0841673e378dabfefd72db0d1541700f5a21c8cc96342822"}},{"ruleId":"D2","level":"warning","message":{"text":"runtime_preparation_pass.size_processing (cognitive 16): runtime_preparation_pass.size_processing has cognitive complexity 16 (threshold 15). Drivers by points: loops 3 (9 pts), if/else 4 (7 pts) (nesting depth added 9). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/passes/runtime_preparation_pass.py"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"f285ba493fdc5db4e24c96da40e80d1ef7405499648439cd2f4ff4870e6f415d"}},{"ruleId":"D2","level":"warning","message":{"text":"GeneralCheckpointIO.load_sharded_model (cognitive 16): GeneralCheckpointIO.load_sharded_model has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/general_checkpoint_io.py"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c56fe4656aa91b155d2eb4e047ce7c22e44cf3dc3cafb7e8f5cec2a41bb4e14"}},{"ruleId":"D2","level":"warning","message":{"text":"DeviceMesh._collate_global_ranks_in_same_process_group (cognitive 16): DeviceMesh._collate_global_ranks_in_same_process_group has cognitive complexity 16 (threshold 15). Drivers by points: loops 5 (9 pts), if/else 2 (7 pts) (nesting depth added 9). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/device/device_mesh.py"},"region":{"startLine":402}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bba89a712300cc5d40e0e7b829fee0810a41abe5c6a8041cc78a9fa6f21ac28"}},{"ruleId":"D2","level":"warning","message":{"text":"InferCheckpoint_io.load_sharded_model (cognitive 16): InferCheckpoint_io.load_sharded_model has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 3, loops 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/core/plugin.py"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"806a5b3b7b9fba1e4c26928b6300406c361428becf02433d181787c0df509c3b"}},{"ruleId":"D2","level":"warning","message":{"text":"distrifusion.PixArtAlphaTransformer2DModel_forward (cognitive 16): distrifusion.PixArtAlphaTransformer2DModel_forward has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, loops 1 (nesting depth added 3). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/modeling/layers/distrifusion.py"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c77c07cded9b1b86bd9d662305671666ae5d1175d5258ee9947ce4cf93c191e"}},{"ruleId":"D2","level":"warning","message":{"text":"LoadBalancer._search_balance (cognitive 16): LoadBalancer._search_balance has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 4 (7 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/load_balance.py"},"region":{"startLine":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"e643c8533b3ea21606cf9d4f362ef18bf95fd3931abfde49afd350bb903faca8"}},{"ruleId":"D2","level":"warning","message":{"text":"MoEManager.get_info (cognitive 16): MoEManager.get_info has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/manager.py"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6431d71659ab5b8255181f542cdc92a2440cc876bef392a0a95f2622d6ec640"}},{"ruleId":"D2","level":"warning","message":{"text":"ParallelCachedEmbeddingBagTablewise.split_along_rank (cognitive 16): ParallelCachedEmbeddingBagTablewise.split_along_rank has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/parallel/layers/cache_embedding/parallel_cached_embedding_tablewise.py"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9d92c72dec397d7807ca0ecf70aa6f01ff032f9f029e28a208f6a29a31f6637"}},{"ruleId":"D2","level":"warning","message":{"text":"ProcessGroup.__init__ (cognitive 16): ProcessGroup.__init__ has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 3, loops 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/tensor/process_group.py"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c51945bf97abf9c725c3e029b5cd25867965719a7f0b3c7c2bf0d00980f4429"}},{"ruleId":"D2","level":"warning","message":{"text":"CheckpointFunction.backward (cognitive 16): CheckpointFunction.backward has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), loops 4, boolean chains 1, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/utils/activation_checkpoint.py"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e8786b4ce6e4064ca84e745609d8f419d15692c9b86add50d3a4ecb937174e2"}},{"ruleId":"D2","level":"warning","message":{"text":"common._clip_grad_norm (cognitive 16): common._clip_grad_norm has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/utils/common.py"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d47dcc5db3177a68422ccf9b237fb9a223e09936552a0b8fccf3e55bd93704d"}},{"ruleId":"D2","level":"warning","message":{"text":"PcieProfiler.disable (cognitive 16): PcieProfiler.disable has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/utils/profiler/legacy/pcie_profiler.py"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"541c61804ca5cc35cf4ba506e05ce760072caf4fc712084507a10fc9f93f5dbd"}},{"ruleId":"D2","level":"warning","message":{"text":"DistGaloreAdamW.setup_distributed (cognitive 16): DistGaloreAdamW.setup_distributed has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 2 (3 pts), boolean chains 2, ternaries 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/distributed_galore.py"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"075b6fc87b23aa1cc6a86e327b386bbcab0418d7bd54e517e3ed4c770ef1916a"}},{"ruleId":"D2","level":"warning","message":{"text":"RingAttention.attention (cognitive 16): RingAttention.attention has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/attn.py"},"region":{"startLine":498}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd2d0144400686aae056c500473c10a8eff78d59947d3ff8fcb7e02226db6450"}},{"ruleId":"D2","level":"warning","message":{"text":"Linear1D_Col.__init__ (cognitive 16): Linear1D_Col.__init__ has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/linear.py"},"region":{"startLine":209}}}],"partialFingerprints":{"codehealthFindingId/v1":"eae5b0071b52c46c96706460d979864fbbd1f20721adb5063ef6ea3e1dfca769"}},{"ruleId":"D2","level":"warning","message":{"text":"GPT2FusedLinearConv1D_Col.__init__ (cognitive 16): GPT2FusedLinearConv1D_Col.__init__ has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This shape REPEATS in the file: one other method here (FusedLinear1D_Col.__init__) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/qkv_fused_linear.py"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd10ecc4cc1229b5711d9f039dcad37c1ad8b9501fb8f5f7b9cd82f7dd8eb471"}},{"ruleId":"D2","level":"warning","message":{"text":"FusedLinear1D_Col.__init__ (cognitive 16): FusedLinear1D_Col.__init__ has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This shape REPEATS in the file: one other method here (GPT2FusedLinearConv1D_Col.__init__) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/qkv_fused_linear.py"},"region":{"startLine":816}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5aef093827c8b7f43f6e2847fb3578ecfc8fda257f200b9281fd9a19faacdc2"}},{"ruleId":"D2","level":"warning","message":{"text":"Qwen2PipelineForwards.qwen2_for_causal_lm_forward (cognitive 16): Qwen2PipelineForwards.qwen2_for_causal_lm_forward has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 4 (6 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen2_tf4.py"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"84e2a36a9c731043c8a5f5c4896dc5c2750b2e15088beff99fc053e05dd26f69"}},{"ruleId":"D2","level":"warning","message":{"text":"Qwen3PipelineForwards.qwen3_for_causal_lm_forward (cognitive 16): Qwen3PipelineForwards.qwen3_for_causal_lm_forward has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 4 (6 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen3_tf4.py"},"region":{"startLine":262}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe741dae415f2ced1c1ccfdb1b5bda1fe57c262bd16bc99c30ad04f109c902b9"}},{"ruleId":"D2","level":"warning","message":{"text":"WhisperPipelineForwards.whisper_decoder_forward (cognitive 16): WhisperPipelineForwards.whisper_decoder_forward has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 3, ternaries 2, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_whisper_tf5.py"},"region":{"startLine":309}}}],"partialFingerprints":{"codehealthFindingId/v1":"69bee7f881e9e585204c96c8c5be2b7dd4c00e1e1eaac6b3cf164e6c1cd11e18"}},{"ruleId":"D2","level":"warning","message":{"text":"gpt2._get_attention_mask (cognitive 16): gpt2._get_attention_mask has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/gpt2.py"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bad56175639200d217e78cebff6665895a27f6b25e22b59d3e938d78737dd73"}},{"ruleId":"D2","level":"warning","message":{"text":"Layout._sanity_check (cognitive 16): Layout._sanity_check has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 4 (8 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/tensor/d_tensor/layout.py"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"5233d8d15658f2c0b03abec9765f030a0ad5a1edc5cbc61c9443112f3bfef05f"}},{"ruleId":"D2","level":"warning","message":{"text":"ShapeConsistencyManager.shape_consistency (cognitive 16): ShapeConsistencyManager.shape_consistency has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (9 pts), if/else 3 (7 pts) (nesting depth added 9). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/tensor/shape_consistency.py"},"region":{"startLine":581}}}],"partialFingerprints":{"codehealthFindingId/v1":"84483dba0bcad73852d922be9fe7b38481723b61456d36077f475db0da4aa7a5"}},{"ruleId":"D2","level":"warning","message":{"text":"utils.set_cuda_arch_list (cognitive 16): utils.set_cuda_arch_list has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"extensions/utils.py"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ca0f44a7600717f72dbe7223db6678bc60532238571b31193b6335070165320"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: rpc/_pipeline_base.py: FileTooLong \u2014 1067 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 567 over it, 2.13\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/pipeline/rpc/_pipeline_base.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"16f6f5e3ab8409e754ba2233004fa658701c42b454c53a5b19ee0dbb83a4b72c"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: chatglm2_6b/modeling_chatglm.py: FileTooLong \u2014 945 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 445 over it, 1.89\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/chatglm2_6b/modeling_chatglm.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"86d7c91dd7823adcbad748e7b200fc1a854efd86a5872557c287b6e6b9887bcb"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: checkpoint_io/hybrid_parallel_checkpoint_io.py: FileTooLong \u2014 854 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 354 over it, 1.71\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"20e6bec38549dfb1916898573de81a7ba56632102d621371ee3ce6130d2d442d"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: WorkerBase: TooManyMethods \u2014 51 methods. The bar is 30 methods; this is 21 over it, 1.70\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/pipeline/rpc/_pipeline_base.py"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"30cefd2460a6dce9a67287fbe0b1448f1a5711d973b2a3f621db6296c8c43003"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: layer/attn.py: FileTooLong \u2014 806 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 306 over it, 1.61\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/attn.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7fbcf1f9e8daf05793338e2e016c9eced56da4305a2aee2f33d002e81234656"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: modeling/_mixtral_tf5.py: FileTooLong \u2014 781 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 281 over it, 1.56\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_mixtral_tf5.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"534da60911e2e0daafd5903e880b83247d58de4906f8c9a9e276bd897b56a132"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: checkpoint_io/moe_checkpoint.py: FileTooLong \u2014 734 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 234 over it, 1.47\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/moe_checkpoint.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7f008bdbde4e4aef442e1596883c69ede44fb81ab8cc0569c247487d51ad60e"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: TraceIndice: TooManyMethods \u2014 44 methods. The bar is 30 methods; this is 14 over it, 1.47\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/autochunk/trace_indice.py"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"726d90d7914a2b8d4445028cd183eb5012b2de651e93b25e1703b7520bd759a8"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: LowLevelZeroOptimizer: TooManyMethods \u2014 42 methods. The bar is 30 methods; this is 12 over it, 1.40\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/low_level/low_level_optim.py"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"e049fe204d3cbda1d10db0f5eaaf66f3c60690274be613f1f874feafaf77ff3c"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: CpuAccelerator: TooManyMethods \u2014 41 methods. The bar is 30 methods; this is 11 over it, 1.37\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/accelerator/cpu_accelerator.py"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"36110e74af353fb02e4d2c0c0d15c2a1c6fa5a1488fd6a96eab37b9901f2b029"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: CudaAccelerator: TooManyMethods \u2014 41 methods. The bar is 30 methods; this is 11 over it, 1.37\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/accelerator/cuda_accelerator.py"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"c179f722a2c121f7827cc28ed29164491471722e23f7a9331934b44c99a4e414"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: NpuAccelerator: TooManyMethods \u2014 41 methods. The bar is 30 methods; this is 11 over it, 1.37\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/accelerator/npu_accelerator.py"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"c29848969df36851f97e25cfa961f73fac7893b1ca118a0081ffcb0534e712f7"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: low_level/low_level_optim.py: FileTooLong \u2014 679 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 179 over it, 1.36\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/low_level/low_level_optim.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"098f52453ef20f122ced92cbc2cce6ab8e98f70ac4d2c870ca3b7b811996e46c"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: strategy/matmul_strategy_generator.py: FileTooLong \u2014 676 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 176 over it, 1.35\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/matmul_strategy_generator.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3f875a0a4b227afef9fddaf3f3ba8858831227684d9be1a64656721f2e6bf1f"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: modeling/_mixtral_tf4.py: FileTooLong \u2014 661 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 161 over it, 1.32\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_mixtral_tf4.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"20aed261198bc0a8423b7d37a12c223f63047fd14dcffd07c71b1e9b0350029f"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: plugin/hybrid_parallel_plugin.py: FileTooLong \u2014 658 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 158 over it, 1.32\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/plugin/hybrid_parallel_plugin.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"71b2b30865e92d318478064abb5000125133157d1fa4895215b69dec2fa52c15"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: modeling/deepseek.py: FileTooLong \u2014 632 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 132 over it, 1.26\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/deepseek.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"150d2d08fb95d2f333562a5fcfc0dcd7e6cf8f8c5518883e97dbae0e473a9081"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: models/llama.py: FileTooLong \u2014 626 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 126 over it, 1.25\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/quant/smoothquant/models/llama.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e244b7245e51b89cfe90b99778beb42bafa67b3ce0759f07dea48e7ffa4c84ac"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: modeling/_whisper_tf4.py: FileTooLong \u2014 617 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 117 over it, 1.23\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_whisper_tf4.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2661488e4a1d0173e91b8cca043f8de5a23454f7ab26db89be532472bea864a2"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: policies/t5.py: FileTooLong \u2014 607 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 107 over it, 1.21\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/t5.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6aa490ae9c9de6253d1a67f3f8d34ccebf975cc992fe2816e390e62d188f6c55"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: gemini/gemini_optimizer.py: FileTooLong \u2014 593 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 93 over it, 1.19\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/gemini/gemini_optimizer.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"163bf5f1e8edbb7b2f89269d6b87c84039e4f38e441f10a76bccfefe94cee8ec"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: triton/context_attn_unpad.py: FileTooLong \u2014 576 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 76 over it, 1.15\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/context_attn_unpad.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0570eb5d51578aebd02941dcf79793e36253e2e6f0c65f7895e9e3060c93f808"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: policies/_bert_tf4.py: FileTooLong \u2014 566 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 66 over it, 1.13\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_bert_tf4.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"717644d764a05ba14a8c99fef81e10fb1921291fb4a8b41912931bee86b2f6d7"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: policies/_bert_tf5.py: FileTooLong \u2014 566 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 66 over it, 1.13\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_bert_tf5.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9867db6c30548d836a8bfee03be637bd2e3e8211036f4ed415b97b561ccb8f0"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: model/modeling_openmoe.py: FileTooLong \u2014 562 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 62 over it, 1.12\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/openmoe/model/modeling_openmoe.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea6c5af515b93b2faa9743f5b2878b5d50138411d554d93f696a1cd813db8ed7"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: schedule/_pipeline_schedule.py: FileTooLong \u2014 555 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 55 over it, 1.11\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/engine/schedule/_pipeline_schedule.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"596c493b864a3dd765fdac1cdc71ed0e3c137ac5f4379b8bfe875daba66da78c"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: modeling/_whisper_tf5.py: FileTooLong \u2014 553 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 53 over it, 1.11\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_whisper_tf5.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ea883daceb4531eb2e452fec2fc62e4204b8cd45e36b8c8e849eecf32daef06"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ParallelContext: TooManyMethods \u2014 33 methods. The bar is 30 methods; this is 3 over it, 1.10\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/context/parallel_context.py"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"915d4f806b18e3d971b28eea510d8093357d3bec16ec9277982eefc58a25c181"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: modeling/chatglm2.py: FileTooLong \u2014 548 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 48 over it, 1.10\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/chatglm2.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1c6670c256d2dee2785e859cb6175983c94448f6d2b503d46ffb53058ce114a"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: autochunk/trace_indice.py: FileTooLong \u2014 546 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 46 over it, 1.09\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/autochunk/trace_indice.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4dfb17843128f6767bcd7118dd327fa0f2070d09112eeecdb7d6cee7b27f7b3"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: dataset_evaluator/metrics.py: FileTooLong \u2014 539 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 39 over it, 1.08\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/evaluate/dataset_evaluator/metrics.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"55512ceaca5fe76e203057e071c86561da6350ceedd1949dbeaa22b1cab50278"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: pipeline/p2p.py: FileTooLong \u2014 526 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 26 over it, 1.05\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/pipeline/p2p.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b7d88f9041acbc573eef80c82f676ecb29897b8726dd6173a2b9cc042d0cf86"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: modeling/opt.py: FileTooLong \u2014 519 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 19 over it, 1.04\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/opt.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7d19a3ce5e23fa3d41b3603a6c72700fd5ec94bfe39ad13b8bb94b666537e41"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: tracer/experimental.py: FileTooLong \u2014 508 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 8 over it, 1.02\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/experimental.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0ad78421940c2e6a91bfa5938988e05baa4628d16e1565bce0246f2fb1ff087"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: policies/blip2.py: FileTooLong \u2014 508 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 8 over it, 1.02\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/blip2.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a9e82ea16c37d231049638220ece52c618a905ac0483af93bbc9449b9ff3490"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: triton/no_pad_rotary_embedding.py: FileTooLong \u2014 507 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 7 over it, 1.01\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/no_pad_rotary_embedding.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"48c7e2fa7e7f4946bbf669d62ce02f9789f737dc305d299bb9f97b63e36a019b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: modeling/command.py: FileTooLong \u2014 505 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 5 over it, 1.01\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/command.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bf7de4812148490b618dca9f6dd8cb23b47a86c10906cdc99be8fef14ab9cdb"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (9 members, 28 shared lines): colossalai/shardformer/modeling/_bert_tf4.py:938-1013 | colossalai/shardformer/modeling/_bert_tf5.py:951-1026 | colossalai/shardformer/modeling/bloom.py:649-723 | colossalai/shardformer/modeling/falcon.py:665-739 | colossalai/shardformer/modeling/gpt2.py:545-615 | colossalai/shardformer/modeling/gptj.py:493-564 | colossalai/shardformer/modeling/opt.py:479-539 | examples/community/roberta/pretraining/model/bert.py:1824-1882 | examples/community/roberta/pretraining/model/deberta_v2.py:1473-1530 \u2014 These 9 members are variants of one another: a block of 28 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 9 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 9 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":938}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d1325b1a975ab05b2f5d7b3514c60a850957fb200d59e675dbf77da7fdcbf0e"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (8 members, 30 shared lines): colossalai/shardformer/modeling/_llama_tf4.py:395-490 | colossalai/shardformer/modeling/_llama_tf5.py:437-532 | colossalai/shardformer/modeling/_qwen2_tf4.py:385-480 | colossalai/shardformer/modeling/bloom.py:430-535 | colossalai/shardformer/modeling/falcon.py:470-564 | colossalai/shardformer/modeling/gpt2.py:712-808 | colossalai/shardformer/modeling/gptj.py:375-472 | colossalai/shardformer/modeling/opt.py:376-458 \u2014 These 8 members are variants of one another: a block of 30 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 8 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_llama_tf4.py"},"region":{"startLine":395}}}],"partialFingerprints":{"codehealthFindingId/v1":"04dfcb0fa684fc3e7300105951a08ab3bb8b6c48216f7be761e89ce8ba3c67c7"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (6 members, 43 shared lines): colossalai/shardformer/modeling/_llama_tf4.py:395-490 | colossalai/shardformer/modeling/_llama_tf5.py:437-532 | colossalai/shardformer/modeling/_qwen2_tf4.py:385-480 | colossalai/shardformer/modeling/_qwen2_tf5.py:295-378 | colossalai/shardformer/modeling/_qwen3_tf4.py:383-466 | colossalai/shardformer/modeling/_qwen3_tf5.py:296-379 \u2014 These 6 members are variants of one another: a block of 43 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 6 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_llama_tf4.py"},"region":{"startLine":395}}}],"partialFingerprints":{"codehealthFindingId/v1":"955686d7dbcbb54a17ccbcda6d9e435303d1acc5dcae0d8299b7ed8fff942974"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (6 members, 22 shared lines): colossalai/legacy/nn/layer/parallel_2d/_operation.py:243-314 | colossalai/legacy/nn/layer/parallel_2d/_operation.py:392-471 | colossalai/legacy/nn/layer/parallel_2d/_operation.py:549-628 | colossalai/legacy/nn/layer/parallel_2p5d/_operation.py:198-274 | colossalai/legacy/nn/layer/parallel_2p5d/_operation.py:355-439 | colossalai/legacy/nn/layer/parallel_2p5d/_operation.py:520-602 \u2014 These 6 members are variants of one another: a block of 22 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 6 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2d/_operation.py"},"region":{"startLine":243}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f2c66e55f5924f05ba66aad594cdd991323dcd7c4b541d00f81b26134d5dbcf"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (5 members, 50 shared lines): colossalai/shardformer/modeling/_llama_tf4.py:283-374 | colossalai/shardformer/modeling/_llama_tf5.py:325-416 | colossalai/shardformer/modeling/_qwen2_tf4.py:282-365 | colossalai/shardformer/modeling/_qwen3_tf4.py:280-363 | colossalai/shardformer/modeling/command.py:261-345 \u2014 These 5 members are variants of one another: a block of 50 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_llama_tf4.py"},"region":{"startLine":283}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b2afda40d4e2795c647dccc9c75976bd43176d7fdbbdbfa8bacbfca5d7eb490"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (5 members, 39 shared lines): colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py:112-175 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py:179-235 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py:239-305 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/matmul_strategy_generator.py:310-381 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/matmul_strategy_generator.py:386-460 \u2014 These 5 members are variants of one another: a block of 39 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4eee3e4a8c9183b8eb0b249f60674462c20097931762e949d01c20e8a4f5406"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (5 members, 30 shared lines): colossalai/shardformer/modeling/_qwen2_tf4.py:282-365 | colossalai/shardformer/modeling/_qwen2_tf5.py:191-275 | colossalai/shardformer/modeling/_qwen3_tf4.py:280-363 | colossalai/shardformer/modeling/_qwen3_tf5.py:192-276 | colossalai/shardformer/modeling/command.py:261-345 \u2014 These 5 members are variants of one another: a block of 30 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen2_tf4.py"},"region":{"startLine":282}}}],"partialFingerprints":{"codehealthFindingId/v1":"b13a5ede16f8d2e6c8fe287e5aecc5dc013ddfe4133e0b0d153b1a152139f213"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (4 members, 54 shared lines): colossalai/legacy/moe/openmoe/model/openmoe_policy.py:428-565 | colossalai/shardformer/modeling/_llama_tf4.py:283-374 | colossalai/shardformer/modeling/_llama_tf5.py:325-416 | colossalai/shardformer/modeling/command.py:261-345 \u2014 These 4 members are variants of one another: a block of 54 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/openmoe/model/openmoe_policy.py"},"region":{"startLine":428}}}],"partialFingerprints":{"codehealthFindingId/v1":"613a2073a34a5e600239d83c03aa72509c1ad7bafd9b55df82985c1db5f4398a"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (4 members, 48 shared lines): colossalai/shardformer/modeling/_llama_tf4.py:395-490 | colossalai/shardformer/modeling/_llama_tf5.py:437-532 | colossalai/shardformer/modeling/_qwen2_tf4.py:385-480 | colossalai/shardformer/modeling/mistral.py:292-372 \u2014 These 4 members are variants of one another: a block of 48 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_llama_tf4.py"},"region":{"startLine":395}}}],"partialFingerprints":{"codehealthFindingId/v1":"60da8c009beaac40ebf7e2d64219c1cc69ed979282c5858f8cfa0017ff90dd52"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (4 members, 28 shared lines): colossalai/shardformer/modeling/_bert_tf4.py:384-469 | colossalai/shardformer/modeling/_bert_tf4.py:491-548 | colossalai/shardformer/modeling/_bert_tf5.py:397-482 | colossalai/shardformer/modeling/_bert_tf5.py:504-561 \u2014 These 4 members are variants of one another: a block of 28 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":384}}}],"partialFingerprints":{"codehealthFindingId/v1":"f58d54dc54b45ece8f444915208c8f82e97101264dadae59c46f2e1d3f4ee791"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (4 members, 22 shared lines): colossalai/shardformer/modeling/_bert_tf4.py:845-916 | colossalai/shardformer/modeling/_bert_tf5.py:858-929 | examples/community/roberta/pretraining/model/bert.py:1639-1690 | examples/community/roberta/pretraining/model/deberta_v2.py:1583-1633 \u2014 These 4 members are variants of one another: a block of 22 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":845}}}],"partialFingerprints":{"codehealthFindingId/v1":"337143c9748dcfe4638218c728705d6ef0f99e79c4713d65c5c15de7569a2164"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (3 members, 73 shared lines): colossalai/kernel/triton/context_attn_unpad.py:51-185 | colossalai/kernel/triton/context_attn_unpad.py:229-363 | colossalai/kernel/triton/context_attn_unpad.py:404-549 \u2014 These 3 members are variants of one another: a block of 73 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/context_attn_unpad.py"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc1c22160da4f29855ad383cd29509f467c42c264e4df2a16768191a34dcd97d"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (3 members, 49 shared lines): applications/Colossal-LLaMA/dataset/prepare_pretrain_dataset.py:27-138 | applications/Colossal-LLaMA/dataset/prepare_sft_dataset.py:24-145 | applications/ColossalChat/examples/data_preparation_scripts/prepare_dataset.py:53-268 \u2014 These 3 members are variants of one another: a block of 49 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/dataset/prepare_pretrain_dataset.py"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"dcd5e7eb2b0270664898d98b57cdcc09f32f6f3d214e40084816a6050e59152b"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (3 members, 39 shared lines): colossalai/shardformer/modeling/_mixtral_tf4.py:673-866 | colossalai/shardformer/modeling/_mixtral_tf5.py:1063-1246 | colossalai/shardformer/modeling/deepseek.py:708-861 \u2014 These 3 members are variants of one another: a block of 39 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_mixtral_tf4.py"},"region":{"startLine":673}}}],"partialFingerprints":{"codehealthFindingId/v1":"1eef00b3bbd70b4e35d031d5da344bf5cef4f83696d25805c8f1755eea492984"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (319 shared lines): applications/ColossalChat/coati/distributed/grpo_consumer.py:175-605 | applications/ColossalChat/coati/distributed/zero_bubble/grpo_consumer.py:165-529 \u2014 These two members are variants of one another: 319 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/grpo_consumer.py"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"36fd384fba5ec85a35e26a921de1cac2816a086108cad710c83d2aecdc58fa40"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (169 shared lines): colossalai/shardformer/policies/_whisper_tf4.py:45-503 | colossalai/shardformer/policies/_whisper_tf5.py:45-490 \u2014 These two members are variants of one another: 169 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_whisper_tf4.py"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c5d5651a108720ce82b2b0c02a78659dd84cbeb4f8ccf171ddb1426a32bf4a2"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (153 shared lines): colossalai/shardformer/modeling/gptj.py:650-822 | colossalai/shardformer/modeling/gptj.py:826-1014 \u2014 These two members are variants of one another: 153 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/gptj.py"},"region":{"startLine":650}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc876f14563a8cf00b496ad0ca20cd42dfc36ea5c7bd3b8b12d3c24a3b7e4677"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (125 shared lines): applications/ColossalChat/coati/distributed/producer.py:220-415 | applications/ColossalChat/coati/distributed/zero_bubble/producer.py:213-439 \u2014 These two members are variants of one another: 125 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/producer.py"},"region":{"startLine":220}}}],"partialFingerprints":{"codehealthFindingId/v1":"c615551c038e62cde577cfec82cca035b49a97248da49790743d9cd9f9fb0969"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (113 shared lines): colossalai/shardformer/modeling/_bert_tf4.py:63-283 | colossalai/shardformer/modeling/_bert_tf5.py:65-296 \u2014 These two members are variants of one another: 113 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"0523af68cb0074f52abe8ee6b25e34e4e17d9dc59e772158c6e136d7a920ce1a"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (109 shared lines): applications/Colossal-LLaMA/train.py:44-433 | applications/ColossalChat/examples/training_scripts/lora_finetune.py:50-366 \u2014 These two members are variants of one another: 109 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/train.py"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"721baedce066921fdb6f7605f423e912f96f76852de4718133608956908b8a35"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (88 shared lines): applications/ColossalChat/coati/distributed/producer.py:61-196 | applications/ColossalChat/coati/distributed/zero_bubble/producer.py:61-191 \u2014 These two members are variants of one another: 88 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/producer.py"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"95db378e2b23df1ed88dbeef067afd0e87274e82c541f8f8aa604f108d9f5902"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (85 shared lines): colossalai/shardformer/modeling/_mixtral_tf4.py:427-535 | colossalai/shardformer/modeling/_mixtral_tf5.py:793-913 \u2014 These two members are variants of one another: 85 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_mixtral_tf4.py"},"region":{"startLine":427}}}],"partialFingerprints":{"codehealthFindingId/v1":"900a00971d3489da5f704e307786061075ff109b85e37f20f0b08b2651b1bace"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (72 shared lines): colossalai/booster/plugin/hybrid_parallel_plugin.py:996-1201 | colossalai/booster/plugin/moe_hybrid_parallel_plugin.py:227-414 \u2014 These two members are variants of one another: 72 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/plugin/hybrid_parallel_plugin.py"},"region":{"startLine":996}}}],"partialFingerprints":{"codehealthFindingId/v1":"f25a36151badab6cb19f57ee85a0481b28d4bb675bf437317b6311e3afd37901"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (65 shared lines): applications/ColossalChat/coati/distributed/launch.py:69-190 | applications/ColossalChat/coati/distributed/launch_zero_bubble.py:64-305 \u2014 These two members are variants of one another: 65 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/launch.py"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"f151d3ba2efc752b835ae3dbbd8a437540be8ed8cf39fa1f20cab3920923ba6c"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (65 shared lines): applications/ColossalChat/coati/distributed/grpo_consumer.py:45-141 | applications/ColossalChat/coati/distributed/zero_bubble/grpo_consumer.py:46-132 \u2014 These two members are variants of one another: 65 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/grpo_consumer.py"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ab4ebbd2984b063dd1daed989192e8d3b7b20ee3b0a873df29f6887b72b285d"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (64 shared lines): colossalai/nn/optimizer/distributed_adafactor.py:287-440 | colossalai/nn/optimizer/distributed_came.py:334-554 \u2014 These two members are variants of one another: 64 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/distributed_adafactor.py"},"region":{"startLine":287}}}],"partialFingerprints":{"codehealthFindingId/v1":"94f5e71a875993f86f2e581eaa2ea13842a62b2d3502283fcf4a124f61ad2108"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (60 shared lines): colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py:416-514 | colossalai/inference/core/plugin.py:36-129 \u2014 These two members are variants of one another: 60 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":416}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a67a3c39f3b0381e1c5418660bd6e30d0115d90a1d81b29ea4f3d5bcd047070"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (51 shared lines): colossalai/kernel/triton/context_attn_unpad.py:569-727 | colossalai/kernel/triton/flash_decoding.py:335-533 \u2014 These two members are variants of one another: 51 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/context_attn_unpad.py"},"region":{"startLine":569}}}],"partialFingerprints":{"codehealthFindingId/v1":"d24db19fbde4a926cb10cc34fe2eb077d2bccf01e19791cb3cfc5c9018104dde"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (51 shared lines): colossalai/shardformer/modeling/_deepseek_v3_tf4.py:298-370 | colossalai/shardformer/modeling/_deepseek_v3_tf5.py:325-408 \u2014 These two members are variants of one another: 51 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_deepseek_v3_tf4.py"},"region":{"startLine":298}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5f5a0dcb6bd8da0b7c067039944f760e2815f407798451f276d4b451cb23e78"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (50 shared lines): colossalai/legacy/moe/openmoe/model/modeling_openmoe.py:880-987 | colossalai/legacy/moe/openmoe/model/openmoe_policy.py:428-565 \u2014 These two members are variants of one another: 50 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/openmoe/model/modeling_openmoe.py"},"region":{"startLine":880}}}],"partialFingerprints":{"codehealthFindingId/v1":"70441eef7f72a3446cd1aaf8189bf25f58da186d5cbc1776993566fa062c2bc4"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (47 shared lines): applications/ColossalChat/coati/trainer/grpo.py:229-329 | applications/ColossalChat/coati/trainer/ppo.py:218-338 \u2014 These two members are variants of one another: 47 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/grpo.py"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc5b711e59d36ed071204a3b53aa1bea583733c38343101b03f87be2c09894db"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (47 shared lines): colossalai/kernel/triton/flash_decoding.py:50-130 | colossalai/kernel/triton/flash_decoding.py:168-253 \u2014 These two members are variants of one another: 47 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/flash_decoding.py"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"c001d77ead9eb021892c4a41e4892f230c3dae0925d4f74c6eed99fda717dec8"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (43 shared lines): colossalai/shardformer/modeling/_deepseek_v3_tf4.py:161-279 | colossalai/shardformer/modeling/_deepseek_v3_tf5.py:190-304 \u2014 These two members are variants of one another: 43 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_deepseek_v3_tf4.py"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"e99e847c44e102b4b3c70dac6273aa3c6a8fc77c497d2d27763141d324bdfb7c"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (37 shared lines): colossalai/legacy/inference/quant/smoothquant/models/llama.py:427-509 | colossalai/legacy/moe/openmoe/model/modeling_openmoe.py:335-439 \u2014 These two members are variants of one another: 37 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/quant/smoothquant/models/llama.py"},"region":{"startLine":427}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b152022bd3ad3ec6b7098433cf9b6c79ccf94badf6a8e36c5983cf63e7f9695"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (35 shared lines): colossalai/inference/kv_cache/kvcache_manager.py:49-124 | colossalai/inference/kv_cache/kvcache_manager.py:526-576 \u2014 These two members are variants of one another: 35 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/kv_cache/kvcache_manager.py"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"87fd09a6898b2c6e633e4ec7a797a0f256349b718c2baa290440242d4f1ccd36"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (50 corresponding lines): colossalai/legacy/moe/layer/experts.py:112-161 | colossalai/legacy/moe/layer/routers.py:112-161 \u2014 These two members are one piece of code written twice and then edited apart: 50 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/layer/experts.py"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"87179426cfce0be391ce6242041a84d8406426046580a2f394418a361c33acfc"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (75 corresponding lines): colossalai/shardformer/modeling/_bert_tf4.py:676-750 | colossalai/shardformer/modeling/_bert_tf5.py:689-763 \u2014 These two members are one piece of code written twice and then edited apart: 75 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":676}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2403bf28ec7aee8b1a32d4f738c7e8ed3a2d653f816ad9ef4e805114c53da07"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (38 corresponding lines): colossalai/legacy/inference/tensor_parallel/batch_infer_state.py:70-119 | colossalai/legacy/inference/tensor_parallel/engine.py:259-326 \u2014 These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/tensor_parallel/batch_infer_state.py"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cff15a8b12b7c4577bdaea82ff848f315737120aa334ac23ccc898f216f0e31"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (56 corresponding lines): colossalai/shardformer/modeling/_bert_tf4.py:770-825 | colossalai/shardformer/modeling/_bert_tf5.py:783-838 \u2014 These two members are one piece of code written twice and then edited apart: 56 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":770}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8e4309db653027d4fbde5c8f046991a7c8dfc770eaee02e05106cb162fe381d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): colossalai/fx/tracer/meta_patch/patched_module/pooling.py:113-136 | colossalai/fx/tracer/meta_patch/patched_module/pooling.py:141-166 \u2014 These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/meta_patch/patched_module/pooling.py"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f5a2631bb8fe7b3a171af81a80d210c519ce11bbb2db6fa722bcae70cc5d3b5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): colossalai/legacy/engine/schedule/_pipeline_schedule.py:53-68 | colossalai/legacy/engine/schedule/_pipeline_schedule_v2.py:18-33 \u2014 These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/engine/schedule/_pipeline_schedule.py"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"a37e7e3f78faf719c0bb70184abbe1068fef267d2b15be7122d6abb10065cf21"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (39 corresponding lines): colossalai/legacy/inference/tensor_parallel/modeling/chatglm2.py:395-545 | colossalai/shardformer/modeling/chatglm2_6b/modeling_chatglm.py:445-543 \u2014 These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/tensor_parallel/modeling/chatglm2.py"},"region":{"startLine":395}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d8ad102f3b8daa9c0acd0e0d5a97a2e3f266639c57084d2660c33d94442bad4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): colossalai/fx/tracer/meta_patch/patched_module/pooling.py:33-55 | colossalai/fx/tracer/meta_patch/patched_module/pooling.py:60-84 \u2014 These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/meta_patch/patched_module/pooling.py"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"48327f5fab19b3cc5ee3f19e2204e6c2b4a9b7a4f358a7ab33250595125eb367"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): colossalai/legacy/moe/layer/experts.py:94-104 | colossalai/legacy/moe/layer/routers.py:94-104 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/layer/experts.py"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"02a32302bec0c4033c98b2fd9993de4ecfe2b889422d3ff2c265c6170f5771d6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (23 corresponding lines): colossalai/legacy/nn/layer/parallel_2d/layers.py:146-171 | colossalai/legacy/nn/layer/parallel_2d/layers.py:1139-1166 \u2014 These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2d/layers.py"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"954c3fa8339f51de6c7b11f14948cb2cce4436c35b69c6c0a3c0983063ea6a65"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): colossalai/fx/tracer/meta_patch/patched_function/convolution.py:134-155 | colossalai/fx/tracer/meta_patch/patched_function/convolution.py:160-185 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/meta_patch/patched_function/convolution.py"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"01b08e518d10392d712a8447ab111242f33c20e3dea546fbb21ef56a4943bbc3"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (16 members, 50\u002B identical tokens): colossalai/legacy/context/process_group_initializer/initializer_1d.py:31-57 | colossalai/legacy/context/process_group_initializer/initializer_2d.py:45-70 | colossalai/legacy/context/process_group_initializer/initializer_2d.py:93-119 | colossalai/legacy/context/process_group_initializer/initializer_2p5d.py:60-90 | colossalai/legacy/context/process_group_initializer/initializer_2p5d.py:114-144 | colossalai/legacy/context/process_group_initializer/initializer_2p5d.py:168-198 | colossalai/legacy/context/process_group_initializer/initializer_2p5d.py:223-253 | colossalai/legacy/context/process_group_initializer/initializer_3d.py:48-76 | colossalai/legacy/context/process_group_initializer/initializer_3d.py:99-127 | colossalai/legacy/context/process_group_initializer/initializer_3d.py:150-178 | colossalai/legacy/context/process_group_initializer/initializer_3d.py:201-232 | colossalai/legacy/context/process_group_initializer/initializer_3d.py:255-286 | colossalai/legacy/context/process_group_initializer/initializer_data.py:30-55 | colossalai/legacy/context/process_group_initializer/initializer_model.py:32-57 | colossalai/legacy/context/process_group_initializer/initializer_sequence.py:34-58 | colossalai/legacy/context/process_group_initializer/initializer_tensor.py:30-55 \u2014 These 16 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 16 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 16 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/context/process_group_initializer/initializer_1d.py"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"811354690239d0d44cf6c18a26eaa83181edb8635796ef3a6afe08933620fdad"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (12 members, 50\u002B identical tokens): colossalai/shardformer/policies/_llama_tf4.py:36-298 | colossalai/shardformer/policies/_llama_tf5.py:36-296 | colossalai/shardformer/policies/_mixtral_tf4.py:43-282 | colossalai/shardformer/policies/_mixtral_tf5.py:45-309 | colossalai/shardformer/policies/_qwen2_tf4.py:57-305 | colossalai/shardformer/policies/_qwen2_tf5.py:57-304 | colossalai/shardformer/policies/_qwen3_tf4.py:57-305 | colossalai/shardformer/policies/_qwen3_tf5.py:58-305 | colossalai/shardformer/policies/command.py:39-276 | colossalai/shardformer/policies/gptj.py:37-258 | colossalai/shardformer/policies/mistral.py:41-259 | colossalai/shardformer/policies/opt.py:53-282 \u2014 These 12 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 12 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 12 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_llama_tf4.py"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2bc1093ffcb23cc9be597365c254f67f20dbc790debd2b524f267d9a3601b97"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (10 members, 50\u002B identical tokens): colossalai/shardformer/modeling/_llama_tf4.py:494-616 | colossalai/shardformer/modeling/_llama_tf5.py:536-658 | colossalai/shardformer/modeling/_mixtral_tf4.py:539-669 | colossalai/shardformer/modeling/_mixtral_tf5.py:917-1059 | colossalai/shardformer/modeling/_qwen2_tf4.py:484-605 | colossalai/shardformer/modeling/_qwen2_tf5.py:382-462 | colossalai/shardformer/modeling/_qwen3_tf4.py:470-597 | colossalai/shardformer/modeling/_qwen3_tf5.py:383-463 | colossalai/shardformer/modeling/command.py:349-426 | colossalai/shardformer/modeling/deepseek.py:589-704 \u2014 These 10 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 10 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 10 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_llama_tf4.py"},"region":{"startLine":494}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e7842f7c2c90a23b148eb2d3138e786d05473f66d929d5d818abfe70d244e52"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (10 members, 50\u002B identical tokens): colossalai/shardformer/policies/_llama_tf4.py:334-366 | colossalai/shardformer/policies/_llama_tf5.py:332-364 | colossalai/shardformer/policies/_mixtral_tf4.py:311-345 | colossalai/shardformer/policies/_mixtral_tf5.py:338-372 | colossalai/shardformer/policies/_qwen2_tf4.py:344-378 | colossalai/shardformer/policies/_qwen2_tf5.py:343-377 | colossalai/shardformer/policies/_qwen3_tf4.py:344-378 | colossalai/shardformer/policies/_qwen3_tf5.py:364-398 | colossalai/shardformer/policies/command.py:312-345 | colossalai/shardformer/policies/mistral.py:295-326 \u2014 These 10 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 10 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 10 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_llama_tf4.py"},"region":{"startLine":334}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e339eeb87d822b3a13322b3fc277b2d982a24e8605bc7ccbf98ebb472778472"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (9 members, 50\u002B identical tokens): colossalai/auto_parallel/tensor_shard/node_handler/strategy/batch_norm_generator.py:74-112 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py:79-108 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/embedding_generator.py:55-80 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/getitem_generator.py:32-59 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/layer_norm_generator.py:65-97 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/reshape_generator.py:36-63 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/softmax_generator.py:36-63 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/sum_generator.py:33-60 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/unary_elementwise_generator.py:24-51 \u2014 These 9 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 9 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 9 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/batch_norm_generator.py"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"5802625b9aed1eeaf6d96de25aa1198da39af1fdca6549287447e9b30eacc575"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (9 members, 50\u002B identical tokens): colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py:79-108 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/embedding_generator.py:55-80 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/getitem_generator.py:32-59 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/layer_norm_generator.py:65-97 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/reshape_generator.py:36-63 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/softmax_generator.py:36-63 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/sum_generator.py:33-60 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/tensor_constructor_generator.py:24-41 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/unary_elementwise_generator.py:24-51 \u2014 These 9 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 9 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 9 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffafbb7077708943fdd69780cb1292f2bd28882713f24d7425eed07e30a02173"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (9 members, 50\u002B identical tokens): colossalai/shardformer/layer/linear.py:78-120 | colossalai/shardformer/layer/linear.py:229-282 | colossalai/shardformer/layer/linear.py:422-478 | colossalai/shardformer/layer/qkv_fused_linear.py:241-307 | colossalai/shardformer/layer/qkv_fused_linear.py:458-515 | colossalai/shardformer/layer/qkv_fused_linear.py:674-717 | colossalai/shardformer/layer/qkv_fused_linear.py:836-902 | colossalai/shardformer/layer/qkv_fused_linear.py:1044-1106 | colossalai/shardformer/layer/qkv_fused_linear.py:1249-1292 \u2014 These 9 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 9 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 9 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/linear.py"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"45138d8a948a8d3ed20dbd66dbf05d60211213dcd2bd70323cfb07c4440391da"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (9 members, 50\u002B identical tokens): colossalai/shardformer/modeling/_qwen2_tf4.py:764-841 | colossalai/shardformer/modeling/_qwen2_tf5.py:537-618 | colossalai/shardformer/modeling/_qwen3_tf4.py:756-834 | colossalai/shardformer/modeling/_qwen3_tf5.py:538-620 | colossalai/shardformer/modeling/bloom.py:1096-1156 | colossalai/shardformer/modeling/command.py:573-664 | colossalai/shardformer/modeling/falcon.py:743-815 | colossalai/shardformer/modeling/mistral.py:558-637 | colossalai/shardformer/modeling/opt.py:847-970 \u2014 These 9 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 9 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 9 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen2_tf4.py"},"region":{"startLine":764}}}],"partialFingerprints":{"codehealthFindingId/v1":"0437524257d70bc54d56a50ae8e7a1754ee7073f37eb75ef0d9c04bb3781852e"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (9 members, 50\u002B identical tokens): colossalai/shardformer/policies/_llama_tf4.py:473-524 | colossalai/shardformer/policies/_llama_tf5.py:471-522 | colossalai/shardformer/policies/_mixtral_tf4.py:375-421 | colossalai/shardformer/policies/_mixtral_tf5.py:402-448 | colossalai/shardformer/policies/_qwen2_tf4.py:493-538 | colossalai/shardformer/policies/_qwen2_tf5.py:492-537 | colossalai/shardformer/policies/_qwen3_tf4.py:479-523 | colossalai/shardformer/policies/_qwen3_tf5.py:503-547 | colossalai/shardformer/policies/deepseek.py:382-430 \u2014 These 9 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 9 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 9 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_llama_tf4.py"},"region":{"startLine":473}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7f2ee1e7cbef54e8ebfac2a6815ff2225101d172b246c608f5dffa5bfa19552"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (8 members, 50\u002B identical tokens): colossalai/nn/optimizer/adafactor.py:87-201 | colossalai/nn/optimizer/distributed_adafactor.py:159-188 | colossalai/nn/optimizer/distributed_adafactor.py:191-231 | colossalai/nn/optimizer/distributed_adafactor.py:234-283 | colossalai/nn/optimizer/distributed_came.py:152-181 | colossalai/nn/optimizer/distributed_came.py:184-224 | colossalai/nn/optimizer/distributed_came.py:227-277 | colossalai/nn/optimizer/distributed_came.py:281-330 \u2014 These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/adafactor.py"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"2678351d690abe4ec66179f5bf32d6a103fd898ba4bf9f4e3d8eba8b73661436"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (8 members, 50\u002B identical tokens): colossalai/shardformer/policies/_llama_tf4.py:304-331 | colossalai/shardformer/policies/_llama_tf5.py:302-329 | colossalai/shardformer/policies/_qwen2_tf4.py:311-341 | colossalai/shardformer/policies/_qwen2_tf5.py:310-340 | colossalai/shardformer/policies/_qwen3_tf4.py:311-341 | colossalai/shardformer/policies/_qwen3_tf5.py:331-361 | colossalai/shardformer/policies/command.py:282-309 | colossalai/shardformer/policies/mistral.py:265-292 \u2014 These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_llama_tf4.py"},"region":{"startLine":304}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2ecca27d7ee433e8465cbcdbb8ae7fd790eeb2085e801955283976d719baaa8"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (7 members, 50\u002B identical tokens): applications/ColossalChat/coati/trainer/dpo.py:124-404 | applications/ColossalChat/coati/trainer/dpo.py:407-643 | applications/ColossalChat/coati/trainer/kto.py:120-263 | applications/ColossalChat/coati/trainer/kto.py:266-355 | applications/ColossalChat/coati/trainer/orpo.py:110-238 | applications/ColossalChat/coati/trainer/orpo.py:241-330 | applications/ColossalChat/coati/trainer/rm.py:108-197 \u2014 These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/dpo.py"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc91cedb7ccd2ac2d25021f568c3d7fd923d6bf4e3a360636a1233107f8f01a8"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (7 members, 50\u002B identical tokens): colossalai/booster/plugin/dp_plugin_base.py:35-76 | colossalai/booster/plugin/gemini_plugin.py:603-653 | colossalai/booster/plugin/hybrid_parallel_plugin.py:1403-1449 | examples/language/data_utils.py:51-94 | examples/language/deepseek/data_utils.py:51-94 | examples/language/llama/data_utils.py:51-94 | examples/language/mixtral/data_utils.py:51-94 \u2014 These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/plugin/dp_plugin_base.py"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"0837dadd8ce36b010ad6077fd090d59601280ef1248366845b5b36038d5a0d27"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (7 members, 50\u002B identical tokens): colossalai/inference/modeling/layers/baichuan_tp_linear.py:17-56 | colossalai/shardformer/layer/linear.py:288-322 | colossalai/shardformer/layer/linear.py:484-519 | colossalai/shardformer/layer/qkv_fused_linear.py:317-359 | colossalai/shardformer/layer/qkv_fused_linear.py:521-557 | colossalai/shardformer/layer/qkv_fused_linear.py:912-946 | colossalai/shardformer/layer/qkv_fused_linear.py:1112-1139 \u2014 These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/modeling/layers/baichuan_tp_linear.py"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"2397b7228457c5b728d3de49fe30480799d872609999bd2b5852e3410043d7e6"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (7 members, 50\u002B identical tokens): colossalai/shardformer/layer/_operation.py:99-167 | colossalai/shardformer/layer/_operation.py:190-248 | colossalai/shardformer/layer/_operation.py:273-338 | colossalai/shardformer/layer/_operation.py:361-415 | colossalai/shardformer/layer/_operation.py:575-646 | colossalai/shardformer/layer/_operation.py:760-819 | colossalai/shardformer/layer/_operation.py:908-982 \u2014 These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/_operation.py"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ecbccb9601967a0006963fde67fb5b2347901d41706ad4b164cdc3cabaa38d9"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (6 members, 50\u002B identical tokens): applications/ColossalChat/coati/trainer/grpo.py:171-193 | applications/ColossalChat/coati/trainer/kto.py:96-117 | applications/ColossalChat/coati/trainer/orpo.py:86-107 | applications/ColossalChat/coati/trainer/ppo.py:162-184 | applications/ColossalChat/coati/trainer/rm.py:84-105 | applications/ColossalChat/coati/trainer/sft.py:72-96 \u2014 These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/grpo.py"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"2327e580bbd48bee3de4aa04511011143e4f9d60dd8deaf9db98363af719e4d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (6 members, 50\u002B identical tokens): colossalai/auto_parallel/tensor_shard/node_handler/permute_handler.py:28-75 | colossalai/auto_parallel/tensor_shard/node_handler/softmax_handler.py:29-55 | colossalai/auto_parallel/tensor_shard/node_handler/split_handler.py:28-62 | colossalai/auto_parallel/tensor_shard/node_handler/sum_handler.py:28-81 | colossalai/auto_parallel/tensor_shard/node_handler/transpose_handler.py:28-64 | colossalai/auto_parallel/tensor_shard/node_handler/view_handler.py:32-52 \u2014 These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/permute_handler.py"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b3c129e95e83e903398689594503d172333b66ffc34d85573bb4296f29978b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (6 members, 50\u002B identical tokens): colossalai/fx/profiler/experimental/profiler_module/convolution.py:18-33 | colossalai/fx/profiler/experimental/profiler_module/convolution.py:40-59 | colossalai/fx/profiler/experimental/profiler_module/convolution.py:66-89 | colossalai/fx/tracer/meta_patch/patched_module/convolution.py:12-21 | colossalai/fx/tracer/meta_patch/patched_module/convolution.py:28-41 | colossalai/fx/tracer/meta_patch/patched_module/convolution.py:48-65 \u2014 These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/profiler/experimental/profiler_module/convolution.py"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfba56ffa7d626d392306e6918428a9ff7595699c59fb9b108e8bcbfddcf4825"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (6 members, 50\u002B identical tokens): colossalai/fx/profiler/experimental/profiler_module/convolution.py:96-117 | colossalai/fx/profiler/experimental/profiler_module/convolution.py:124-151 | colossalai/fx/profiler/experimental/profiler_module/convolution.py:158-193 | colossalai/fx/tracer/meta_patch/patched_module/convolution.py:72-85 | colossalai/fx/tracer/meta_patch/patched_module/convolution.py:92-113 | colossalai/fx/tracer/meta_patch/patched_module/convolution.py:120-149 \u2014 These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/profiler/experimental/profiler_module/convolution.py"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"23e646444891d3ea4d7959c9d9b685ff5c68da2df5c30c9377cd6c8904647465"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (6 members, 50\u002B identical tokens): colossalai/initialize.py:85-112 | colossalai/initialize.py:122-151 | colossalai/initialize.py:155-184 | colossalai/legacy/initialize.py:134-162 | colossalai/legacy/initialize.py:173-203 | colossalai/legacy/initialize.py:209-239 \u2014 These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/initialize.py"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9c5d9c09a6195047815b2344103bbb803f707e1298a2ce1c035bf2a2a76aff4"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (6 members, 50\u002B identical tokens): colossalai/legacy/inference/tensor_parallel/modeling/chatglm2.py:111-215 | colossalai/shardformer/modeling/bloom.py:1096-1156 | colossalai/shardformer/modeling/chatglm2.py:285-336 | colossalai/shardformer/modeling/chatglm2_6b/modeling_chatglm.py:1084-1128 | colossalai/shardformer/modeling/falcon.py:743-815 | colossalai/shardformer/modeling/gptj.py:282-353 \u2014 These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/tensor_parallel/modeling/chatglm2.py"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e5912adfdefba699677334bf8da6f4ed8577161184a4c939776586c76fce704"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): applications/Colossal-LLaMA/colossal_llama/utils/utils.py:26-36 | examples/language/deepseek/model_utils.py:22-32 | examples/language/llama/model_utils.py:22-32 | examples/language/mixtral/model_utils.py:22-32 | examples/language/model_utils.py:22-32 \u2014 These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/colossal_llama/utils/utils.py"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"ecf8cb12878189e47c6e4ee2ef6f220a1252c8a6b907fe9f99cdc047e2bb2ab8"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): colossalai/auto_parallel/tensor_shard/node_handler/strategy/reshape_generator.py:161-192 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/reshape_generator.py:201-238 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/softmax_generator.py:66-95 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/sum_generator.py:63-103 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/unary_elementwise_generator.py:54-80 \u2014 These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/reshape_generator.py"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cd480079d2dbb6c2eb846f24214b6a39f9f4e39c4e45ece45c222be2ef52d31"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): colossalai/inference/modeling/models/nopadding_llama.py:328-371 | colossalai/inference/modeling/models/nopadding_llama.py:595-674 | colossalai/legacy/zero/sharded_model/sharded_model_v2.py:484-581 | colossalai/shardformer/layer/parallel_module.py:73-177 | colossalai/shardformer/layer/parallel_module.py:248-355 \u2014 These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/modeling/models/nopadding_llama.py"},"region":{"startLine":328}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e452e5892751b045b95c13f2a6c954a320d7a4c7f9f70e36fcd06dfcb6b1437"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): colossalai/inference/utils.py:23-64 | colossalai/legacy/inference/hybridengine/modeling/_utils.py:27-68 | colossalai/legacy/inference/quant/smoothquant/models/llama.py:513-554 | colossalai/legacy/inference/tensor_parallel/modeling/_utils.py:27-68 | colossalai/legacy/inference/tensor_parallel/modeling/chatglm2.py:35-65 \u2014 These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/utils.py"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3fe9a01525d8c255479ce89813aad3d5e3079ec4ff3d67961c16a4d4fb1d27a"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): colossalai/legacy/inference/hybridengine/modeling/llama.py:212-339 | colossalai/legacy/inference/quant/smoothquant/models/llama.py:571-714 | colossalai/legacy/inference/tensor_parallel/modeling/bloom.py:84-263 | colossalai/legacy/inference/tensor_parallel/modeling/chatglm2.py:111-215 | colossalai/legacy/inference/tensor_parallel/modeling/llama.py:130-259 \u2014 These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/hybridengine/modeling/llama.py"},"region":{"startLine":212}}}],"partialFingerprints":{"codehealthFindingId/v1":"9216ac0528560b04d761bd5b33d8ccd6b9672544921a0b7c5b8b913dc7e82024"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): colossalai/legacy/moe/openmoe/model/modeling_openmoe.py:717-830 | colossalai/legacy/moe/openmoe/model/openmoe_policy.py:249-406 | colossalai/shardformer/modeling/_mixtral_tf4.py:202-405 | colossalai/shardformer/modeling/_mixtral_tf5.py:547-771 | colossalai/shardformer/modeling/deepseek.py:302-473 \u2014 These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/openmoe/model/modeling_openmoe.py"},"region":{"startLine":717}}}],"partialFingerprints":{"codehealthFindingId/v1":"916308b08d579a7fc710fe8121a2bc048fa0189c4fe80146c2cbb707fd8b5e0f"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): colossalai/legacy/nn/layer/parallel_1d/layers.py:566-587 | colossalai/shardformer/layer/linear.py:154-178 | colossalai/shardformer/layer/linear.py:332-376 | colossalai/shardformer/layer/qkv_fused_linear.py:956-998 | colossalai/shardformer/layer/qkv_fused_linear.py:1337-1355 \u2014 These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_1d/layers.py"},"region":{"startLine":566}}}],"partialFingerprints":{"codehealthFindingId/v1":"7bab4792be353e699dd35943c78682ebc7374dfd7f00c41c177d8889a0b17244"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): colossalai/_analyzer/fx/tracer/tracer.py:172-233 | colossalai/_analyzer/fx/tracer/tracer.py:309-334 | colossalai/fx/tracer/experimental.py:337-364 | colossalai/fx/tracer/tracer.py:323-445 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/fx/tracer/tracer.py"},"region":{"startLine":172}}}],"partialFingerprints":{"codehealthFindingId/v1":"f15d5cbcc4b4e75035c2638df24d4be07efc8eb500666afe814adba029459906"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py:262-406 | colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py:525-692 | colossalai/checkpoint_io/moe_checkpoint.py:155-288 | colossalai/checkpoint_io/moe_checkpoint.py:440-576 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":262}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d9f02eb96ac7b31f2be3c07215b6d94367071c067cbc09f6a8da5e7393f1caf"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): colossalai/legacy/inference/hybridengine/modeling/llama.py:395-489 | colossalai/legacy/inference/quant/smoothquant/models/llama.py:128-232 | colossalai/legacy/inference/tensor_parallel/modeling/chatglm2.py:395-545 | colossalai/legacy/inference/tensor_parallel/modeling/llama.py:315-409 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/hybridengine/modeling/llama.py"},"region":{"startLine":395}}}],"partialFingerprints":{"codehealthFindingId/v1":"94044df2b364304ce8ece59d0a9068e8d22360753486257073a1dafa29a4452e"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): colossalai/legacy/inference/tensor_parallel/modeling/bloom.py:281-342 | colossalai/shardformer/modeling/bloom.py:338-409 | colossalai/shardformer/modeling/falcon.py:371-450 | colossalai/shardformer/modeling/gpt2.py:365-430 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/tensor_parallel/modeling/bloom.py"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4cce5e8806ae2322ede95809389ce4ff7021034c98f08746d939c7b1e393e1f"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): colossalai/legacy/moe/openmoe/model/openmoe_policy.py:90-106 | colossalai/shardformer/policies/_mixtral_tf4.py:288-308 | colossalai/shardformer/policies/_mixtral_tf5.py:315-335 | colossalai/shardformer/policies/deepseek.py:298-318 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/openmoe/model/openmoe_policy.py"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"b51cb35a8682b516479774bde3c9345ee4313890ef089c4b25bcdc939ab2c7af"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): colossalai/legacy/nn/layer/parallel_1d/layers.py:975-988 | colossalai/legacy/nn/layer/parallel_2d/layers.py:848-858 | colossalai/legacy/nn/layer/parallel_2p5d/layers.py:859-872 | colossalai/shardformer/layer/embedding.py:388-400 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_1d/layers.py"},"region":{"startLine":975}}}],"partialFingerprints":{"codehealthFindingId/v1":"c16525b46611e94a174785408f420fc41106e4fe2ca548e7af911dc2ec7df877"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): colossalai/legacy/nn/layer/parallel_2d/layers.py:423-463 | colossalai/legacy/nn/layer/parallel_2p5d/layers.py:436-476 | colossalai/legacy/nn/layer/parallel_3d/layers.py:703-742 | colossalai/legacy/nn/layer/vanilla/layers.py:166-190 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2d/layers.py"},"region":{"startLine":423}}}],"partialFingerprints":{"codehealthFindingId/v1":"e45a9576c2ab97edbc2770c1de7c1577f12317d3c72c61d99429f592269df14a"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): colossalai/legacy/zero/sharded_model/sharded_model_v2.py:484-581 | colossalai/shardformer/layer/parallel_module.py:73-177 | colossalai/shardformer/layer/parallel_module.py:248-355 | colossalai/zero/gemini/gemini_ddp.py:647-817 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/zero/sharded_model/sharded_model_v2.py"},"region":{"startLine":484}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5278d5cc50ca4ad5dcd556cea12bdf9ee3916226e651b2b4665aa0aaea5ac23"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): colossalai/shardformer/modeling/_bert_tf4.py:1017-1025 | colossalai/shardformer/modeling/_bert_tf4.py:1029-1037 | colossalai/shardformer/modeling/_bert_tf5.py:1030-1038 | colossalai/shardformer/modeling/_bert_tf5.py:1042-1050 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":1017}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b843089dcbc2962a548fa666f27aee869a2ed40e798dc81a51f0216b84bc0de"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): colossalai/shardformer/modeling/_deepseek_v3_tf5.py:101-164 | colossalai/shardformer/modeling/_mixtral_tf4.py:108-173 | colossalai/shardformer/modeling/_mixtral_tf5.py:460-518 | colossalai/shardformer/modeling/deepseek.py:136-203 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_deepseek_v3_tf5.py"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"a244a1ab558abe91e5dd6c7eba1779424b6879b4ed2cb30d221af45128620e8a"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): colossalai/shardformer/modeling/_llama_tf4.py:62-261 | colossalai/shardformer/modeling/_llama_tf5.py:97-303 | colossalai/shardformer/modeling/command.py:58-240 | colossalai/shardformer/modeling/falcon.py:208-351 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_llama_tf4.py"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f5661e9368e107b6956baf5d8d44a8387aaf2af044dcc28a99b2601768e4676"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): colossalai/shardformer/modeling/_vit_tf4.py:140-222 | colossalai/shardformer/modeling/_vit_tf4.py:226-333 | colossalai/shardformer/modeling/_vit_tf5.py:61-147 | colossalai/shardformer/modeling/_vit_tf5.py:151-262 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_vit_tf4.py"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"76bffb1fbcbb4a0a6a5e09354eaaa5be3058be35f131b1ca42bd4e9744667028"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): colossalai/shardformer/modeling/_whisper_tf4.py:869-989 | colossalai/shardformer/modeling/_whisper_tf5.py:387-504 | colossalai/shardformer/modeling/t5.py:293-400 | colossalai/shardformer/modeling/t5.py:433-563 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_whisper_tf4.py"},"region":{"startLine":869}}}],"partialFingerprints":{"codehealthFindingId/v1":"a62fae358def41988942115c8d2eeaf2de792dd53d78bed9e4b04f1b081a3531"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): colossalai/shardformer/policies/_bert_tf4.py:46-360 | colossalai/shardformer/policies/_bert_tf5.py:46-367 | colossalai/shardformer/policies/bloom.py:37-274 | colossalai/shardformer/policies/gpt2.py:39-285 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_bert_tf4.py"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"a94eb6d37f24d7fbb30de02c57cc0d56a856ea7e5e2697b3ac28b6942db67afb"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): colossalai/shardformer/policies/_deepseek_v3_tf4.py:158-164 | colossalai/shardformer/policies/_deepseek_v3_tf5.py:165-171 | colossalai/shardformer/policies/_mixtral_tf4.py:424-431 | colossalai/shardformer/policies/_mixtral_tf5.py:451-458 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_deepseek_v3_tf4.py"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"71fe5bb9812500f051d1a41caaf5732afecfbec482a03360effd2cdd4da9cfcc"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): colossalai/shardformer/policies/_qwen2_tf4.py:404-458 | colossalai/shardformer/policies/_qwen2_tf5.py:403-457 | colossalai/shardformer/policies/_qwen3_tf4.py:403-444 | colossalai/shardformer/policies/_qwen3_tf5.py:423-468 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_qwen2_tf4.py"},"region":{"startLine":404}}}],"partialFingerprints":{"codehealthFindingId/v1":"35dd6f281d4a211b78870a7c271153eb9bdf50c8efad93895725126a2163ae15"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): colossalai/shardformer/policies/_vit_tf4.py:382-398 | colossalai/shardformer/policies/_vit_tf4.py:418-434 | colossalai/shardformer/policies/_vit_tf5.py:232-248 | colossalai/shardformer/policies/_vit_tf5.py:268-284 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_vit_tf4.py"},"region":{"startLine":382}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd1229ad21ea69e60cdcba7901049efc3d8a39136c03b3128693932b6fe6ae65"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): colossalai/shardformer/policies/_whisper_tf4.py:594-679 | colossalai/shardformer/policies/_whisper_tf4.py:682-722 | colossalai/shardformer/policies/_whisper_tf5.py:581-666 | colossalai/shardformer/policies/_whisper_tf5.py:669-709 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_whisper_tf4.py"},"region":{"startLine":594}}}],"partialFingerprints":{"codehealthFindingId/v1":"7777b29e8974e7cf400393227125917040d362443f32655d29d23212839ae2b8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (123 lines \u00D7 2): colossalai/shardformer/modeling/_qwen2_tf4.py:634-756 | colossalai/shardformer/modeling/_qwen3_tf4.py:626-748 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_qwen2_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_qwen3_tf4.py\u0060 as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1214 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_qwen2_tf4.py:634\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen2_tf4.py"},"region":{"startLine":634}}}],"partialFingerprints":{"codehealthFindingId/v1":"04db4ba21bcd9b99032183b8e5b57fa38099ae6186d8163e7b765efebe839c8d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (117 lines \u00D7 2): applications/ColossalChat/coati/distributed/grpo_consumer.py:260-376 | applications/ColossalChat/coati/distributed/zero_bubble/grpo_consumer.py:234-350 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/distributed/grpo_consumer.py\u0060 and \u0060applications/ColossalChat/coati/distributed/zero_bubble/grpo_consumer.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 407 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/grpo_consumer.py"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6ce7be927d3d3e5d71c6643655caaad98354891cf5a76053578e4f27cfe5a45"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (110 lines \u00D7 2): colossalai/shardformer/modeling/_qwen2_tf5.py:61-170 | colossalai/shardformer/modeling/_qwen3_tf5.py:62-171 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_qwen2_tf5.py\u0060 and \u0060colossalai/shardformer/modeling/_qwen3_tf5.py\u0060 as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 628 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen2_tf5.py"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"01342db394f76cf1d75336afd9b64f505f614fb38a83314d4fe6fa3725634244"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (96 lines \u00D7 2): colossalai/shardformer/policies/_bert_tf4.py:265-360 | colossalai/shardformer/policies/_bert_tf5.py:272-367 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 475 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/policies/_bert_tf4.py:265\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_bert_tf4.py"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1630491b86ad1f7a758ebbefcabac21e85e70b0a12009de4226f48f12dc7aab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (93\u201395 lines \u00D7 2): colossalai/shardformer/modeling/_qwen2_tf4.py:95-189 | colossalai/shardformer/modeling/_qwen3_tf4.py:95-187 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_qwen2_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_qwen3_tf4.py\u0060 as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1214 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen2_tf4.py"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d3ccf2f2b87aa7d551209e4dc78d7d850c91c965cbb02099a8d366399d67799"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (94 lines \u00D7 2): colossalai/shardformer/modeling/_whisper_tf4.py:1017-1110 | colossalai/shardformer/modeling/_whisper_tf5.py:532-625 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_whisper_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_whisper_tf5.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 257 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_whisper_tf4.py"},"region":{"startLine":1017}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f69c145dff09abe3efb9bcf7cc5be9ae5098c54b73b4c520ea2457dd5c5b3d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (89 lines \u00D7 2): colossalai/shardformer/policies/_whisper_tf4.py:372-460 | colossalai/shardformer/policies/_whisper_tf5.py:373-461 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_whisper_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_whisper_tf5.py\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 483 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/policies/_whisper_tf4.py:372\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_whisper_tf4.py"},"region":{"startLine":372}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1e041591f70881212ed89e7ec59ac4e2681ad4b7b221dff7ffa01c1032b0dab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (86 lines \u00D7 2): colossalai/shardformer/policies/_whisper_tf4.py:594-679 | colossalai/shardformer/policies/_whisper_tf5.py:581-666 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_whisper_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_whisper_tf5.py\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 483 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. Note first that the copies are not typed on the same thing: \u0060WhisperForConditionalGeneration\u0060 names \u0060transformers\u0060 in one and \u0060transformers.models.whisper.modeling_whisper\u0060 in another \u2014 different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_whisper_tf4.py"},"region":{"startLine":594}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4b39ddbd467c5af0417541cbec8d8db4debef76be9c2127ae9f697e94337965"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201384 lines \u00D7 6): colossalai/shardformer/modeling/_qwen2_tf4.py:772-807 | colossalai/shardformer/modeling/_qwen3_tf4.py:764-799 | colossalai/shardformer/modeling/bloom.py:1106-1121 | colossalai/shardformer/modeling/falcon.py:753-768 | colossalai/shardformer/modeling/mistral.py:568-603 | colossalai/shardformer/modeling/opt.py:855-938 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_qwen2_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_qwen3_tf4.py\u0060 as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1214 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_qwen2_tf4.py:772\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen2_tf4.py"},"region":{"startLine":772}}}],"partialFingerprints":{"codehealthFindingId/v1":"47b67bbbd26c9f0b8d67ce3dce44cf0e71ebf9b87b76b0d958bcf4248838b763"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (74\u201377 lines \u00D7 2): colossalai/shardformer/policies/_mixtral_tf4.py:209-282 | colossalai/shardformer/policies/_mixtral_tf5.py:233-309 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_mixtral_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_mixtral_tf5.py\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 408 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/policies/_mixtral_tf4.py:209\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_mixtral_tf4.py"},"region":{"startLine":209}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e1bc8ebc91165d6a4a2f2707ec50e0349b360b2db7a7630abf86040fc1a1ad3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (74 lines \u00D7 2): applications/ColossalEval/colossal_eval/models/huggingface.py:335-408 | applications/ColossalEval/colossal_eval/models/vllm.py:218-291 \u2014 before extracting anything, compare \u0060applications/ColossalEval/colossal_eval/models/huggingface.py\u0060 and \u0060applications/ColossalEval/colossal_eval/models/vllm.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 157 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/models/huggingface.py"},"region":{"startLine":335}}}],"partialFingerprints":{"codehealthFindingId/v1":"de0e04d57f42a0511b734bf21580ee468121bba9247709224bbb251bb80b406f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (73\u201374 lines \u00D7 2): colossalai/shardformer/policies/_llama_tf4.py:36-108 | colossalai/shardformer/policies/_llama_tf5.py:36-109 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_llama_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_llama_tf5.py\u0060 as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 404 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060colossalai/shardformer/policies/_llama_tf4.py:109\u0060 calls \u0060getattr\u0060 and \u0060colossalai/shardformer/policies/_llama_tf5.py:111\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_llama_tf4.py"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e39e09f13ce69f9d1b48bd53cb2a11afd4226777bb6218b37e6741f5354c261"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (71 lines \u00D7 2): colossalai/shardformer/policies/_mixtral_tf4.py:51-121 | colossalai/shardformer/policies/_mixtral_tf5.py:57-127 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_mixtral_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_mixtral_tf5.py\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 408 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/policies/_mixtral_tf4.py:51\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/shardformer/policies/_mixtral_tf5.py:56\u0060 calls \u0060NotImplementedError\u0060 and \u0060colossalai/shardformer/policies/_mixtral_tf4.py:50\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_mixtral_tf4.py"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"77d47203d9e5cbff646e0b2bd1220b08b6c32ae7c87d635bbf22b2804ca5435f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (69\u201370 lines \u00D7 2): colossalai/shardformer/modeling/_qwen2_tf5.py:539-607 | colossalai/shardformer/modeling/_qwen3_tf5.py:540-609 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_qwen2_tf5.py\u0060 and \u0060colossalai/shardformer/modeling/_qwen3_tf5.py\u0060 as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 628 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_qwen2_tf5.py:539\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen2_tf5.py"},"region":{"startLine":539}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f3bae0e1062e26851bf2ee6acf6d95e4fbec8a9f50c99b76e17d9021d6925d7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (70 lines \u00D7 2): colossalai/shardformer/policies/_qwen2_tf4.py:236-305 | colossalai/shardformer/policies/_qwen2_tf5.py:235-304 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_qwen2_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_qwen2_tf5.py\u0060 as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 399 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/policies/_qwen2_tf4.py:236\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_qwen2_tf4.py"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd90426dddbd06423e468cfc60033b579d628a7e5813558d184d60757ffa1a21"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (70 lines \u00D7 2): colossalai/shardformer/policies/_qwen3_tf4.py:236-305 | colossalai/shardformer/policies/_qwen3_tf5.py:236-305 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_qwen3_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_qwen3_tf5.py\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 345 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/policies/_qwen3_tf4.py:236\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_qwen3_tf4.py"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"69b279abccfc4830ab545ad7d263d1d61d034e2028e46950ab22ee73ad97c336"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (68 lines \u00D7 2): colossalai/shardformer/modeling/_bert_tf4.py:384-451 | colossalai/shardformer/modeling/_bert_tf5.py:397-464 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 45 separate duplicated blocks between them, totalling at least 882 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":384}}}],"partialFingerprints":{"codehealthFindingId/v1":"e029f1d671ef6264c7a3b37258a21ddb33bc5726fbaaea5a09da3158066caf02"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (67\u201368 lines \u00D7 2): colossalai/shardformer/modeling/t5.py:293-359 | colossalai/shardformer/modeling/t5.py:433-500 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060colossalai/shardformer/modeling/t5.py:504\u0060 calls \u0060_shift_right\u0060 and \u0060colossalai/shardformer/modeling/t5.py:362\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/t5.py"},"region":{"startLine":293}}}],"partialFingerprints":{"codehealthFindingId/v1":"57bddb76a036cb00050457f35d905b066c5a2099b50e706e0a20409573966149"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (67 lines \u00D7 2): colossalai/shardformer/modeling/_whisper_tf4.py:913-979 | colossalai/shardformer/modeling/_whisper_tf5.py:428-494 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_whisper_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_whisper_tf5.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 257 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_whisper_tf4.py"},"region":{"startLine":913}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4628197828726922ae5c9c47b17243783b58fccf498503444e5ec4d3d3f5dfc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (66 lines \u00D7 2): colossalai/shardformer/modeling/_bert_tf4.py:63-128 | colossalai/shardformer/modeling/_bert_tf5.py:65-130 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 45 separate duplicated blocks between them, totalling at least 882 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7cb6a8ba82c53001b0d7040bc3da4898c98f001f0172ce6ec7872e18d1c61b6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (66 lines \u00D7 2): colossalai/shardformer/modeling/_qwen2_tf5.py:468-533 | colossalai/shardformer/modeling/_qwen3_tf5.py:469-534 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_qwen2_tf5.py\u0060 and \u0060colossalai/shardformer/modeling/_qwen3_tf5.py\u0060 as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 628 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen2_tf5.py"},"region":{"startLine":468}}}],"partialFingerprints":{"codehealthFindingId/v1":"85ebd6cbc1867f89a0012037440faa25a67b5e9aaef87eb46c348523582b6bd0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (65 lines \u00D7 2): colossalai/shardformer/modeling/_qwen2_tf4.py:197-261 | colossalai/shardformer/modeling/_qwen3_tf4.py:195-259 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_qwen2_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_qwen3_tf4.py\u0060 as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1214 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_qwen2_tf4.py:197\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen2_tf4.py"},"region":{"startLine":197}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c81ed0446ebf07a6128a757f6079f7a1ae1d10bc94cd0c2df17121242b38085"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (64\u201365 lines \u00D7 2): colossalai/shardformer/modeling/_whisper_tf4.py:1130-1193 | colossalai/shardformer/modeling/_whisper_tf5.py:645-709 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_whisper_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_whisper_tf5.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 257 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_whisper_tf4.py"},"region":{"startLine":1130}}}],"partialFingerprints":{"codehealthFindingId/v1":"66e8c32e60651da87ea3a1dae6320b9795d69f6f4062178ea74e41f5643a7ef2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (53\u201358 lines \u00D7 2): colossalai/shardformer/policies/_deepseek_v3_tf4.py:29-81 | colossalai/shardformer/policies/_deepseek_v3_tf5.py:29-86 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_deepseek_v3_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_deepseek_v3_tf5.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_deepseek_v3_tf4.py"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6a2af33a48dd4a6eed4887518e899af15e17075c30338981a853b659f07878d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (57 lines \u00D7 2): applications/ColossalChat/coati/distributed/grpo_consumer.py:406-462 | applications/ColossalChat/coati/distributed/zero_bubble/grpo_consumer.py:356-412 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/distributed/grpo_consumer.py\u0060 and \u0060applications/ColossalChat/coati/distributed/zero_bubble/grpo_consumer.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 407 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/coati/distributed/grpo_consumer.py:406\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/grpo_consumer.py"},"region":{"startLine":406}}}],"partialFingerprints":{"codehealthFindingId/v1":"77282304a31a6a1d8139087952d74252e1022a6a744616272f3629aadf1f8ebc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (57 lines \u00D7 2): colossalai/legacy/inference/hybridengine/modeling/llama.py:416-472 | colossalai/legacy/inference/tensor_parallel/modeling/llama.py:336-392 \u2014 before extracting anything, compare \u0060colossalai/legacy/inference/hybridengine/modeling/llama.py\u0060 and \u0060colossalai/legacy/inference/tensor_parallel/modeling/llama.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 250 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/hybridengine/modeling/llama.py"},"region":{"startLine":416}}}],"partialFingerprints":{"codehealthFindingId/v1":"91c706e202a940481b4f8cc99cc150e8a93e82a01f0474513258fc237c7a0686"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (54 lines \u00D7 2): colossalai/shardformer/modeling/gptj.py:740-793 | colossalai/shardformer/modeling/gptj.py:924-977 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/gptj.py"},"region":{"startLine":740}}}],"partialFingerprints":{"codehealthFindingId/v1":"9066cac7856b7387770f9f527632c92e2eabb9e674ba5f816dd38cbfab180bfa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (53 lines \u00D7 2): colossalai/shardformer/modeling/_llama_tf4.py:310-362 | colossalai/shardformer/modeling/_llama_tf5.py:352-404 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_llama_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_llama_tf5.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 483 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_llama_tf4.py"},"region":{"startLine":310}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1d7da2c2127a9f80f4808d3b03d1c9d0b6b0fdf1178880a9b53a32ffaf4712a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (53 lines \u00D7 2): colossalai/shardformer/modeling/_vit_tf4.py:241-293 | colossalai/shardformer/modeling/_vit_tf5.py:168-220 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_vit_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_vit_tf5.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 183 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_vit_tf4.py:241\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: \u0060ImageClassifierOutput\u0060 names \u0060transformers.modeling_outputs\u0060 in one and \u0060transformers.models.vit.modeling_vit\u0060 in another \u2014 different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_vit_tf4.py"},"region":{"startLine":241}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bc0de48e190db45e12ccea79d134cf153f74cc97a75a1b2fe7cfc897e0375d1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (53 lines \u00D7 2): colossalai/shardformer/policies/_qwen2_tf4.py:406-458 | colossalai/shardformer/policies/_qwen2_tf5.py:405-457 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_qwen2_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_qwen2_tf5.py\u0060 as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 399 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_qwen2_tf4.py"},"region":{"startLine":406}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e6d555cb19b8bb5576fdf5d90aeb5a5b48f080be87f403dd1b50c3010796add"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (52 lines \u00D7 2): colossalai/shardformer/modeling/_bert_tf4.py:570-621 | colossalai/shardformer/modeling/_bert_tf5.py:583-634 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 45 separate duplicated blocks between them, totalling at least 882 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_bert_tf4.py:570\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":570}}}],"partialFingerprints":{"codehealthFindingId/v1":"6646cebf78f0e9083a2542871269c230452901d46b0decca1dd803fb21ebb08b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (52 lines \u00D7 2): colossalai/shardformer/policies/_llama_tf4.py:473-524 | colossalai/shardformer/policies/_llama_tf5.py:471-522 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_llama_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_llama_tf5.py\u0060 as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 404 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_llama_tf4.py"},"region":{"startLine":473}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cea285c0abe58112c0ae8490bf03808b5022b9b79bdf3dc35a54c38b480baea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (38\u201351 lines \u00D7 4): colossalai/shardformer/policies/_qwen2_tf4.py:404-454 | colossalai/shardformer/policies/_qwen2_tf5.py:403-453 | colossalai/shardformer/policies/_qwen3_tf4.py:403-440 | colossalai/shardformer/policies/_qwen3_tf5.py:423-464 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_qwen2_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_qwen2_tf5.py\u0060 as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 399 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/policies/_qwen2_tf4.py:404\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_qwen2_tf4.py"},"region":{"startLine":404}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9fe981ec09c3a55e9faafba782b11ed65e93be1988328928bb3a58518623101"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (50 lines \u00D7 2): colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py:702-751 | colossalai/checkpoint_io/moe_checkpoint.py:586-635 \u2014 before extracting anything, compare \u0060colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py\u0060 and \u0060colossalai/checkpoint_io/moe_checkpoint.py\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 249 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: \u0060CheckpointIndexFile\u0060 names \u0060.index_file\u0060 in one and \u0060colossalai.checkpoint_io\u0060 in another \u2014 different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":702}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e2bc1e6c40a7ffaa89e64f8b4d26f9f8c17774a52f2ea693ba7fd5503804594"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (50 lines \u00D7 2): colossalai/shardformer/policies/_llama_tf4.py:249-298 | colossalai/shardformer/policies/_llama_tf5.py:247-296 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_llama_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_llama_tf5.py\u0060 as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 404 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/policies/_llama_tf4.py:249\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_llama_tf4.py"},"region":{"startLine":249}}}],"partialFingerprints":{"codehealthFindingId/v1":"36dc74f933a8abfe969fb853249aa1378c7c333b3833c81021a116cd9843a482"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (49 lines \u00D7 2): applications/ColossalChat/coati/distributed/producer.py:148-196 | applications/ColossalChat/coati/distributed/zero_bubble/producer.py:142-190 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/distributed/producer.py\u0060 and \u0060applications/ColossalChat/coati/distributed/zero_bubble/producer.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 234 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/coati/distributed/producer.py:148\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: \u0060BACKEND_MAP\u0060 names \u0060.inference_backend\u0060 in one and \u0060coati.distributed.inference_backend\u0060 in another \u2014 different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/producer.py"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"629880400880460ee0700916fe5a819078f2ca75d1120e39ec826695590e3214"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (45\u201349 lines \u00D7 2): colossalai/shardformer/modeling/_qwen2_tf4.py:521-565 | colossalai/shardformer/modeling/_qwen3_tf4.py:507-555 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_qwen2_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_qwen3_tf4.py\u0060 as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1214 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_qwen3_tf4.py:507\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen2_tf4.py"},"region":{"startLine":521}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4b344ab85d4defa207a98e38f7d4bd84604ae9c34b2ccda08eb5c97e9048776"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (49 lines \u00D7 2): colossalai/shardformer/policies/_vit_tf4.py:331-379 | colossalai/shardformer/policies/_vit_tf5.py:181-229 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_vit_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_vit_tf5.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 133 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_vit_tf4.py"},"region":{"startLine":331}}}],"partialFingerprints":{"codehealthFindingId/v1":"119ad4e8f9668663c0968498567756341b5e43ceea8a94ca7e50500320459d29"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (48 lines \u00D7 2): applications/ColossalChat/coati/distributed/producer.py:313-360 | applications/ColossalChat/coati/distributed/zero_bubble/producer.py:367-414 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/distributed/producer.py\u0060 and \u0060applications/ColossalChat/coati/distributed/zero_bubble/producer.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 234 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/producer.py"},"region":{"startLine":313}}}],"partialFingerprints":{"codehealthFindingId/v1":"f79381708d841f262432f1bbf7ee5df4dcf03c39fba4f4b38584a7811f30b557"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (46\u201348 lines \u00D7 2): applications/ColossalChat/coati/trainer/dpo.py:162-207 | applications/ColossalChat/coati/trainer/dpo.py:453-500 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/coati/trainer/dpo.py:162\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/dpo.py"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"42c9406b95102cc6393a8ad4f60c72ae224ca4c0c0fcbb4dec342cba1a4544b2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (48 lines \u00D7 2): colossalai/shardformer/modeling/_vit_tf4.py:175-222 | colossalai/shardformer/modeling/_vit_tf5.py:100-147 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_vit_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_vit_tf5.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 183 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_vit_tf4.py:175\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: \u0060ImageClassifierOutput\u0060 names \u0060transformers.modeling_outputs\u0060 in one and \u0060transformers.models.vit.modeling_vit\u0060 in another \u2014 different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_vit_tf4.py"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"501f2c4ce36b46cbf48a88aa1f291923173c96f5a1485d15cf10bfbddf8f872e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (48 lines \u00D7 2): colossalai/shardformer/modeling/gptj.py:675-722 | colossalai/shardformer/modeling/gptj.py:850-897 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/gptj.py"},"region":{"startLine":675}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9b27503f11ae7cc1c24e6a52c472b75cdfe8ad547ba058d821b32cc7df0fbd6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (48 lines \u00D7 2): colossalai/shardformer/policies/_llama_tf4.py:393-440 | colossalai/shardformer/policies/_llama_tf5.py:391-438 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_llama_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_llama_tf5.py\u0060 as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 404 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_llama_tf4.py"},"region":{"startLine":393}}}],"partialFingerprints":{"codehealthFindingId/v1":"cac8042b0fb3ebd9dfd04797c05f30f1041fca8c790a96fb80ac5ac7bd51374e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (45\u201346 lines \u00D7 2): applications/Colossal-LLaMA/colossal_llama/dataset/loader.py:64-109 | applications/ColossalChat/coati/dataset/loader.py:70-114 \u2014 before extracting anything, compare \u0060applications/Colossal-LLaMA/colossal_llama/dataset/loader.py\u0060 and \u0060applications/ColossalChat/coati/dataset/loader.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 90 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/colossal_llama/dataset/loader.py"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"3782afccf13e20d3363ced0e06c17f310e6b7b4de91c9ce2fe89823c5e0ded36"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (46 lines \u00D7 2): colossalai/legacy/moe/layer/experts.py:44-89 | colossalai/legacy/moe/layer/routers.py:44-89 \u2014 before extracting anything, compare \u0060colossalai/legacy/moe/layer/experts.py\u0060 and \u0060colossalai/legacy/moe/layer/routers.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 90 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/layer/experts.py"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6d09c67c6f7524aa88356a52629ea2d91b57e5e04d7bd23766f38c86defd25b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (46 lines \u00D7 2): colossalai/shardformer/modeling/_bert_tf4.py:871-916 | colossalai/shardformer/modeling/_bert_tf5.py:884-929 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 45 separate duplicated blocks between them, totalling at least 882 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":871}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b30f914904f21ea4827736984bc9064f128bc530b86318b086548801af9c81e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (46 lines \u00D7 2): colossalai/shardformer/policies/_mixtral_tf4.py:376-421 | colossalai/shardformer/policies/_mixtral_tf5.py:403-448 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_mixtral_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_mixtral_tf5.py\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 408 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_mixtral_tf4.py"},"region":{"startLine":376}}}],"partialFingerprints":{"codehealthFindingId/v1":"d70cf128084da99622ebed0a17ac60bbfc856adbeb6284ce59bb9ba28663ffa1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (40\u201345 lines \u00D7 9): colossalai/shardformer/policies/_llama_tf4.py:475-519 | colossalai/shardformer/policies/_llama_tf5.py:473-517 | colossalai/shardformer/policies/_mixtral_tf4.py:375-415 | colossalai/shardformer/policies/_mixtral_tf5.py:402-442 | colossalai/shardformer/policies/_qwen2_tf4.py:493-533 | colossalai/shardformer/policies/_qwen2_tf5.py:492-532 | colossalai/shardformer/policies/_qwen3_tf4.py:479-518 | colossalai/shardformer/policies/_qwen3_tf5.py:503-542 | colossalai/shardformer/policies/deepseek.py:382-424 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_llama_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_llama_tf5.py\u0060 as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 404 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/policies/_llama_tf4.py:475\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_llama_tf4.py"},"region":{"startLine":475}}}],"partialFingerprints":{"codehealthFindingId/v1":"e11c9ed3bef94af249fc4ef4a98817cb00fde1ccbea888ebeb8dc1d14fa39f17"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (44\u201345 lines \u00D7 3): colossalai/shardformer/modeling/bloom.py:338-381 | colossalai/shardformer/modeling/bloom.py:430-474 | colossalai/shardformer/modeling/bloom.py:556-600 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/bloom.py"},"region":{"startLine":338}}}],"partialFingerprints":{"codehealthFindingId/v1":"e03b46b2f0101921a1f9dfb98c80984ff84612da375e74474a580141946c9d5c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (44 lines \u00D7 4): colossalai/shardformer/modeling/_qwen2_tf4.py:776-819 | colossalai/shardformer/modeling/_qwen3_tf4.py:768-811 | colossalai/shardformer/modeling/command.py:588-631 | colossalai/shardformer/modeling/mistral.py:572-615 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_qwen2_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_qwen3_tf4.py\u0060 as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1214 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_qwen2_tf4.py:776\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen2_tf4.py"},"region":{"startLine":776}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c3a4528915fc46f9d235e2b5358805825de59fb2435c149282262a60459c2a1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (44 lines \u00D7 2): applications/ColossalChat/coati/models/generation.py:143-186 | applications/ColossalChat/coati/models/generation.py:310-353 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/models/generation.py"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6584371a8536111bc74afad9b1ffa79ed9ebd878917f8ea7e23484f346a0a54"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (43\u201344 lines \u00D7 2): colossalai/pipeline/schedule/interleaved_pp.py:350-393 | colossalai/pipeline/schedule/one_f_one_b.py:291-333 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/pipeline/schedule/interleaved_pp.py"},"region":{"startLine":350}}}],"partialFingerprints":{"codehealthFindingId/v1":"002a99f79063a1ad2410ec1aaa3628c1a2b9883a2c1eecc809bf81077590b30c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (43\u201344 lines \u00D7 2): colossalai/shardformer/modeling/_mixtral_tf4.py:613-655 | colossalai/shardformer/modeling/_mixtral_tf5.py:1002-1045 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_mixtral_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_mixtral_tf5.py\u0060 as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 581 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_mixtral_tf4.py"},"region":{"startLine":613}}}],"partialFingerprints":{"codehealthFindingId/v1":"00d7072ef5d94621691f89a8735d3324010dafbfdc004e9b349bd140c184173e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (40\u201343 lines \u00D7 2): applications/Colossal-LLaMA/colossal_llama/utils/stream_chat_patch.py:200-242 | colossalai/shardformer/modeling/chatglm2_6b/modeling_chatglm.py:1325-1364 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/Colossal-LLaMA/colossal_llama/utils/stream_chat_patch.py:200\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/colossal_llama/utils/stream_chat_patch.py"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"dced70a790f234a7070e34d1dbd5801d12b5374a1d6d4e8bce1bd3e6bb8825a0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (42 lines \u00D7 2): colossalai/shardformer/modeling/gpt2.py:561-602 | colossalai/shardformer/modeling/gptj.py:510-551 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/gpt2.py\u0060 and \u0060colossalai/shardformer/modeling/gptj.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 321 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/gptj.py:510\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/gpt2.py"},"region":{"startLine":561}}}],"partialFingerprints":{"codehealthFindingId/v1":"75d298022fcc5fe5f1b8a4b02892f7b73e073d2f22157140d9865465ad585758"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (41 lines \u00D7 2): colossalai/shardformer/policies/_whisper_tf4.py:682-722 | colossalai/shardformer/policies/_whisper_tf5.py:669-709 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_whisper_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_whisper_tf5.py\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 483 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: \u0060WhisperForConditionalGeneration\u0060 names \u0060transformers\u0060 in one and \u0060transformers.models.whisper.modeling_whisper\u0060 in another \u2014 different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_whisper_tf4.py"},"region":{"startLine":682}}}],"partialFingerprints":{"codehealthFindingId/v1":"15bf1d403c37a1434a2a030ac325d685b88bbf9b6827f85ce97dc934506f6998"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (39\u201340 lines \u00D7 7): colossalai/legacy/moe/openmoe/model/openmoe_policy.py:428-466 | colossalai/shardformer/modeling/_llama_tf4.py:283-321 | colossalai/shardformer/modeling/_llama_tf5.py:325-363 | colossalai/shardformer/modeling/_qwen2_tf4.py:282-321 | colossalai/shardformer/modeling/_qwen3_tf4.py:280-319 | colossalai/shardformer/modeling/command.py:261-299 | colossalai/shardformer/modeling/deepseek.py:493-532 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 7 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 7 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/openmoe/model/openmoe_policy.py"},"region":{"startLine":428}}}],"partialFingerprints":{"codehealthFindingId/v1":"0674bcafe18c7d4618913706bd92da969fd75cb4963013630aca3ade14e15264"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (36\u201340 lines \u00D7 2): colossalai/legacy/engine/schedule/_pipeline_schedule.py:322-357 | colossalai/legacy/engine/schedule/_pipeline_schedule_v2.py:65-104 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/engine/schedule/_pipeline_schedule.py"},"region":{"startLine":322}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a817d8fd2a03d0c19b46f76f2b031aa0c250aa36c313478d2efbe452b2d6f4d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (37\u201340 lines \u00D7 2): colossalai/legacy/inference/tensor_parallel/batch_infer_state.py:70-106 | colossalai/legacy/inference/tensor_parallel/engine.py:275-314 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/tensor_parallel/batch_infer_state.py"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"b195e665f1a564df6e25f5153dfff2414a91c2a0baf2f035a977a81c8cec5063"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (39\u201340 lines \u00D7 2): colossalai/legacy/inference/tensor_parallel/modeling/chatglm2.py:400-439 | colossalai/shardformer/modeling/chatglm2_6b/modeling_chatglm.py:445-483 \u2014 before extracting anything, compare \u0060colossalai/legacy/inference/tensor_parallel/modeling/chatglm2.py\u0060 and \u0060colossalai/shardformer/modeling/chatglm2_6b/modeling_chatglm.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 176 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/tensor_parallel/modeling/chatglm2.py"},"region":{"startLine":400}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4bb8da0ce0361eb3cccc1d0a5ba98245e6eaa84b8c5deeeccbbeb7054522303"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (40 lines \u00D7 2): colossalai/shardformer/modeling/_qwen2_tf5.py:191-230 | colossalai/shardformer/modeling/_qwen3_tf5.py:192-231 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_qwen2_tf5.py\u0060 and \u0060colossalai/shardformer/modeling/_qwen3_tf5.py\u0060 as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 628 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen2_tf5.py"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"cda22b4ea5540da1fe07565e0b8320ddd4168581a605b144237a4afae427d1db"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (40 lines \u00D7 2): colossalai/shardformer/modeling/_vit_tf4.py:294-333 | colossalai/shardformer/modeling/_vit_tf5.py:223-262 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_vit_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_vit_tf5.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 183 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_vit_tf4.py:294\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_vit_tf4.py"},"region":{"startLine":294}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb53c2873c0dce2725f9ea189b85a53006c42a12d8878ff608ae939e543ae544"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (40 lines \u00D7 2): colossalai/shardformer/modeling/bloom.py:462-501 | colossalai/shardformer/modeling/falcon.py:491-530 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/bloom.py\u0060 and \u0060colossalai/shardformer/modeling/falcon.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 594 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/bloom.py:462\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/bloom.py"},"region":{"startLine":462}}}],"partialFingerprints":{"codehealthFindingId/v1":"747e0d62417a0e26df1a8344b3234e00f0e38f596868351769573552e209b071"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (40 lines \u00D7 2): colossalai/shardformer/policies/_bert_tf4.py:363-402 | colossalai/shardformer/policies/_bert_tf5.py:370-409 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 475 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_bert_tf4.py"},"region":{"startLine":363}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2458c4cbd612b553ea9b34ff9afa1d04f14f4a05483bcde8ba3e7f094675558"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (36\u201339 lines \u00D7 2): colossalai/booster/plugin/hybrid_parallel_plugin.py:408-443 | colossalai/booster/plugin/hybrid_parallel_plugin.py:611-649 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/plugin/hybrid_parallel_plugin.py"},"region":{"startLine":408}}}],"partialFingerprints":{"codehealthFindingId/v1":"e680fabaf4ec9bd6c3979b06f3aa67baf42b62d22b120a9baa76d1ee183ee9e2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (39 lines \u00D7 2): colossalai/tensor/d_tensor/layout_converter.py:195-233 | colossalai/tensor/shape_consistency.py:183-221 \u2014 before extracting anything, compare \u0060colossalai/tensor/d_tensor/layout_converter.py\u0060 and \u0060colossalai/tensor/shape_consistency.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/tensor/d_tensor/layout_converter.py:195\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/tensor/d_tensor/layout_converter.py"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"e958489cea9aca73c50289706a0d21cae6f9c28e1e61577840f0c56bea9ba909"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (37\u201338 lines \u00D7 2): colossalai/legacy/moe/openmoe/model/modeling_openmoe.py:777-814 | colossalai/legacy/moe/openmoe/model/openmoe_policy.py:338-374 \u2014 before extracting anything, compare \u0060colossalai/legacy/moe/openmoe/model/modeling_openmoe.py\u0060 and \u0060colossalai/legacy/moe/openmoe/model/openmoe_policy.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060colossalai/legacy/moe/openmoe/model/openmoe_policy.py:376\u0060 calls \u0060is_last_stage\u0060 and \u0060colossalai/legacy/moe/openmoe/model/modeling_openmoe.py:816\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/openmoe/model/modeling_openmoe.py"},"region":{"startLine":777}}}],"partialFingerprints":{"codehealthFindingId/v1":"c606e1e84b94b98065302f8a7c28a06d4f6ea851e13eb96510baffc64ae648a6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (38 lines \u00D7 2): colossalai/shardformer/modeling/_llama_tf4.py:70-107 | colossalai/shardformer/modeling/_llama_tf5.py:107-144 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_llama_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_llama_tf5.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 483 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_llama_tf4.py"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"81ee3ca3542e7223819d7d5599d5645d0a596fd000ef3c9372b4d2ac0920ce38"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (38 lines \u00D7 2): colossalai/shardformer/modeling/_mixtral_tf4.py:681-718 | colossalai/shardformer/modeling/_mixtral_tf5.py:1075-1112 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_mixtral_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_mixtral_tf5.py\u0060 as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 581 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_mixtral_tf4.py:681\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_mixtral_tf4.py"},"region":{"startLine":681}}}],"partialFingerprints":{"codehealthFindingId/v1":"034b33adbf4ae9cfca205a1247babb55e4516d23d8dc4d0b620e8c73bc058a65"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201338 lines \u00D7 2): colossalai/shardformer/modeling/_vit_tf5.py:69-83 | colossalai/shardformer/modeling/_vit_tf5.py:161-198 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_vit_tf5.py:69\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_vit_tf5.py"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"289bd400a230c75e906f32dfffc37fd4abbdba6f5151a0bc0487c17b749c24a0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (37 lines \u00D7 3): colossalai/shardformer/policies/_deepseek_v3_tf4.py:39-75 | colossalai/shardformer/policies/_deepseek_v3_tf5.py:44-80 | colossalai/shardformer/policies/deepseek.py:219-258 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_deepseek_v3_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_deepseek_v3_tf5.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/policies/_deepseek_v3_tf4.py:39\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_deepseek_v3_tf4.py"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"4264dbee82e075d5bbb5cc0fdccefcf15177ae65dc0175744b6a88abe4037071"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (37 lines \u00D7 2): applications/ColossalChat/coati/distributed/grpo_consumer.py:497-533 | applications/ColossalChat/coati/distributed/zero_bubble/grpo_consumer.py:418-454 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/distributed/grpo_consumer.py\u0060 and \u0060applications/ColossalChat/coati/distributed/zero_bubble/grpo_consumer.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 407 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/coati/distributed/grpo_consumer.py:497\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060applications/ColossalChat/coati/distributed/zero_bubble/grpo_consumer.py:417\u0060 calls \u0060repeat_interleave\u0060, \u0060size\u0060 and \u0060applications/ColossalChat/coati/distributed/grpo_consumer.py:496\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/grpo_consumer.py"},"region":{"startLine":497}}}],"partialFingerprints":{"codehealthFindingId/v1":"915769b4c9e574f2fc032706a96ccc26486a5df0d2930a11fc95ff5d0f2533f6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (37 lines \u00D7 2): applications/ColossalChat/coati/distributed/grpo_consumer.py:561-597 | applications/ColossalChat/coati/distributed/zero_bubble/grpo_consumer.py:484-520 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/distributed/grpo_consumer.py\u0060 and \u0060applications/ColossalChat/coati/distributed/zero_bubble/grpo_consumer.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 407 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060applications/ColossalChat/coati/distributed/zero_bubble/grpo_consumer.py:521\u0060 calls \u0060get\u0060, \u0060remote\u0060 and \u0060applications/ColossalChat/coati/distributed/grpo_consumer.py:598\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/grpo_consumer.py"},"region":{"startLine":561}}}],"partialFingerprints":{"codehealthFindingId/v1":"d652e8cac42b8a57cd3cead2b7d6fff09084d5cf45729a32c411ae10981b2898"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (37 lines \u00D7 2): colossalai/kernel/triton/context_attn_unpad.py:51-87 | colossalai/kernel/triton/context_attn_unpad.py:229-265 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/kernel/triton/context_attn_unpad.py:51\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/context_attn_unpad.py"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"abb463d22d7e4e96f508334f83fb3b5e90bc368314c6407b40b65687ccb57141"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (37 lines \u00D7 2): colossalai/legacy/inference/tensor_parallel/modeling/chatglm2.py:175-211 | colossalai/shardformer/modeling/chatglm2_6b/modeling_chatglm.py:1088-1124 \u2014 before extracting anything, compare \u0060colossalai/legacy/inference/tensor_parallel/modeling/chatglm2.py\u0060 and \u0060colossalai/shardformer/modeling/chatglm2_6b/modeling_chatglm.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 176 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/inference/tensor_parallel/modeling/chatglm2.py:175\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/tensor_parallel/modeling/chatglm2.py"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"a96da4c3c98a1a1afb993024ee1b915e1c1dea661bfa5202219229e94015ef55"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (37 lines \u00D7 2): colossalai/nn/init.py:80-116 | colossalai/nn/init.py:124-160 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/init.py"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"e969cdb67ab06c538a8fb584ae86a98eca9eb6ef07ca592a8c510a87265c35b0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (34\u201337 lines \u00D7 2): colossalai/shardformer/modeling/_llama_tf4.py:198-231 | colossalai/shardformer/modeling/command.py:183-219 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_llama_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/command.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 210 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_llama_tf4.py:198\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_llama_tf4.py"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"234c117d023634f8337b73d48acbc2f4ab89205c88dca8c6dab16eb2e7123f5b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (37 lines \u00D7 2): colossalai/shardformer/policies/_bert_tf4.py:422-458 | colossalai/shardformer/policies/_bert_tf5.py:429-465 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 475 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_bert_tf4.py"},"region":{"startLine":422}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c6e4d4fbaa9e3f5686cc49f891b69f8d7d79259a38dbfc7ec97cabe37c3d6ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (33\u201336 lines \u00D7 6): colossalai/legacy/moe/openmoe/model/openmoe_policy.py:262-294 | colossalai/shardformer/modeling/_mixtral_tf4.py:240-273 | colossalai/shardformer/modeling/_mixtral_tf5.py:584-617 | colossalai/shardformer/modeling/_qwen2_tf4.py:71-106 | colossalai/shardformer/modeling/_qwen3_tf4.py:71-104 | colossalai/shardformer/modeling/deepseek.py:337-370 \u2014 before extracting anything, compare \u0060colossalai/legacy/moe/openmoe/model/openmoe_policy.py\u0060 and \u0060colossalai/shardformer/modeling/_mixtral_tf4.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 130 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/openmoe/model/openmoe_policy.py"},"region":{"startLine":262}}}],"partialFingerprints":{"codehealthFindingId/v1":"7dada3ecd021e70e13ee25744c525f31c2f24abdb41b55f0d3001b7ac541bbb5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (35\u201336 lines \u00D7 4): colossalai/shardformer/modeling/_mixtral_tf4.py:202-237 | colossalai/shardformer/modeling/_mixtral_tf4.py:427-461 | colossalai/shardformer/modeling/_mixtral_tf5.py:547-581 | colossalai/shardformer/modeling/_mixtral_tf5.py:793-827 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_mixtral_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_mixtral_tf5.py\u0060 as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 581 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_mixtral_tf4.py"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7c9ffcd38a261d69a545a0a0ed188a61feb340cc9779e1c74eac428f560e17c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (35\u201336 lines \u00D7 3): colossalai/shardformer/layer/_operation.py:127-161 | colossalai/shardformer/layer/_operation.py:209-244 | colossalai/shardformer/layer/_operation.py:941-975 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/_operation.py"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa4d63c57d3972ddc1418aec388bba2879c3a3c577d79162070d1d107e9fd06c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (36 lines \u00D7 3): colossalai/shardformer/modeling/_qwen2_tf5.py:337-372 | colossalai/shardformer/modeling/_qwen3_tf4.py:425-460 | colossalai/shardformer/modeling/_qwen3_tf5.py:338-373 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_qwen2_tf5.py\u0060 and \u0060colossalai/shardformer/modeling/_qwen3_tf4.py\u0060 as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 255 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_qwen2_tf5.py:337\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen2_tf5.py"},"region":{"startLine":337}}}],"partialFingerprints":{"codehealthFindingId/v1":"4de467d4bfe48b096c0263f025b0edc5d5225bc51627000af9177ad35575e915"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (36 lines \u00D7 2): applications/ColossalChat/coati/distributed/producer.py:253-288 | applications/ColossalChat/coati/distributed/zero_bubble/producer.py:301-336 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/distributed/producer.py\u0060 and \u0060applications/ColossalChat/coati/distributed/zero_bubble/producer.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 234 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/producer.py"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f5a63490efc3485bf71c5208c63f28f1c7322aed6ad3a88dd5e9d6e05b2ea5f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (36 lines \u00D7 2): colossalai/legacy/communication/p2p_v2.py:116-151 | colossalai/pipeline/p2p.py:108-143 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/communication/p2p_v2.py:116\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/communication/p2p_v2.py"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d93f53a7ffc8f55dcde127f1cd9fcc8df0cff87310141339a3dbc3895ba81d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (36 lines \u00D7 2): colossalai/shardformer/modeling/_llama_tf4.py:395-430 | colossalai/shardformer/modeling/_llama_tf5.py:437-472 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_llama_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_llama_tf5.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 483 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_llama_tf4.py"},"region":{"startLine":395}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9601ac13ee92a919fb2da762f13da11f8b235c8e2e3ea4fa100ff89319a21ba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201336 lines \u00D7 2): colossalai/shardformer/modeling/_vit_tf4.py:148-160 | colossalai/shardformer/modeling/_vit_tf4.py:236-271 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_vit_tf4.py:148\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_vit_tf4.py"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"5894490352d6f8ebb8b7e2d39ebbdddbb678f8a19ca1e486c81272885e496329"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (35 lines \u00D7 4): colossalai/shardformer/layer/_operation.py:298-332 | colossalai/shardformer/layer/_operation.py:377-411 | colossalai/shardformer/layer/_operation.py:605-639 | colossalai/shardformer/layer/_operation.py:780-814 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/_operation.py"},"region":{"startLine":298}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7536ebddb31aa6200e4673f4f6503b59068e915c654fae4512f0d5c75d6e469"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30\u201335 lines \u00D7 4): colossalai/shardformer/modeling/falcon.py:371-400 | colossalai/shardformer/modeling/falcon.py:470-499 | colossalai/shardformer/modeling/falcon.py:584-613 | colossalai/shardformer/modeling/falcon.py:665-699 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/falcon.py:371\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/falcon.py"},"region":{"startLine":371}}}],"partialFingerprints":{"codehealthFindingId/v1":"f50f58abf026750a2556eff34e73c4a2891cfc16f424d80b22fbf218b70b389d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (4\u201335 lines \u00D7 5): colossalai/inference/modeling/models/nopadding_llama.py:329-332 | colossalai/inference/modeling/models/nopadding_llama.py:595-598 | colossalai/legacy/zero/sharded_model/sharded_model_v2.py:484-519 | colossalai/shardformer/layer/parallel_module.py:73-107 | colossalai/shardformer/layer/parallel_module.py:248-282 \u2014 before extracting anything, compare \u0060colossalai/legacy/zero/sharded_model/sharded_model_v2.py\u0060 and \u0060colossalai/shardformer/layer/parallel_module.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 96 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/inference/modeling/models/nopadding_llama.py:328\u0060 calls \u0060hasattr\u0060 and \u0060colossalai/inference/modeling/models/nopadding_llama.py:594\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/modeling/models/nopadding_llama.py"},"region":{"startLine":329}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb7cc2586c100dd89f4a4b0fb34323c0117f7b20693d0406c749c9562edbd627"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (35 lines \u00D7 2): applications/ColossalChat/coati/distributed/reward/reward_utils.py:21-55 | applications/ColossalChat/coati/utils/reward_score/utils.py:21-55 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/distributed/reward/reward_utils.py\u0060 and \u0060applications/ColossalChat/coati/utils/reward_score/utils.py\u0060 as WHOLE FILES: 100% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/utils/reward_score/utils.py"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c05df96b43be43d6cb92269bd7ae4735b72f84531ebea785ceac20c7bc55c1e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (34\u201335 lines \u00D7 2): applications/ColossalChat/coati/trainer/kto.py:129-162 | applications/ColossalChat/coati/trainer/kto.py:278-312 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/coati/trainer/kto.py:129\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/kto.py"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"434a357aaa63d3531ef1698914175d854e6b208e546b42a3be4c6c3f070d69cf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (35 lines \u00D7 2): colossalai/auto_parallel/tensor_shard/node_handler/strategy/matmul_strategy_generator.py:336-370 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/matmul_strategy_generator.py:415-449 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/auto_parallel/tensor_shard/node_handler/strategy/matmul_strategy_generator.py:336\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/matmul_strategy_generator.py"},"region":{"startLine":336}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ce388bb72328a5450453946b6a511f915923f2a0fd209bbeec2b5f4f1ef6065"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (35 lines \u00D7 2): colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py:428-462 | colossalai/inference/core/plugin.py:46-80 \u2014 before extracting anything, compare \u0060colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py\u0060 and \u0060colossalai/inference/core/plugin.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: \u0060CheckpointIndexFile\u0060 names \u0060.index_file\u0060 in one and \u0060colossalai.checkpoint_io.index_file\u0060 in another \u2014 different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":428}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a91ddcf977c250fc2674fb75006502803ce851313de6459bfcdf5972e8d743a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (34\u201335 lines \u00D7 2): colossalai/shardformer/modeling/_llama_tf4.py:109-143 | colossalai/shardformer/modeling/_llama_tf5.py:151-184 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_llama_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_llama_tf5.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 483 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_llama_tf4.py"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c85e959b7f74c6d6e2a69a70aa18a671d988da186639b34e3a34c24b7ed88d6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (35 lines \u00D7 2): colossalai/shardformer/modeling/gpt2.py:743-777 | colossalai/shardformer/modeling/gptj.py:406-440 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/gpt2.py\u0060 and \u0060colossalai/shardformer/modeling/gptj.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 321 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/gptj.py:406\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/gpt2.py"},"region":{"startLine":743}}}],"partialFingerprints":{"codehealthFindingId/v1":"a33156e791f13f1873957e5bb5a94a5beb0d93675714d9c4384d0bd48c26390a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (34 lines \u00D7 2): applications/ColossalChat/coati/distributed/grpo_consumer.py:175-208 | applications/ColossalChat/coati/distributed/zero_bubble/grpo_consumer.py:165-198 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/distributed/grpo_consumer.py\u0060 and \u0060applications/ColossalChat/coati/distributed/zero_bubble/grpo_consumer.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 407 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/grpo_consumer.py"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"14eb27f1a881aeb9c0de296b36a761c1928cdf8266881a1d2e6a8eb6914002ff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (33\u201334 lines \u00D7 2): colossalai/nn/optimizer/cpu_adam.py:160-192 | colossalai/nn/optimizer/hybrid_adam.py:128-161 \u2014 before extracting anything, compare \u0060colossalai/nn/optimizer/cpu_adam.py\u0060 and \u0060colossalai/nn/optimizer/hybrid_adam.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/cpu_adam.py"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0231b58676322baed9448234b63e49dcf94f23137efef3f84dfa685d175a11b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (34 lines \u00D7 2): colossalai/shardformer/modeling/bloom.py:67-100 | colossalai/shardformer/modeling/falcon.py:62-95 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/bloom.py\u0060 and \u0060colossalai/shardformer/modeling/falcon.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 594 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/bloom.py:67\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/bloom.py"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c8e44bf83234f0be3eadf74c909a1e0351b5b22ea524aa51266f29a5e3e4da0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (33 lines \u00D7 2): applications/ColossalEval/colossal_eval/models/huggingface.py:412-444 | applications/ColossalEval/colossal_eval/models/vllm.py:295-327 \u2014 before extracting anything, compare \u0060applications/ColossalEval/colossal_eval/models/huggingface.py\u0060 and \u0060applications/ColossalEval/colossal_eval/models/vllm.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 157 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/models/huggingface.py"},"region":{"startLine":412}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ca616bd446c2e47002b4a0d9c8243907764a63c467b0423aa2230d26357f4d7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (33 lines \u00D7 2): colossalai/_analyzer/fx/codegen.py:161-193 | colossalai/fx/codegen/activation_checkpoint_codegen.py:346-378 \u2014 before extracting anything, compare \u0060colossalai/_analyzer/fx/codegen.py\u0060 and \u0060colossalai/fx/codegen/activation_checkpoint_codegen.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/fx/codegen.py"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"64ac97932fc48647a9d868f1d34db2523e9470e7a356929f689b41ea52029fd7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (33 lines \u00D7 2): colossalai/shardformer/layer/linear.py:333-365 | colossalai/shardformer/layer/qkv_fused_linear.py:957-989 \u2014 before extracting anything, compare \u0060colossalai/shardformer/layer/linear.py\u0060 and \u0060colossalai/shardformer/layer/qkv_fused_linear.py\u0060 as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 261 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/layer/linear.py:333\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/linear.py"},"region":{"startLine":333}}}],"partialFingerprints":{"codehealthFindingId/v1":"66e207cec3bf864527c894c2cce32602d70aca0907d66e16d45cb06255c904f8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (33 lines \u00D7 2): colossalai/shardformer/policies/_whisper_tf4.py:53-85 | colossalai/shardformer/policies/_whisper_tf5.py:51-83 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_whisper_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_whisper_tf5.py\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 483 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/policies/_whisper_tf4.py:53\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_whisper_tf4.py"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"df9e1815f1a8daca9aeca50f6d38d6d563e1376574ea0681bb5a5e31bd4e01d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (32 lines \u00D7 5): colossalai/shardformer/modeling/_qwen2_tf4.py:776-807 | colossalai/shardformer/modeling/_qwen3_tf4.py:768-799 | colossalai/shardformer/modeling/command.py:588-619 | colossalai/shardformer/modeling/mistral.py:572-603 | colossalai/shardformer/modeling/opt.py:859-938 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_qwen2_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_qwen3_tf4.py\u0060 as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1214 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_qwen2_tf4.py:776\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen2_tf4.py"},"region":{"startLine":776}}}],"partialFingerprints":{"codehealthFindingId/v1":"71bba573ffa5120f3caeb810a5775529083adaee88d19c44de8be7b0123a69cd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201332 lines \u00D7 5): colossalai/shardformer/modeling/gpt2.py:365-390 | colossalai/shardformer/modeling/gpt2.py:454-485 | colossalai/shardformer/modeling/gpt2.py:545-574 | colossalai/shardformer/modeling/gpt2.py:637-662 | colossalai/shardformer/modeling/gpt2.py:731-747 \u2014 all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/gpt2.py:365\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/gpt2.py"},"region":{"startLine":365}}}],"partialFingerprints":{"codehealthFindingId/v1":"e064919bf731d6ef85a65756eff6f85919b96e645db150bc179f5f24a95a6fed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (32 lines \u00D7 3): colossalai/shardformer/policies/_whisper_tf4.py:542-573 | colossalai/shardformer/policies/_whisper_tf5.py:529-560 | colossalai/shardformer/policies/t5.py:451-482 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_whisper_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_whisper_tf5.py\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 483 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_whisper_tf4.py"},"region":{"startLine":542}}}],"partialFingerprints":{"codehealthFindingId/v1":"3210a68d693129894a7852964683edccb53da5702243679896b5fb072f515121"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30\u201332 lines \u00D7 2): applications/ColossalMoE/train.py:61-90 | colossalai/legacy/moe/openmoe/train.py:94-125 \u2014 before extracting anything, compare \u0060applications/ColossalMoE/train.py\u0060 and \u0060colossalai/legacy/moe/openmoe/train.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 125 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalMoE/train.py:61\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalMoE/train.py"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b6abf6fafe4cf13b80fa36907b9991eb2f4fe080314df83acee189575de7045"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (32 lines \u00D7 2): colossalai/_analyzer/fx/tracer/tracer.py:340-371 | colossalai/fx/tracer/experimental.py:367-398 \u2014 before extracting anything, compare \u0060colossalai/_analyzer/fx/tracer/tracer.py\u0060 and \u0060colossalai/fx/tracer/experimental.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/_analyzer/fx/tracer/tracer.py:336\u0060 calls \u0060getattr\u0060, \u0060_module_getattr\u0060 and \u0060colossalai/fx/tracer/experimental.py:364\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/fx/tracer/tracer.py"},"region":{"startLine":340}}}],"partialFingerprints":{"codehealthFindingId/v1":"9dc464c267f209a59275e7f1f06d8d603621375cd2f2ba0c0b17278aa2121de9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (31\u201332 lines \u00D7 2): colossalai/auto_parallel/offload/training_simulator.py:129-159 | colossalai/auto_parallel/offload/training_simulator.py:389-420 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/offload/training_simulator.py"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"5522f3050f4c87dd9dc07a820b82e2830e88f040050012a133bf60d73e492882"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (31\u201332 lines \u00D7 2): colossalai/shardformer/modeling/_bert_tf4.py:215-245 | examples/community/roberta/pretraining/model/bert.py:585-616 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_bert_tf4.py\u0060 and \u0060examples/community/roberta/pretraining/model/bert.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 255 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"c87d5c79a7961e0386dd5ff528e20444b096a518ee3cba51a3f9c8289bd5bb1f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201331 lines \u00D7 3): colossalai/shardformer/modeling/gptj.py:282-307 | colossalai/shardformer/modeling/gptj.py:394-410 | colossalai/shardformer/modeling/gptj.py:493-523 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/gptj.py:282\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/gptj.py"},"region":{"startLine":282}}}],"partialFingerprints":{"codehealthFindingId/v1":"27e87bf927c6c019e77829a9e0b03fd9dac81ce971c7f4084ad67fac5e120add"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (31 lines \u00D7 2): applications/Colossal-LLaMA/train.py:61-91 | applications/ColossalChat/examples/training_scripts/lora_finetune.py:57-87 \u2014 before extracting anything, compare \u0060applications/Colossal-LLaMA/train.py\u0060 and \u0060applications/ColossalChat/examples/training_scripts/lora_finetune.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/Colossal-LLaMA/train.py:61\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/train.py"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e0d9d84c465d4bd47d791c11f45be3b32da032b1792458ba8e78935eab72b9f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28\u201331 lines \u00D7 2): applications/ColossalChat/coati/trainer/orpo.py:136-163 | applications/ColossalChat/coati/trainer/orpo.py:275-305 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/coati/trainer/orpo.py:136\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/orpo.py"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"ede8b1b6ed6b8176bdafcb36e727ec531e7c432c3d2da86a5ba5c87f32a8ff94"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29\u201331 lines \u00D7 2): applications/ColossalEval/colossal_eval/evaluate/gpt_evaluate.py:364-394 | applications/ColossalEval/colossal_eval/evaluate/gpt_evaluate.py:435-463 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/evaluate/gpt_evaluate.py"},"region":{"startLine":364}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a006f3242276c2c2675810169cf62df27b4582d0d690257153862567674d703"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28\u201331 lines \u00D7 2): colossalai/fx/codegen/activation_checkpoint_codegen.py:451-478 | colossalai/fx/codegen/activation_checkpoint_codegen.py:537-567 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/codegen/activation_checkpoint_codegen.py"},"region":{"startLine":451}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b697f3d22aaa036528924f46870d7feede770fe14f6aa0bff9916d7ff7f3fc0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (31 lines \u00D7 2): colossalai/legacy/inference/hybridengine/modeling/llama.py:352-382 | colossalai/legacy/inference/tensor_parallel/modeling/llama.py:272-302 \u2014 before extracting anything, compare \u0060colossalai/legacy/inference/hybridengine/modeling/llama.py\u0060 and \u0060colossalai/legacy/inference/tensor_parallel/modeling/llama.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 250 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/hybridengine/modeling/llama.py"},"region":{"startLine":352}}}],"partialFingerprints":{"codehealthFindingId/v1":"4198b87ff1e764f3ca19516a50b2f01f5e019399b2f786df2273ca3aaf82cecb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (31 lines \u00D7 2): colossalai/pipeline/schedule/interleaved_pp.py:73-103 | colossalai/pipeline/schedule/zero_bubble_pp.py:172-202 \u2014 before extracting anything, compare \u0060colossalai/pipeline/schedule/interleaved_pp.py\u0060 and \u0060colossalai/pipeline/schedule/zero_bubble_pp.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 82 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/pipeline/schedule/interleaved_pp.py"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffca9aede3deaf3023ab60af67eb30d9eda16f14716d44e6647ae36542caff62"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26\u201331 lines \u00D7 2): colossalai/shardformer/modeling/_deepseek_v3_tf4.py:317-342 | colossalai/shardformer/modeling/_deepseek_v3_tf5.py:348-378 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_deepseek_v3_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_deepseek_v3_tf5.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/shardformer/modeling/_deepseek_v3_tf5.py:346\u0060 calls \u0060pop\u0060 and \u0060colossalai/shardformer/modeling/_deepseek_v3_tf4.py:305\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_deepseek_v3_tf4.py"},"region":{"startLine":317}}}],"partialFingerprints":{"codehealthFindingId/v1":"57e96e7ea1c43a9ac3ab901b1a7c80c5c0d8c16ff4a8b05e9c7fc80d3f85e416"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (31 lines \u00D7 2): colossalai/shardformer/modeling/_mixtral_tf4.py:278-308 | colossalai/shardformer/modeling/deepseek.py:375-405 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_mixtral_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/deepseek.py\u0060 as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 427 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060colossalai/shardformer/modeling/_mixtral_tf4.py:310\u0060 calls \u0060rotary_emb\u0060 and \u0060colossalai/shardformer/modeling/deepseek.py:408\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_mixtral_tf4.py"},"region":{"startLine":278}}}],"partialFingerprints":{"codehealthFindingId/v1":"1edfa3e47bbd26f4a6ea7acab8b9f91216fc3f5c9d4a89acf291420e7094f87f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (31 lines \u00D7 2): colossalai/shardformer/modeling/_qwen2_tf4.py:330-360 | colossalai/shardformer/modeling/_qwen3_tf4.py:328-358 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_qwen2_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_qwen3_tf4.py\u0060 as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1214 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_qwen2_tf4.py:330\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen2_tf4.py"},"region":{"startLine":330}}}],"partialFingerprints":{"codehealthFindingId/v1":"22baeb6945da1f747f6bf2a7168e477b6f5b016e2dee69598f6cbc1dc0744725"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (31 lines \u00D7 2): colossalai/shardformer/policies/_bert_tf4.py:461-491 | colossalai/shardformer/policies/_bert_tf5.py:468-498 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 475 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_bert_tf4.py"},"region":{"startLine":461}}}],"partialFingerprints":{"codehealthFindingId/v1":"28c2f0b581254d9a6755cdac961db438d3550b4da0e8a241f44f6c70b4a18bf9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30 lines \u00D7 2): applications/Colossal-LLaMA/train.py:313-342 | applications/Colossal-LLaMA/train.py:384-413 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/train.py"},"region":{"startLine":313}}}],"partialFingerprints":{"codehealthFindingId/v1":"22299826b0c19087986f708896fa2b0c251b81e65755d3dd9778cbbe515fb86e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28\u201330 lines \u00D7 2): colossalai/_analyzer/fx/codegen.py:102-131 | colossalai/fx/codegen/activation_checkpoint_codegen.py:272-299 \u2014 before extracting anything, compare \u0060colossalai/_analyzer/fx/codegen.py\u0060 and \u0060colossalai/fx/codegen/activation_checkpoint_codegen.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/fx/codegen.py"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1b89205cbfc101f79bbb38ecaa36190f0185744d6dc9bd6f6a7f913fc1cfd57"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22\u201330 lines \u00D7 2): colossalai/fx/tracer/experimental.py:622-651 | colossalai/fx/tracer/tracer.py:102-123 \u2014 before extracting anything, compare \u0060colossalai/fx/tracer/experimental.py\u0060 and \u0060colossalai/fx/tracer/tracer.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 138 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/experimental.py"},"region":{"startLine":622}}}],"partialFingerprints":{"codehealthFindingId/v1":"18df8fad140c38a6fe288960adb8c4b6ec8392511eff8dfa86416f19ba3d5975"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24\u201330 lines \u00D7 2): colossalai/legacy/inference/tensor_parallel/modeling/chatglm2.py:361-384 | colossalai/shardformer/modeling/chatglm2_6b/modeling_chatglm.py:654-683 \u2014 before extracting anything, compare \u0060colossalai/legacy/inference/tensor_parallel/modeling/chatglm2.py\u0060 and \u0060colossalai/shardformer/modeling/chatglm2_6b/modeling_chatglm.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 176 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/inference/tensor_parallel/modeling/chatglm2.py:361\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/tensor_parallel/modeling/chatglm2.py"},"region":{"startLine":361}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f47ed43e13c1f725d159f263ec5ea901862ab5fe9b91b9f32f5a73094f70d23"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30 lines \u00D7 2): colossalai/legacy/moe/layer/experts.py:112-141 | colossalai/legacy/moe/layer/routers.py:112-141 \u2014 before extracting anything, compare \u0060colossalai/legacy/moe/layer/experts.py\u0060 and \u0060colossalai/legacy/moe/layer/routers.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 90 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/layer/experts.py"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f5bfc82725035b28faab019e397e270be1111320835f93684bc59349e79a2be"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30 lines \u00D7 2): colossalai/legacy/pipeline/rpc/_pipeline_base.py:586-615 | colossalai/legacy/pipeline/rpc/_pipeline_base.py:673-702 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/pipeline/rpc/_pipeline_base.py"},"region":{"startLine":586}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5ac909481161d95339c90e52c4eae94d27a66091e0ad226d34fca058d0e72da"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30 lines \u00D7 2): colossalai/legacy/utils/memory.py:28-57 | colossalai/utils/memory.py:15-44 \u2014 before extracting anything, compare \u0060colossalai/legacy/utils/memory.py\u0060 and \u0060colossalai/utils/memory.py\u0060 as WHOLE FILES: 89% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/utils/memory.py"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"8762aff4bb8f23464b0627c733240bac00449b814289bc018bd214d56386c842"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30 lines \u00D7 2): colossalai/shardformer/modeling/_bert_tf4.py:179-208 | colossalai/shardformer/modeling/_bert_tf5.py:207-236 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 45 separate duplicated blocks between them, totalling at least 882 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":179}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7edbbbfd6be25dc2cc1e998494b1b65b9f884f0b9a5f701a8644166bdfcc2ab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30 lines \u00D7 2): colossalai/shardformer/modeling/_qwen2_tf5.py:241-270 | colossalai/shardformer/modeling/_qwen3_tf5.py:242-271 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_qwen2_tf5.py\u0060 and \u0060colossalai/shardformer/modeling/_qwen3_tf5.py\u0060 as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 628 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_qwen2_tf5.py:241\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen2_tf5.py"},"region":{"startLine":241}}}],"partialFingerprints":{"codehealthFindingId/v1":"f715f5136b46ba6276d579462e618912ad279e8b3aa02b3c94d90f1051bd3008"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30 lines \u00D7 2): colossalai/shardformer/modeling/_qwen2_tf5.py:414-443 | colossalai/shardformer/modeling/_qwen3_tf5.py:415-444 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_qwen2_tf5.py\u0060 and \u0060colossalai/shardformer/modeling/_qwen3_tf5.py\u0060 as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 628 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen2_tf5.py"},"region":{"startLine":414}}}],"partialFingerprints":{"codehealthFindingId/v1":"d68d38433fbd8a00ed06937ef9b2c745ade86aa3e592f9994b88593d114390cf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30 lines \u00D7 2): colossalai/shardformer/policies/_whisper_tf4.py:474-503 | colossalai/shardformer/policies/_whisper_tf5.py:461-490 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_whisper_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_whisper_tf5.py\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 483 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/policies/_whisper_tf4.py:474\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_whisper_tf4.py"},"region":{"startLine":474}}}],"partialFingerprints":{"codehealthFindingId/v1":"e97d182626c7c1b82ef21a89dba5cad86cdaa11133cb64b7f046cc9f151af2ac"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30 lines \u00D7 2): colossalai/shardformer/policies/_whisper_tf4.py:782-811 | colossalai/shardformer/policies/_whisper_tf5.py:769-798 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_whisper_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_whisper_tf5.py\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 483 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_whisper_tf4.py"},"region":{"startLine":782}}}],"partialFingerprints":{"codehealthFindingId/v1":"a67b3c7af73750ce379f3b8cf0aee740d4c6f8f90befc2490fa1a16e07196f35"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28\u201329 lines \u00D7 8): colossalai/shardformer/policies/_llama_tf4.py:304-331 | colossalai/shardformer/policies/_llama_tf5.py:302-329 | colossalai/shardformer/policies/_qwen2_tf4.py:311-339 | colossalai/shardformer/policies/_qwen2_tf5.py:310-338 | colossalai/shardformer/policies/_qwen3_tf4.py:311-339 | colossalai/shardformer/policies/_qwen3_tf5.py:331-359 | colossalai/shardformer/policies/command.py:282-309 | colossalai/shardformer/policies/mistral.py:265-292 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_llama_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_llama_tf5.py\u0060 as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 404 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_llama_tf4.py"},"region":{"startLine":304}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f7d28e9b9c182de494d679ac3660021e8c1e158c5b89c7a8f18add3ba31df34"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28\u201329 lines \u00D7 7): colossalai/shardformer/modeling/_llama_tf4.py:417-444 | colossalai/shardformer/modeling/_llama_tf5.py:459-486 | colossalai/shardformer/modeling/_qwen2_tf4.py:407-434 | colossalai/shardformer/modeling/_qwen2_tf5.py:317-345 | colossalai/shardformer/modeling/_qwen3_tf4.py:405-433 | colossalai/shardformer/modeling/_qwen3_tf5.py:318-346 | colossalai/shardformer/modeling/mistral.py:301-328 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_llama_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_llama_tf5.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 483 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_llama_tf4.py:417\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_llama_tf4.py"},"region":{"startLine":417}}}],"partialFingerprints":{"codehealthFindingId/v1":"20c99b7622d27b8a3dacce698b9d7be1aa2e83f15ebafc98f4760c43468ca6ef"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28\u201329 lines \u00D7 2): applications/Colossal-LLaMA/train.py:208-236 | applications/ColossalChat/examples/training_scripts/lora_finetune.py:232-259 \u2014 before extracting anything, compare \u0060applications/Colossal-LLaMA/train.py\u0060 and \u0060applications/ColossalChat/examples/training_scripts/lora_finetune.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/Colossal-LLaMA/train.py:208\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060applications/ColossalChat/examples/training_scripts/lora_finetune.py:260\u0060 calls \u0060load_model\u0060 and \u0060applications/Colossal-LLaMA/train.py:238\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/train.py"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"a956962acc9c1bd6b6f4a41a5a7703603bc7089c91f9678951f6e9b58212dcc0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29 lines \u00D7 2): applications/ColossalChat/coati/distributed/producer.py:91-119 | applications/ColossalChat/coati/distributed/zero_bubble/producer.py:95-123 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/distributed/producer.py\u0060 and \u0060applications/ColossalChat/coati/distributed/zero_bubble/producer.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 234 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/producer.py"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"1daed152d8d390d831f461987ab0969a99e1a1122a24b73ab47e8ce81b1264ba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28\u201329 lines \u00D7 2): applications/ColossalChat/coati/trainer/grpo.py:332-359 | applications/ColossalChat/coati/trainer/ppo.py:341-369 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/trainer/grpo.py\u0060 and \u0060applications/ColossalChat/coati/trainer/ppo.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 176 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/grpo.py"},"region":{"startLine":332}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b0df3383a7f1a3e73568c580e03783f7d1b6e19ce70eeb7b4e872ce7793a799"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29 lines \u00D7 2): colossalai/_analyzer/_subclasses/flop_tensor.py:226-254 | colossalai/fx/profiler/opcount.py:16-44 \u2014 before extracting anything, compare \u0060colossalai/_analyzer/_subclasses/flop_tensor.py\u0060 and \u0060colossalai/fx/profiler/opcount.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 153 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/_subclasses/flop_tensor.py"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"23c8b8d44fc9905f727b0482637558baaecb73d1a9b93d62d4b083b36fec230e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28\u201329 lines \u00D7 2): colossalai/booster/plugin/hybrid_parallel_plugin.py:1169-1197 | colossalai/booster/plugin/moe_hybrid_parallel_plugin.py:384-411 \u2014 before extracting anything, compare \u0060colossalai/booster/plugin/hybrid_parallel_plugin.py\u0060 and \u0060colossalai/booster/plugin/moe_hybrid_parallel_plugin.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 100 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/booster/plugin/hybrid_parallel_plugin.py:1169\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/plugin/hybrid_parallel_plugin.py"},"region":{"startLine":1169}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2f4bb1796ccd64b934810f8a29c6abe6721ba249071e53d6adf88d59f146f45"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27\u201329 lines \u00D7 2): colossalai/legacy/inference/tensor_parallel/modeling/chatglm2.py:231-257 | colossalai/shardformer/modeling/chatglm2_6b/modeling_chatglm.py:928-956 \u2014 before extracting anything, compare \u0060colossalai/legacy/inference/tensor_parallel/modeling/chatglm2.py\u0060 and \u0060colossalai/shardformer/modeling/chatglm2_6b/modeling_chatglm.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 176 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/tensor_parallel/modeling/chatglm2.py"},"region":{"startLine":231}}}],"partialFingerprints":{"codehealthFindingId/v1":"f09741a5e20ea7c3b770eccb1b6bb8a7c5ff2344923bf5266db84453b7d03c5b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_2p5d/_operation.py:282-310 | colossalai/legacy/nn/layer/parallel_2p5d/_operation.py:447-475 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/nn/layer/parallel_2p5d/_operation.py:282\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2p5d/_operation.py"},"region":{"startLine":282}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bac3a1de73cedfffcf215d6a8bc4437ce96557274af12efaa478f7b21eaa6a8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29 lines \u00D7 2): colossalai/nn/optimizer/distributed_came.py:452-480 | colossalai/nn/optimizer/distributed_came.py:510-538 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/distributed_came.py"},"region":{"startLine":452}}}],"partialFingerprints":{"codehealthFindingId/v1":"d603469a0e4ef6122c14e3640cfcad76badccdcd33123a9b236689856f24ed38"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29 lines \u00D7 2): colossalai/shardformer/modeling/bloom.py:765-793 | colossalai/shardformer/modeling/bloom.py:888-916 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/bloom.py:765\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/bloom.py"},"region":{"startLine":765}}}],"partialFingerprints":{"codehealthFindingId/v1":"26bb4f33a58821d67e0deae8d2ec111b93d8d3cd3849ba8641417fe07b7634cd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27\u201329 lines \u00D7 2): colossalai/shardformer/modeling/gptj.py:796-822 | colossalai/shardformer/modeling/gptj.py:986-1014 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/gptj.py:986\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/gptj.py"},"region":{"startLine":796}}}],"partialFingerprints":{"codehealthFindingId/v1":"712ff2c4093e77fc286ab79e80af503d61b5725177a46462f55a874c51469f38"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29 lines \u00D7 2): colossalai/shardformer/policies/_whisper_tf4.py:506-534 | colossalai/shardformer/policies/_whisper_tf5.py:493-521 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_whisper_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_whisper_tf5.py\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 483 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. Note first that the copies are not typed on the same thing: \u0060WhisperForConditionalGeneration\u0060 names \u0060transformers\u0060 in one and \u0060transformers.models.whisper.modeling_whisper\u0060 in another \u2014 different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_whisper_tf4.py"},"region":{"startLine":506}}}],"partialFingerprints":{"codehealthFindingId/v1":"9df5a32cfbe41663ba0893e6e6b786519a5e1fa4255d410aa3fd690d7c1ed28e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26\u201328 lines \u00D7 3): colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py:137-164 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py:197-224 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py:269-294 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py:137\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cf05cb306ca5d3185b5308152a3efea83d951a96ee9ae3d7cebb156271c52ac"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 2): applications/ColossalChat/coati/distributed/consumer.py:190-217 | applications/ColossalChat/coati/distributed/consumer.py:279-306 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/consumer.py"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1129c5fff4224fbed112a374f8ebdca853a3a814127b96b2766200f7748670d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25\u201328 lines \u00D7 2): colossalai/auto_parallel/tensor_shard/node_handler/strategy/reshape_generator.py:119-146 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/reshape_generator.py:351-375 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/auto_parallel/tensor_shard/node_handler/strategy/reshape_generator.py:119\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/auto_parallel/tensor_shard/node_handler/strategy/reshape_generator.py:118\u0060 calls \u0060list\u0060, \u0060keys\u0060 and \u0060colossalai/auto_parallel/tensor_shard/node_handler/strategy/reshape_generator.py:350\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/reshape_generator.py"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd650e41f55953dc153952bc8c4a0e3244b0629383856653caf878db9ceaafb9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26\u201328 lines \u00D7 2): colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py:176-203 | colossalai/zero/gemini/gemini_ddp.py:964-989 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"8792bae456b83edefebb1669efdc07a39845a363a2fa86b7474396fd0f998a2b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 2): colossalai/fx/passes/concrete_info_prop.py:232-259 | colossalai/fx/passes/meta_info_prop.py:261-288 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/passes/concrete_info_prop.py"},"region":{"startLine":232}}}],"partialFingerprints":{"codehealthFindingId/v1":"c93f4f4d4eddc58df599dc60e00c3a51563d26ef181925ab2e48a658b1c9a7b1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 2): colossalai/initialize.py:155-182 | colossalai/legacy/initialize.py:209-236 \u2014 before extracting anything, compare \u0060colossalai/initialize.py\u0060 and \u0060colossalai/legacy/initialize.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 107 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/initialize.py:155\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/initialize.py"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"525d2ee9b9376cea00b0c3b23da5283aa560302af88dccd6a8adf01a9e016835"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27\u201328 lines \u00D7 2): colossalai/nn/optimizer/distributed_adafactor.py:68-95 | colossalai/nn/optimizer/distributed_came.py:76-102 \u2014 before extracting anything, compare \u0060colossalai/nn/optimizer/distributed_adafactor.py\u0060 and \u0060colossalai/nn/optimizer/distributed_came.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 201 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/distributed_adafactor.py"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"5de19590b559db8334c20d4165d0cf6292930b2e1d019b7513e38dd1711cd664"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 2): colossalai/shardformer/modeling/_bert_tf4.py:629-656 | colossalai/shardformer/modeling/_bert_tf5.py:642-669 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 45 separate duplicated blocks between them, totalling at least 882 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_bert_tf4.py:629\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":629}}}],"partialFingerprints":{"codehealthFindingId/v1":"0df7b75566556a210651eb3356e08223ab3f595102d291fd1c596fa40f37dfe0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 2): colossalai/shardformer/modeling/bloom.py:38-65 | colossalai/shardformer/modeling/falcon.py:33-60 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/bloom.py\u0060 and \u0060colossalai/shardformer/modeling/falcon.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 594 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/bloom.py:38\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/bloom.py"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"e535fabbc245648cb309e2e908e98ae7fa9fe844bca2da2621485acce0f7edda"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 2): colossalai/shardformer/modeling/bloom.py:252-279 | colossalai/shardformer/modeling/bloom.py:1033-1060 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/bloom.py:252\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/bloom.py"},"region":{"startLine":252}}}],"partialFingerprints":{"codehealthFindingId/v1":"e47d9e0750716f9735c8b43f61a290144b80ab36a23281d0e48853f6568c0325"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25\u201327 lines \u00D7 4): colossalai/_analyzer/fx/tracer/tracer.py:206-232 | colossalai/_analyzer/fx/tracer/tracer.py:309-333 | colossalai/fx/tracer/experimental.py:337-363 | colossalai/fx/tracer/tracer.py:417-443 \u2014 before extracting anything, compare \u0060colossalai/_analyzer/fx/tracer/tracer.py\u0060 and \u0060colossalai/fx/tracer/experimental.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060colossalai/_analyzer/fx/tracer/tracer.py:336\u0060 calls \u0060getattr\u0060, \u0060_module_getattr\u0060 and \u0060colossalai/fx/tracer/experimental.py:366\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/fx/tracer/tracer.py"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"b692d00b782838e2cf5a7f11b81aa749bfb1203f2f419be3d62f40c64530a534"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26\u201327 lines \u00D7 3): colossalai/legacy/zero/sharded_model/sharded_model_v2.py:541-566 | colossalai/shardformer/layer/parallel_module.py:136-162 | colossalai/shardformer/layer/parallel_module.py:314-340 \u2014 before extracting anything, compare \u0060colossalai/legacy/zero/sharded_model/sharded_model_v2.py\u0060 and \u0060colossalai/shardformer/layer/parallel_module.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 96 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/zero/sharded_model/sharded_model_v2.py"},"region":{"startLine":541}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e42216b8d7400642c239139d9b533eb9f444f5017e4cfb29741ad3056857846"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26\u201327 lines \u00D7 2): colossalai/legacy/inference/hybridengine/modeling/llama.py:99-124 | colossalai/legacy/inference/tensor_parallel/modeling/llama.py:82-108 \u2014 before extracting anything, compare \u0060colossalai/legacy/inference/hybridengine/modeling/llama.py\u0060 and \u0060colossalai/legacy/inference/tensor_parallel/modeling/llama.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 250 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/hybridengine/modeling/llama.py"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8c63502dae5ab840df301c6caebd68f73850d04cd898ee7efbc9d95e5a174ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_2d/_operation.py:322-348 | colossalai/legacy/nn/layer/parallel_2d/_operation.py:480-506 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/nn/layer/parallel_2d/_operation.py:322\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2d/_operation.py"},"region":{"startLine":322}}}],"partialFingerprints":{"codehealthFindingId/v1":"4194b96a391fee2df6fe42791477e16f3431c74b2285fce18536f6361bf22ab6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_2d/layers.py:437-463 | colossalai/legacy/nn/layer/parallel_2p5d/layers.py:450-476 \u2014 \u0060colossalai/legacy/nn/layer/parallel_2d/layers.py\u0060 and \u0060colossalai/legacy/nn/layer/parallel_2p5d/layers.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 18 separate duplicated blocks between them, totalling at least 219 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2d/layers.py"},"region":{"startLine":437}}}],"partialFingerprints":{"codehealthFindingId/v1":"67a10db40e8f4eee947548e8333be694a463873f9d1b3c0e915e8ee3b873fe33"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27 lines \u00D7 2): colossalai/shardformer/modeling/_bert_tf4.py:522-548 | colossalai/shardformer/modeling/_bert_tf5.py:535-561 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 45 separate duplicated blocks between them, totalling at least 882 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_bert_tf4.py:522\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":522}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a41a2326c2f09931215487988b566b8e6a1151205066321ff5adea5c79962b6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26\u201327 lines \u00D7 2): colossalai/shardformer/modeling/_llama_tf4.py:236-261 | colossalai/shardformer/modeling/_llama_tf5.py:277-303 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_llama_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_llama_tf5.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 483 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_llama_tf5.py:277\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_llama_tf4.py"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"348f582af534cbb61eed9b651a220a6d4ed4b785aad966198a5a0b12af7ade35"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27 lines \u00D7 2): colossalai/shardformer/modeling/t5.py:362-388 | colossalai/shardformer/modeling/t5.py:507-533 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/shardformer/modeling/t5.py:504\u0060 calls \u0060_shift_right\u0060 and \u0060colossalai/shardformer/modeling/t5.py:359\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/t5.py"},"region":{"startLine":362}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9ace4488f36bd0f82ade8c24ab21a94375371afff5b1e9f56cab0cb5edf8931"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26 lines \u00D7 2): applications/ColossalEval/colossal_eval/models/chatglm.py:33-58 | applications/ColossalEval/colossal_eval/models/chatglm.py:230-255 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/models/chatglm.py"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"218ec4e40b25eb55fff5949e788198188e8108546843b4e93a80d75ea720dee1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26 lines \u00D7 2): colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py:588-613 | colossalai/checkpoint_io/moe_checkpoint.py:488-513 \u2014 before extracting anything, compare \u0060colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py\u0060 and \u0060colossalai/checkpoint_io/moe_checkpoint.py\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 249 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060colossalai/checkpoint_io/moe_checkpoint.py:515\u0060 calls \u0060barrier\u0060 and \u0060colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py:615\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":588}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c5f9ffa6bf6ef95639f44877e2336b3b339e2a768e9326b9c3804825a031c73"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26 lines \u00D7 2): colossalai/fx/tracer/experimental.py:307-332 | colossalai/fx/tracer/tracer.py:449-474 \u2014 before extracting anything, compare \u0060colossalai/fx/tracer/experimental.py\u0060 and \u0060colossalai/fx/tracer/tracer.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 138 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/experimental.py"},"region":{"startLine":307}}}],"partialFingerprints":{"codehealthFindingId/v1":"2594a3e486e4f99673895d52b5782f5ecc0d946361a23dbcdcde768670b2b680"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26 lines \u00D7 2): colossalai/legacy/moe/openmoe/model/modeling_openmoe.py:930-955 | colossalai/legacy/moe/openmoe/model/openmoe_policy.py:499-524 \u2014 before extracting anything, compare \u0060colossalai/legacy/moe/openmoe/model/modeling_openmoe.py\u0060 and \u0060colossalai/legacy/moe/openmoe/model/openmoe_policy.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/openmoe/model/modeling_openmoe.py"},"region":{"startLine":930}}}],"partialFingerprints":{"codehealthFindingId/v1":"51d121f009742d60a3a0c6d13e2d246f564de59e99d67465bc514d1ccea944f4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26 lines \u00D7 2): colossalai/shardformer/modeling/_bert_tf4.py:313-338 | colossalai/shardformer/modeling/_bert_tf5.py:326-351 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 45 separate duplicated blocks between them, totalling at least 882 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":313}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ac041200c6929dd2bd178584116abbf0e095a9f335d49493638be1b767ae4b6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18\u201325 lines \u00D7 4): colossalai/fx/profiler/experimental/profiler_module/convolution.py:126-143 | colossalai/fx/profiler/experimental/profiler_module/convolution.py:160-184 | colossalai/fx/tracer/meta_patch/patched_module/convolution.py:94-111 | colossalai/fx/tracer/meta_patch/patched_module/convolution.py:122-146 \u2014 before extracting anything, compare \u0060colossalai/fx/profiler/experimental/profiler_module/convolution.py\u0060 and \u0060colossalai/fx/tracer/meta_patch/patched_module/convolution.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/fx/profiler/experimental/profiler_module/convolution.py:126\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060self\u0060 to \u0060torch.nn.ConvTranspose2d\u0060 in one and \u0060torch.nn.ConvTranspose3d\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/profiler/experimental/profiler_module/convolution.py"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"616888ea50f1830bffd0c195f0147a080885bfa5c1fe92b496eeacfc0e3e77f0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): applications/ColossalChat/coati/trainer/dpo.py:136-160 | applications/ColossalChat/coati/trainer/dpo.py:427-451 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060applications/ColossalChat/coati/trainer/dpo.py:425\u0060 calls \u0060no_grad\u0060 and \u0060applications/ColossalChat/coati/trainer/dpo.py:134\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/dpo.py"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"08fc82598f86d12a7126e78cd670a388c134f7c0851ac3a862578a3c6cdecf4a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): applications/ColossalChat/coati/trainer/grpo.py:362-386 | applications/ColossalChat/coati/trainer/ppo.py:372-396 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/trainer/grpo.py\u0060 and \u0060applications/ColossalChat/coati/trainer/ppo.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 176 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/grpo.py"},"region":{"startLine":362}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d5b33401540e7558707897d7600425e676baa331d03b21b05e3424bc4e63bc0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24\u201325 lines \u00D7 2): applications/ColossalChat/coati/trainer/kto.py:240-263 | applications/ColossalChat/coati/trainer/orpo.py:214-238 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/trainer/kto.py\u0060 and \u0060applications/ColossalChat/coati/trainer/orpo.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 138 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/coati/trainer/kto.py:240\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/kto.py"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"47180113c26eb2087dfa35a1ffde6834dbc1d3540ae0778b335e2ecc1487b6c1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): applications/ColossalEval/colossal_eval/dataset/safetybench_en.py:56-80 | applications/ColossalEval/colossal_eval/dataset/safetybench_zh.py:56-80 \u2014 before extracting anything, compare \u0060applications/ColossalEval/colossal_eval/dataset/safetybench_en.py\u0060 and \u0060applications/ColossalEval/colossal_eval/dataset/safetybench_zh.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/dataset/safetybench_en.py"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa482916d65806bb2c4dbde98a4e8d2272213ff8517c55ed05441855b3b5199b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): colossalai/auto_parallel/tensor_shard/node_handler/node_handler.py:264-288 | colossalai/auto_parallel/tensor_shard/node_handler/node_handler.py:319-343 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/node_handler.py"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"50e14105774263f66094f277c019e75fcf3300af296433243e08d411164fb039"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): colossalai/auto_parallel/tensor_shard/node_handler/strategy/matmul_strategy_generator.py:847-871 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/matmul_strategy_generator.py:889-913 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/auto_parallel/tensor_shard/node_handler/strategy/matmul_strategy_generator.py:847\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/matmul_strategy_generator.py"},"region":{"startLine":847}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2bedf1a3b6ec26a70f4796acea6f0d451329a46fe04d7f53589960bc68ddfc0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): colossalai/initialize.py:122-146 | colossalai/legacy/initialize.py:173-197 \u2014 before extracting anything, compare \u0060colossalai/initialize.py\u0060 and \u0060colossalai/legacy/initialize.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 107 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/initialize.py:122\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/initialize.py"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4c130facef08549b981b5b77ad050e70c93e2afea1afc8a06d8a96a357a2961"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (3\u201325 lines \u00D7 3): colossalai/kernel/triton/context_attn_unpad.py:95-119 | colossalai/kernel/triton/context_attn_unpad.py:273-297 | colossalai/kernel/triton/context_attn_unpad.py:473-475 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/kernel/triton/context_attn_unpad.py:95\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060colossalai/kernel/triton/context_attn_unpad.py:119\u0060 calls \u0060full\u0060 and \u0060colossalai/kernel/triton/context_attn_unpad.py:475\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/context_attn_unpad.py"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"1affb04ae69b28258b6edd0f64cb2aacfbe7da60073dddf29d7a2056f793cd13"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): colossalai/shardformer/modeling/_bert_tf4.py:1224-1248 | colossalai/shardformer/modeling/_bert_tf5.py:1218-1242 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 45 separate duplicated blocks between them, totalling at least 882 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_bert_tf4.py:1224\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":1224}}}],"partialFingerprints":{"codehealthFindingId/v1":"c753484c035d2ba5193c1097bca77be384af7f764ad26c857c9c0b051e590016"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): colossalai/shardformer/modeling/_deepseek_v3_tf4.py:232-256 | colossalai/shardformer/modeling/deepseek.py:808-832 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_deepseek_v3_tf4.py:232\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_deepseek_v3_tf4.py"},"region":{"startLine":232}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f92e90deccc7de343986c51da5581e526a5903e6531220580d8a27f4e0e8ec8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): colossalai/shardformer/modeling/_mixtral_tf4.py:764-788 | colossalai/shardformer/modeling/_mixtral_tf5.py:1158-1182 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_mixtral_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_mixtral_tf5.py\u0060 as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 581 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_mixtral_tf4.py:764\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_mixtral_tf4.py"},"region":{"startLine":764}}}],"partialFingerprints":{"codehealthFindingId/v1":"614837ce393b8e319db8e1b805c62efdbda14cdf3707c926ab0390fc0ea6c8e8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23\u201324 lines \u00D7 4): colossalai/shardformer/modeling/bloom.py:356-378 | colossalai/shardformer/modeling/bloom.py:448-471 | colossalai/shardformer/modeling/bloom.py:574-597 | colossalai/shardformer/modeling/bloom.py:661-683 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/bloom.py:356\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/bloom.py"},"region":{"startLine":356}}}],"partialFingerprints":{"codehealthFindingId/v1":"208022968a58bb39fc96a82e57a8f82c60f6fb5553cf38cd9d3801fa18e26732"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (2\u201324 lines \u00D7 5): colossalai/inference/utils.py:36-59 | colossalai/legacy/inference/hybridengine/modeling/_utils.py:40-63 | colossalai/legacy/inference/quant/smoothquant/models/llama.py:545-548 | colossalai/legacy/inference/tensor_parallel/modeling/_utils.py:40-63 | colossalai/legacy/inference/tensor_parallel/modeling/chatglm2.py:59-60 \u2014 before extracting anything, compare \u0060colossalai/legacy/inference/hybridengine/modeling/_utils.py\u0060 and \u0060colossalai/legacy/inference/tensor_parallel/modeling/_utils.py\u0060 as WHOLE FILES: 100% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060colossalai/inference/utils.py:59\u0060 calls \u0060arange\u0060 and \u0060colossalai/legacy/inference/tensor_parallel/modeling/chatglm2.py:60\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/utils.py"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"5daa28d42fbded0fbb88213fd0bf34e953a7ddadd1a3ac298d3dddd90c19b37b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 3): colossalai/shardformer/policies/t5.py:612-635 | colossalai/shardformer/policies/t5.py:663-686 | colossalai/shardformer/policies/t5.py:766-789 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/policies/t5.py:612\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/t5.py"},"region":{"startLine":612}}}],"partialFingerprints":{"codehealthFindingId/v1":"86e3f746424c2467a40b65c5c7be128d3f15c8083fa059892c87d6fca89def5d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): applications/Colossal-LLaMA/colossal_llama/dataset/loader.py:115-138 | applications/ColossalChat/coati/dataset/loader.py:119-142 \u2014 before extracting anything, compare \u0060applications/Colossal-LLaMA/colossal_llama/dataset/loader.py\u0060 and \u0060applications/ColossalChat/coati/dataset/loader.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 90 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/Colossal-LLaMA/colossal_llama/dataset/loader.py:115\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/colossal_llama/dataset/loader.py"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"81486a42cf9aa2a8f59132f3b7ad7fb4d58efddab71fcf4b6dcc2f717d1c09e1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): applications/Colossal-LLaMA/dataset/prepare_pretrain_dataset.py:39-62 | applications/Colossal-LLaMA/dataset/prepare_sft_dataset.py:37-60 \u2014 before extracting anything, compare \u0060applications/Colossal-LLaMA/dataset/prepare_pretrain_dataset.py\u0060 and \u0060applications/Colossal-LLaMA/dataset/prepare_sft_dataset.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 116 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060applications/Colossal-LLaMA/dataset/prepare_sft_dataset.py:36\u0060 calls \u0060add_argument\u0060 and \u0060applications/Colossal-LLaMA/dataset/prepare_pretrain_dataset.py:38\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/dataset/prepare_pretrain_dataset.py"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d81bbf7d5520e509a1d089cf4c41c9102cd8c33388751485218fb0c39bf4c48"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21\u201324 lines \u00D7 2): applications/ColossalChat/coati/distributed/grpo_consumer.py:226-249 | applications/ColossalChat/coati/distributed/zero_bubble/grpo_consumer.py:205-225 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/distributed/grpo_consumer.py\u0060 and \u0060applications/ColossalChat/coati/distributed/zero_bubble/grpo_consumer.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 407 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/coati/distributed/grpo_consumer.py:226\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/grpo_consumer.py"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"63b3789a14bd6099dc5e8bd4b8617705881ecc28524767b9113ebac826b4b5be"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): applications/ColossalEval/colossal_eval/evaluate/gpt_evaluate.py:565-588 | applications/ColossalEval/colossal_eval/evaluate/gpt_evaluate.py:600-623 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/evaluate/gpt_evaluate.py"},"region":{"startLine":565}}}],"partialFingerprints":{"codehealthFindingId/v1":"f58eb0a3f5b2b909c8fdd910d87f28755c84aaf8e0fb8acf880a70f2e66a0aae"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py:241-264 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py:358-381 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py"},"region":{"startLine":241}}}],"partialFingerprints":{"codehealthFindingId/v1":"95101b5918e67929d81e2a0c0e241d4349bf81d1f2a81273af3d04b39b88d7b6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): colossalai/initialize.py:85-108 | colossalai/legacy/initialize.py:134-157 \u2014 before extracting anything, compare \u0060colossalai/initialize.py\u0060 and \u0060colossalai/legacy/initialize.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 107 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/initialize.py:85\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/initialize.py"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4be5916d6cc9a5bca65bec55baa5748a270c820c11934e84b895807cfaeb4bd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): colossalai/shardformer/modeling/_mixtral_tf4.py:382-405 | colossalai/shardformer/modeling/_mixtral_tf5.py:748-771 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_mixtral_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_mixtral_tf5.py\u0060 as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 581 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_mixtral_tf4.py"},"region":{"startLine":382}}}],"partialFingerprints":{"codehealthFindingId/v1":"df56c4020e09dccdd187cd6641a98161d04f85e977a51e28879637be445efc5c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): colossalai/shardformer/policies/_bert_tf4.py:640-663 | colossalai/shardformer/policies/_bert_tf5.py:647-670 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 475 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_bert_tf4.py"},"region":{"startLine":640}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e8cbcd1444d7e0cc0db6b224adda1b04b30cf57c9986bf67ab48632fbc64672"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): colossalai/shardformer/policies/_bert_tf4.py:684-707 | colossalai/shardformer/policies/_bert_tf5.py:691-714 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 475 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_bert_tf4.py"},"region":{"startLine":684}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8f2a689a765461bbc6db93c27e0ab421b90592b844a38c2f88a5e3f1b980051"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): colossalai/shardformer/policies/_bert_tf4.py:758-781 | colossalai/shardformer/policies/_bert_tf5.py:765-788 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 475 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_bert_tf4.py"},"region":{"startLine":758}}}],"partialFingerprints":{"codehealthFindingId/v1":"16743ea5f278cdc76d59b1d93eb6e179782f8b66aca0db0bcf20ffb3ece56bb1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 4): applications/ColossalChat/coati/trainer/dpo.py:270-292 | applications/ColossalChat/coati/trainer/dpo.py:553-575 | applications/ColossalChat/coati/trainer/orpo.py:122-144 | applications/ColossalChat/coati/trainer/orpo.py:261-283 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/trainer/dpo.py\u0060 and \u0060applications/ColossalChat/coati/trainer/orpo.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 133 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/coati/trainer/dpo.py:270\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060applications/ColossalChat/coati/trainer/dpo.py:551\u0060 calls \u0060no_grad\u0060 and \u0060applications/ColossalChat/coati/trainer/dpo.py:268\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/dpo.py"},"region":{"startLine":270}}}],"partialFingerprints":{"codehealthFindingId/v1":"915097467d0caaa9d83eb84535b7808d724db82c8f5a45dba73b8eb2ac6330d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 3): colossalai/kernel/triton/context_attn_unpad.py:137-159 | colossalai/kernel/triton/context_attn_unpad.py:315-337 | colossalai/kernel/triton/context_attn_unpad.py:501-523 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/kernel/triton/context_attn_unpad.py:498\u0060 calls \u0060where\u0060 and \u0060colossalai/kernel/triton/context_attn_unpad.py:135\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/context_attn_unpad.py"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2ea20faad3d382bf7f714c82b7ae1845780ad4918f7516827b11ce1135100ee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22\u201323 lines \u00D7 3): colossalai/shardformer/modeling/_llama_tf4.py:205-226 | colossalai/shardformer/modeling/command.py:192-214 | colossalai/shardformer/modeling/command.py:521-543 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_llama_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/command.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 210 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_llama_tf4.py:205\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_llama_tf4.py"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd2a97409d0cb79f803535f12402e7030ae62c9ae64bf2532037e6ef06a2e4b8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): applications/ColossalChat/coati/distributed/launch.py:97-119 | applications/ColossalChat/coati/distributed/launch_zero_bubble.py:99-121 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/distributed/launch.py\u0060 and \u0060applications/ColossalChat/coati/distributed/launch_zero_bubble.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060applications/ColossalChat/coati/distributed/launch_zero_bubble.py:95\u0060 calls \u0060remote\u0060 and \u0060applications/ColossalChat/coati/distributed/launch.py:96\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/launch.py"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2fa06e722c8d702c3ea68503473dd71d771e268f10812e4b7fb606dd6dbf5b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): applications/ColossalChat/coati/distributed/producer.py:290-312 | applications/ColossalChat/coati/distributed/zero_bubble/producer.py:338-360 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/distributed/producer.py\u0060 and \u0060applications/ColossalChat/coati/distributed/zero_bubble/producer.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 234 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/producer.py"},"region":{"startLine":290}}}],"partialFingerprints":{"codehealthFindingId/v1":"a447565dcfd5e21ade6b93c64d7c558221a81b251b20b5cb021d6f40025b93c3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22\u201323 lines \u00D7 2): applications/ColossalChat/coati/trainer/kto.py:163-184 | applications/ColossalChat/coati/trainer/kto.py:313-335 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/kto.py"},"region":{"startLine":163}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c85db66aa8977f2ab9faa60baf9344849d3e7338954e48a8e58b1d4d6104fb6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201323 lines \u00D7 2): applications/ColossalQA/colossalqa/data_loader/document_loader.py:53-75 | applications/ColossalQA/colossalqa/data_loader/table_dataloader.py:52-68 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalQA/colossalqa/data_loader/document_loader.py"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"70ddb6b8d758b23b464ac20c37c767f75cd2dc8ac4a141d5a7c3626560cdba39"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): colossalai/_analyzer/_subclasses/flop_tensor.py:361-383 | colossalai/fx/profiler/opcount.py:164-186 \u2014 before extracting anything, compare \u0060colossalai/_analyzer/_subclasses/flop_tensor.py\u0060 and \u0060colossalai/fx/profiler/opcount.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 153 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/_subclasses/flop_tensor.py"},"region":{"startLine":361}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e5b84dea7530dc58271fe5f105f407c983916b7131130541014f7c793e6c24d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21\u201323 lines \u00D7 2): colossalai/_analyzer/_subclasses/meta_tensor.py:91-113 | colossalai/fx/profiler/tensor.py:64-84 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/_subclasses/meta_tensor.py"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ac63e369f9dd5fe44000bce95323d28351a5c6ef2fb3e94f65af6875a78305d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): colossalai/_analyzer/fx/codegen.py:61-83 | colossalai/fx/codegen/activation_checkpoint_codegen.py:100-122 \u2014 before extracting anything, compare \u0060colossalai/_analyzer/fx/codegen.py\u0060 and \u0060colossalai/fx/codegen/activation_checkpoint_codegen.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/fx/codegen.py"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7d2a3c43cd2f163191c60563242d6630b3a32fc6b634ea3460df7cb85801c27"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20\u201323 lines \u00D7 2): colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py:463-482 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/embedding_generator.py:204-226 \u2014 before extracting anything, compare \u0060colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py\u0060 and \u0060colossalai/auto_parallel/tensor_shard/node_handler/strategy/embedding_generator.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 143 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py"},"region":{"startLine":463}}}],"partialFingerprints":{"codehealthFindingId/v1":"70b89a36f880724fa9401da86bdb7ba2d9eedc17c5a8c8dd8d13de1281c85a2d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21\u201323 lines \u00D7 2): colossalai/auto_parallel/tensor_shard/node_handler/strategy/normal_pooling_generator.py:66-86 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/where_generator.py:32-54 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/normal_pooling_generator.py"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec51750c660f4cf7beda17d143ba7db852c512f230982e14a83293bdf32aea2d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py:670-692 | colossalai/checkpoint_io/moe_checkpoint.py:554-576 \u2014 before extracting anything, compare \u0060colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py\u0060 and \u0060colossalai/checkpoint_io/moe_checkpoint.py\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 249 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: \u0060CheckpointIndexFile\u0060 names \u0060.index_file\u0060 in one and \u0060colossalai.checkpoint_io\u0060 in another \u2014 different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":670}}}],"partialFingerprints":{"codehealthFindingId/v1":"da882d24ff68e8f69aa77e47bb670e4024848636cdd183b5966d5ab4fabd9aff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_2p5d/_operation.py:212-234 | colossalai/legacy/nn/layer/parallel_2p5d/_operation.py:534-556 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060colossalai/legacy/nn/layer/parallel_2p5d/_operation.py:235\u0060 calls \u0060copy_\u0060, \u0060broadcast\u0060 and \u0060colossalai/legacy/nn/layer/parallel_2p5d/_operation.py:557\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2p5d/_operation.py"},"region":{"startLine":212}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac65cdadf0b63c556ce92ad5fc436c56c9cb9f3cf556c57b1aba0de0b561ce63"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21\u201323 lines \u00D7 2): colossalai/nn/optimizer/distributed_lamb.py:105-125 | colossalai/nn/optimizer/lamb.py:45-67 \u2014 before extracting anything, compare \u0060colossalai/nn/optimizer/distributed_lamb.py\u0060 and \u0060colossalai/nn/optimizer/lamb.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/distributed_lamb.py"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f6968ee8f78d42a8bb7e027a0e301186d88313132c402bac717e220ccc24977"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22\u201323 lines \u00D7 2): colossalai/shardformer/layer/_operation.py:589-610 | colossalai/shardformer/layer/_operation.py:924-946 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/layer/_operation.py:589\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/_operation.py"},"region":{"startLine":589}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a98293573832ba20e00a86e8ab3d1d554bf2445c5a0571d697af76241ac06f6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): colossalai/shardformer/modeling/_bert_tf4.py:845-867 | colossalai/shardformer/modeling/_bert_tf5.py:858-880 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 45 separate duplicated blocks between them, totalling at least 882 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":845}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6936b3ec3c9d129c3e124a75926ccbb5497b4d5d6832778ef7ea8c6e0e06031"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): colossalai/shardformer/modeling/_llama_tf4.py:149-171 | colossalai/shardformer/modeling/_llama_tf5.py:205-227 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_llama_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_llama_tf5.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 483 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_llama_tf4.py:149\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_llama_tf4.py"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d9796dca673d9079ed39ed3725622d6ee6de4affab72dc1639614c8a8efe2ab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): colossalai/shardformer/modeling/_mixtral_tf4.py:724-746 | colossalai/shardformer/modeling/_mixtral_tf5.py:1123-1145 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_mixtral_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_mixtral_tf5.py\u0060 as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 581 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_mixtral_tf4.py"},"region":{"startLine":724}}}],"partialFingerprints":{"codehealthFindingId/v1":"b52eb88a423503e975ca1cd9629dfc32edc9f1d3165ec8b6af9cdaebc56314df"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): colossalai/shardformer/modeling/_qwen2_tf4.py:316-338 | colossalai/shardformer/modeling/_qwen2_tf5.py:225-247 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_qwen2_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_qwen2_tf5.py\u0060 as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 242 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_qwen2_tf4.py:316\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen2_tf4.py"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce4c873c6a809aee8a09dd8eac37ccf1a66b48105964a5ee522156e599b39b48"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): colossalai/shardformer/modeling/_qwen3_tf4.py:314-336 | colossalai/shardformer/modeling/_qwen3_tf5.py:226-248 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_qwen3_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_qwen3_tf5.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 278 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_qwen3_tf4.py:314\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen3_tf4.py"},"region":{"startLine":314}}}],"partialFingerprints":{"codehealthFindingId/v1":"72a1fe5ecbb5a2bdb6b519e3ecead23bd9efbbf6c16239c806e3f0a86d9d6cee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22\u201323 lines \u00D7 2): colossalai/shardformer/modeling/chatglm2.py:138-160 | colossalai/shardformer/modeling/chatglm2.py:371-392 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/chatglm2.py:138\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/chatglm2.py"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"8974ee568042ac06af1929473fe86aee5395a383fa9b4a8476093c53ebb1d22b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): colossalai/shardformer/policies/_bert_tf4.py:175-197 | colossalai/shardformer/policies/_bert_tf5.py:182-204 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 475 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/policies/_bert_tf4.py:175\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_bert_tf4.py"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"5099951d12c88b9b0270fdca56d14775f2f640ac3ccd077c83b8491307d4cb53"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 5): colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py:154-175 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py:214-235 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py:284-305 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/matmul_strategy_generator.py:360-381 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/matmul_strategy_generator.py:439-460 \u2014 before extracting anything, compare \u0060colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py\u0060 and \u0060colossalai/auto_parallel/tensor_shard/node_handler/strategy/matmul_strategy_generator.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c84e92bf202b010d2ce17ed3356b151c9f4df1dea19f1fa9b6286b379716f1e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21\u201322 lines \u00D7 4): colossalai/shardformer/policies/_whisper_tf4.py:595-616 | colossalai/shardformer/policies/_whisper_tf4.py:686-706 | colossalai/shardformer/policies/_whisper_tf5.py:582-603 | colossalai/shardformer/policies/_whisper_tf5.py:673-693 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_whisper_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_whisper_tf5.py\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 483 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: \u0060WhisperForConditionalGeneration\u0060 names \u0060transformers\u0060 in one and \u0060transformers.models.whisper.modeling_whisper\u0060 in another \u2014 different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_whisper_tf4.py"},"region":{"startLine":595}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec732da32b3ec6a991bc91662c20998e84c255251367755356c8d07e15386e3c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 3): colossalai/legacy/nn/layer/parallel_2d/layers.py:480-501 | colossalai/legacy/nn/layer/parallel_2p5d/layers.py:493-514 | colossalai/legacy/nn/layer/parallel_3d/layers.py:773-794 \u2014 \u0060colossalai/legacy/nn/layer/parallel_2d/layers.py\u0060 and \u0060colossalai/legacy/nn/layer/parallel_2p5d/layers.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 18 separate duplicated blocks between them, totalling at least 219 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2d/layers.py"},"region":{"startLine":480}}}],"partialFingerprints":{"codehealthFindingId/v1":"739d83a93d98d074277368ca9b59176bb627e945900c11c2248bd61c6403f67e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21\u201322 lines \u00D7 3): colossalai/pipeline/schedule/interleaved_pp.py:615-636 | colossalai/pipeline/schedule/one_f_one_b.py:460-480 | colossalai/pipeline/schedule/zero_bubble_pp.py:949-970 \u2014 before extracting anything, compare \u0060colossalai/pipeline/schedule/interleaved_pp.py\u0060 and \u0060colossalai/pipeline/schedule/zero_bubble_pp.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 82 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/pipeline/schedule/interleaved_pp.py"},"region":{"startLine":615}}}],"partialFingerprints":{"codehealthFindingId/v1":"51f35ddb0064f1bbe27532f6b28916c6b29c6c150bda33d7605a9956a31f9c02"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21\u201322 lines \u00D7 3): colossalai/shardformer/layer/linear.py:96-116 | colossalai/shardformer/layer/qkv_fused_linear.py:692-713 | colossalai/shardformer/layer/qkv_fused_linear.py:1267-1288 \u2014 before extracting anything, compare \u0060colossalai/shardformer/layer/linear.py\u0060 and \u0060colossalai/shardformer/layer/qkv_fused_linear.py\u0060 as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 261 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/linear.py"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d0ede5478dde9dc30b2736ef071450e8dbc0a024907645998d71ccc678532d3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): applications/ColossalChat/coati/distributed/consumer.py:115-136 | applications/ColossalChat/coati/distributed/zero_bubble/consumer.py:130-151 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/distributed/consumer.py\u0060 and \u0060applications/ColossalChat/coati/distributed/zero_bubble/consumer.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/consumer.py"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"7760e6ec3ef8bd0ca69bf2309ed5bd45667ae13853872c9ca00422edfc48ac75"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): applications/ColossalChat/coati/distributed/grpo_consumer.py:45-66 | applications/ColossalChat/coati/distributed/zero_bubble/grpo_consumer.py:46-67 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/distributed/grpo_consumer.py\u0060 and \u0060applications/ColossalChat/coati/distributed/zero_bubble/grpo_consumer.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 407 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/coati/distributed/grpo_consumer.py:45\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: \u0060BaseConsumer\u0060 names \u0060coati.distributed.consumer\u0060 in one and \u0060coati.distributed.zero_bubble.consumer\u0060 in another \u2014 different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/grpo_consumer.py"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"a602d881e804ebac1fb45f044713c21f8e252b0c81d810e4b0e107f51c4b5fff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): applications/ColossalChat/coati/distributed/grpo_consumer.py:82-103 | applications/ColossalChat/coati/distributed/zero_bubble/grpo_consumer.py:80-101 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/distributed/grpo_consumer.py\u0060 and \u0060applications/ColossalChat/coati/distributed/zero_bubble/grpo_consumer.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 407 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/coati/distributed/grpo_consumer.py:82\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: \u0060BaseConsumer\u0060 names \u0060coati.distributed.consumer\u0060 in one and \u0060coati.distributed.zero_bubble.consumer\u0060 in another \u2014 different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060applications/ColossalChat/coati/distributed/grpo_consumer.py:104\u0060 calls \u0060get\u0060 and \u0060applications/ColossalChat/coati/distributed/zero_bubble/grpo_consumer.py:102\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/grpo_consumer.py"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0c1491bae4a80e40bc728ec408d1ecb2cc8f850e19cea0b1dc2c09884ed5a49"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): applications/ColossalEval/colossal_eval/models/huggingface.py:545-566 | applications/ColossalEval/colossal_eval/models/vllm.py:445-466 \u2014 before extracting anything, compare \u0060applications/ColossalEval/colossal_eval/models/huggingface.py\u0060 and \u0060applications/ColossalEval/colossal_eval/models/vllm.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 157 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/models/huggingface.py"},"region":{"startLine":545}}}],"partialFingerprints":{"codehealthFindingId/v1":"b15fe5217e4cca92f91cc2bacaa05b692f2948c23c7c3853db002e85ca67fa60"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): applications/ColossalMoE/train.py:118-139 | colossalai/legacy/moe/openmoe/train.py:181-202 \u2014 before extracting anything, compare \u0060applications/ColossalMoE/train.py\u0060 and \u0060colossalai/legacy/moe/openmoe/train.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 125 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalMoE/train.py:118\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalMoE/train.py"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"12202c88be8e8aff53a61496744c469f6d28d247e797d5ff48781260e603fd15"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21\u201322 lines \u00D7 2): colossalai/auto_parallel/tensor_shard/node_handler/strategy/binary_elementwise_generator.py:69-90 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/getattr_generator.py:49-69 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/auto_parallel/tensor_shard/node_handler/strategy/binary_elementwise_generator.py:69\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/binary_elementwise_generator.py"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbdcfcfe039805d0162208065eb398021c4c3c9d38c727876167d84c3f318cd7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): colossalai/auto_parallel/tensor_shard/node_handler/strategy/embedding_generator.py:142-165 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/embedding_generator.py:238-259 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/embedding_generator.py"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"24a02f625e4db028c1647477e451462ad98443b8a84850ba910129bbb2d97482"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): colossalai/booster/plugin/torch_fsdp_plugin.py:65-86 | colossalai/booster/plugin/torch_fsdp_plugin.py:398-419 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/plugin/torch_fsdp_plugin.py"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"458d896f9cf9ddc15648c63c1207fd308d677a519b95e536b289b1646c58ad6c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py:373-394 | colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py:650-671 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py:373\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":373}}}],"partialFingerprints":{"codehealthFindingId/v1":"a78f814e01ea89544d82b2dd6d6e519bfd9d119e5800a7506ac863f91c48240a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py:912-933 | colossalai/checkpoint_io/moe_checkpoint.py:873-894 \u2014 before extracting anything, compare \u0060colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py\u0060 and \u0060colossalai/checkpoint_io/moe_checkpoint.py\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 249 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":912}}}],"partialFingerprints":{"codehealthFindingId/v1":"a63e4fcf360895bb018409a073d56ad067628e2bfbb0590bf0dda199fa0ab7d3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20\u201322 lines \u00D7 2): colossalai/shardformer/layer/loss.py:70-89 | colossalai/shardformer/layer/loss.py:179-200 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/loss.py"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"94fd9de69ce74fc858843a077f3328fdeb4d1e6ec02156666dbfa03903d1579f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19\u201322 lines \u00D7 2): colossalai/shardformer/modeling/_mixtral_tf4.py:833-854 | colossalai/shardformer/modeling/deepseek.py:834-852 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_mixtral_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/deepseek.py\u0060 as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 427 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_mixtral_tf4.py:833\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_mixtral_tf4.py"},"region":{"startLine":833}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c38a96e552976c40677180e274ac664e5d236b09c5e9b620ef054954cb5e6b1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): colossalai/shardformer/modeling/_vit_tf4.py:153-174 | colossalai/shardformer/modeling/_vit_tf5.py:76-97 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_vit_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_vit_tf5.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 183 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_vit_tf4.py:153\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: \u0060ImageClassifierOutput\u0060 names \u0060transformers.modeling_outputs\u0060 in one and \u0060transformers.models.vit.modeling_vit\u0060 in another \u2014 different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_vit_tf4.py"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cb13d63d348b2f00f383fccf51664cca2bee3c04b7e98d7d774f8f0a568f731"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): colossalai/shardformer/modeling/chatglm2.py:213-234 | colossalai/shardformer/modeling/chatglm2_6b/modeling_chatglm.py:746-767 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/chatglm2.py"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec1dbb97541116a9564278ad44ad91cd14fcb88e38c220a5d0acca41a58b9baa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): colossalai/tensor/d_tensor/api.py:210-231 | colossalai/tensor/d_tensor/api.py:239-260 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/tensor/d_tensor/api.py"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"9739d6239bf4675cd30b48d96851d4b5db575572bcddfe8e8bad5e13a9bb45a1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): extensions/cpp_extension.py:76-97 | extensions/cuda_extension.py:80-101 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060extensions/cpp_extension.py:76\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060extensions/cuda_extension.py:102\u0060 calls \u0060nvcc_flags\u0060 and \u0060extensions/cpp_extension.py:98\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"extensions/cpp_extension.py"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"214eff05898a4f68afbe0982632c6969692a2159d2a629c3ef106a0a8b4f4bb1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 4): colossalai/shardformer/policies/_qwen2_tf4.py:79-99 | colossalai/shardformer/policies/_qwen2_tf5.py:79-99 | colossalai/shardformer/policies/_qwen3_tf4.py:79-99 | colossalai/shardformer/policies/_qwen3_tf5.py:80-100 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_qwen2_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_qwen2_tf5.py\u0060 as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 399 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/policies/_qwen2_tf4.py:79\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_qwen2_tf4.py"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bd668dbd95e02136117ccc81a7adc18d917e68a468e6102853cc84e4ba9c743"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201321 lines \u00D7 3): applications/ColossalEval/colossal_eval/models/chatglm.py:90-106 | applications/ColossalEval/colossal_eval/models/chatglm.py:283-299 | applications/ColossalEval/colossal_eval/models/huggingface.py:532-552 \u2014 before extracting anything, compare \u0060applications/ColossalEval/colossal_eval/models/chatglm.py\u0060 and \u0060applications/ColossalEval/colossal_eval/models/huggingface.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalEval/colossal_eval/models/huggingface.py:532\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/models/chatglm.py"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d05c22c06789a86cc53770f503201c6e4b181db52e3a87db5c4c735f529a0bc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18\u201321 lines \u00D7 2): applications/ColossalChat/coati/distributed/consumer.py:250-270 | applications/ColossalChat/coati/distributed/zero_bubble/consumer.py:208-225 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/distributed/consumer.py\u0060 and \u0060applications/ColossalChat/coati/distributed/zero_bubble/consumer.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/coati/distributed/consumer.py:250\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060applications/ColossalChat/coati/distributed/zero_bubble/consumer.py:207\u0060 calls \u0060update\u0060 and \u0060applications/ColossalChat/coati/distributed/consumer.py:249\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/consumer.py"},"region":{"startLine":250}}}],"partialFingerprints":{"codehealthFindingId/v1":"e71ddb57bbeee37bba663ba6e308a9719c0673a012d61ebb9b04960b48e1e6cb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): applications/ColossalChat/coati/distributed/grpo_consumer.py:112-132 | applications/ColossalChat/coati/distributed/zero_bubble/grpo_consumer.py:112-132 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/distributed/grpo_consumer.py\u0060 and \u0060applications/ColossalChat/coati/distributed/zero_bubble/grpo_consumer.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 407 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: \u0060BaseConsumer\u0060 names \u0060coati.distributed.consumer\u0060 in one and \u0060coati.distributed.zero_bubble.consumer\u0060 in another \u2014 different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/grpo_consumer.py"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"0837d6e88080bfcfb52da6deb001f1a53baf75d038b90a8567e7f25347a49db0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): applications/ColossalChat/coati/distributed/producer.py:484-504 | applications/ColossalChat/coati/distributed/zero_bubble/producer.py:511-531 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/distributed/producer.py\u0060 and \u0060applications/ColossalChat/coati/distributed/zero_bubble/producer.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 234 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/producer.py"},"region":{"startLine":484}}}],"partialFingerprints":{"codehealthFindingId/v1":"480a755faa60bb19f476ceb5b8143868e6017d4c16c7fcbb4a2ecf65a20616d2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): applications/ColossalChat/coati/trainer/grpo.py:296-316 | applications/ColossalChat/coati/trainer/ppo.py:296-316 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/trainer/grpo.py\u0060 and \u0060applications/ColossalChat/coati/trainer/ppo.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 176 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/grpo.py"},"region":{"startLine":296}}}],"partialFingerprints":{"codehealthFindingId/v1":"2814d6d553db4fef5d2c3091b4971150491bf1f5d6afc5c1237bbd7f8a85d715"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): applications/ColossalEval/colossal_eval/dataset/safetybench_en.py:84-104 | applications/ColossalEval/colossal_eval/dataset/safetybench_zh.py:84-104 \u2014 before extracting anything, compare \u0060applications/ColossalEval/colossal_eval/dataset/safetybench_en.py\u0060 and \u0060applications/ColossalEval/colossal_eval/dataset/safetybench_zh.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/dataset/safetybench_en.py"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"07371cb7e34d613cda96bf7adc9643afb44583ebe4d791ea7f19832dcf5cb0d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): colossalai/auto_parallel/tensor_shard/node_handler/strategy/embedding_generator.py:116-136 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/embedding_generator.py:170-190 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/auto_parallel/tensor_shard/node_handler/strategy/embedding_generator.py:116\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/embedding_generator.py"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"62a13f35a86d7945bf2e42e80a6b316d6ae82a358fcd2549978d337f5ccbe423"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): colossalai/auto_parallel/tensor_shard/utils/misc.py:80-100 | colossalai/legacy/pipeline/rpc/utils.py:30-50 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/utils/misc.py"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec6ba64eac41505f89c44c0466e70c4dcacd79b7dc20f50352fb64786e430bb5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py:320-340 | colossalai/checkpoint_io/moe_checkpoint.py:211-231 \u2014 before extracting anything, compare \u0060colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py\u0060 and \u0060colossalai/checkpoint_io/moe_checkpoint.py\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 249 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py:320\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060colossalai/checkpoint_io/moe_checkpoint.py:233\u0060 calls \u0060barrier\u0060 and \u0060colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py:342\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":320}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d72e4822d46fa818750d47b8d108398fd22db9da51265f54a6450c32fe28685"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): colossalai/inference/kv_cache/kvcache_manager.py:71-91 | colossalai/inference/kv_cache/kvcache_manager.py:548-568 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/kv_cache/kvcache_manager.py"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5644e4f07611587e79fa918b92faa19463b746bd909b1d7c09f81d8b768d21e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): colossalai/inference/modeling/layers/distrifusion.py:377-397 | colossalai/inference/modeling/layers/distrifusion.py:533-553 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/modeling/layers/distrifusion.py"},"region":{"startLine":377}}}],"partialFingerprints":{"codehealthFindingId/v1":"58e0b86fd0327595067135fda197e5258cf8ce173a1b9945fa2f4b3bd193b82d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_2d/_operation.py:257-277 | colossalai/legacy/nn/layer/parallel_2d/_operation.py:563-583 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060colossalai/legacy/nn/layer/parallel_2d/_operation.py:278\u0060 calls \u0060copy_\u0060, \u0060broadcast\u0060 and \u0060colossalai/legacy/nn/layer/parallel_2d/_operation.py:584\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2d/_operation.py"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2729f3e8b99398792a8cf501b0171bb2c9a1987406463f256f1ec1656406fbd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20\u201321 lines \u00D7 2): colossalai/nn/optimizer/distributed_galore.py:144-163 | colossalai/nn/optimizer/galore.py:236-256 \u2014 before extracting anything, compare \u0060colossalai/nn/optimizer/distributed_galore.py\u0060 and \u0060colossalai/nn/optimizer/galore.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060colossalai/nn/optimizer/galore.py:258\u0060 calls \u0060save\u0060 and \u0060colossalai/nn/optimizer/distributed_galore.py:164\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/distributed_galore.py"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"3574f413af691fc701d1d9114ee8dd993ace12f23b2be210833060e23e6372ed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201321 lines \u00D7 2): colossalai/shardformer/layer/qkv_fused_linear.py:317-337 | colossalai/shardformer/layer/qkv_fused_linear.py:521-536 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/qkv_fused_linear.py"},"region":{"startLine":317}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c421b88a2238a033333e169cb61c7c6d791c5a8fba65f850bd44a382a35ef5a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): colossalai/shardformer/modeling/_mixtral_tf4.py:324-344 | colossalai/shardformer/modeling/deepseek.py:414-434 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_mixtral_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/deepseek.py\u0060 as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 427 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_mixtral_tf4.py:324\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060colossalai/shardformer/modeling/deepseek.py:437\u0060 calls \u0060decoder_layer\u0060 and \u0060colossalai/shardformer/modeling/_mixtral_tf4.py:345\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_mixtral_tf4.py"},"region":{"startLine":324}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8b973c2a353805aec0df72a1bd4439cd58aeb6f8a618b0bd6df90ce6539f3d1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): colossalai/shardformer/modeling/_qwen2_tf4.py:609-629 | colossalai/shardformer/modeling/_qwen3_tf4.py:601-621 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_qwen2_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_qwen3_tf4.py\u0060 as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1214 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen2_tf4.py"},"region":{"startLine":609}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3a49a0cdc08c9c08d2f7f55c597480b2b510ebe91ea8aa0202fe58536bc5938"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19\u201320 lines \u00D7 7): colossalai/shardformer/modeling/gpt2.py:476-494 | colossalai/shardformer/modeling/gpt2.py:562-581 | colossalai/shardformer/modeling/gpt2.py:653-671 | colossalai/shardformer/modeling/gpt2.py:738-756 | colossalai/shardformer/modeling/gptj.py:299-317 | colossalai/shardformer/modeling/gptj.py:401-419 | colossalai/shardformer/modeling/gptj.py:511-530 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/gpt2.py\u0060 and \u0060colossalai/shardformer/modeling/gptj.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 321 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/gptj.py:299\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/gpt2.py"},"region":{"startLine":476}}}],"partialFingerprints":{"codehealthFindingId/v1":"893f40c8c5dfbb3f748bc935b2e0371f9914e5cd877c2d134ced22d0ec80c8d1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 5): colossalai/shardformer/modeling/_bert_tf4.py:964-983 | colossalai/shardformer/modeling/_bert_tf5.py:977-996 | colossalai/shardformer/modeling/bloom.py:674-693 | colossalai/shardformer/modeling/falcon.py:690-709 | colossalai/shardformer/modeling/opt.py:490-509 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 45 separate duplicated blocks between them, totalling at least 882 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_bert_tf4.py:964\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":964}}}],"partialFingerprints":{"codehealthFindingId/v1":"6df351e780c53449144a5163b963fb932de8342add4b21b8bb9132c54045403c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 4): colossalai/shardformer/policies/_bert_tf4.py:56-75 | colossalai/shardformer/policies/_bert_tf5.py:55-74 | colossalai/shardformer/policies/bloom.py:39-58 | colossalai/shardformer/policies/gpt2.py:41-60 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 475 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_bert_tf4.py"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8e67f7ce8ba866d955a88d2dc306d10c1110e299910d4e00f13551c4cc4a3ac"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 4): colossalai/shardformer/policies/_qwen2_tf4.py:57-76 | colossalai/shardformer/policies/_qwen2_tf5.py:57-76 | colossalai/shardformer/policies/_qwen3_tf4.py:57-76 | colossalai/shardformer/policies/_qwen3_tf5.py:58-77 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_qwen2_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_qwen2_tf5.py\u0060 as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 399 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_qwen2_tf4.py"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"b82126ea225af487cfdbca1435337b05d576b3296e036fef0d550b79d24450ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 3): colossalai/kernel/triton/context_attn_unpad.py:59-78 | colossalai/kernel/triton/context_attn_unpad.py:237-256 | colossalai/kernel/triton/context_attn_unpad.py:414-433 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/kernel/triton/context_attn_unpad.py:59\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/context_attn_unpad.py"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"57c4995edc21341e5a107d68ac6f14c99d9b9f5368ec9f3d513fbf29d54b901d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201320 lines \u00D7 3): colossalai/shardformer/modeling/_mixtral_tf4.py:833-849 | colossalai/shardformer/modeling/_mixtral_tf5.py:1214-1233 | colossalai/shardformer/modeling/deepseek.py:834-850 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_mixtral_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_mixtral_tf5.py\u0060 as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 581 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_mixtral_tf4.py"},"region":{"startLine":833}}}],"partialFingerprints":{"codehealthFindingId/v1":"047f2ac662475767c0e65f02dd7aa00556e9c60c397a59f233158eb0abe91030"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): applications/Colossal-LLaMA/colossal_llama/dataset/loader.py:28-47 | applications/ColossalChat/coati/dataset/loader.py:35-54 \u2014 before extracting anything, compare \u0060applications/Colossal-LLaMA/colossal_llama/dataset/loader.py\u0060 and \u0060applications/ColossalChat/coati/dataset/loader.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 90 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/colossal_llama/dataset/loader.py"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"94751072b4203ac73ce0793e584d8042115804b0ab8b4df03024d1dab0d4b915"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): applications/ColossalEval/colossal_eval/models/chatglm.py:115-134 | applications/ColossalEval/colossal_eval/models/huggingface.py:151-170 \u2014 before extracting anything, compare \u0060applications/ColossalEval/colossal_eval/models/chatglm.py\u0060 and \u0060applications/ColossalEval/colossal_eval/models/huggingface.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/models/chatglm.py"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"546a899c43a9d314f06d7f36413b405e88afd15625e344bfc6ca52019d5793bb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py:751-770 | colossalai/checkpoint_io/moe_checkpoint.py:640-659 \u2014 before extracting anything, compare \u0060colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py\u0060 and \u0060colossalai/checkpoint_io/moe_checkpoint.py\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 249 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":751}}}],"partialFingerprints":{"codehealthFindingId/v1":"0129fdaa31926ded8fbd7f0da34ab204a4507d3867f3d8cc94dc53114bceedca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19\u201320 lines \u00D7 2): colossalai/checkpoint_io/moe_checkpoint.py:258-276 | colossalai/checkpoint_io/moe_checkpoint.py:536-555 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/checkpoint_io/moe_checkpoint.py:258\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: \u0060CheckpointIndexFile\u0060 names \u0060colossalai.checkpoint_io\u0060 in one and \u0060colossalai.checkpoint_io.index_file\u0060 in another \u2014 different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/moe_checkpoint.py"},"region":{"startLine":258}}}],"partialFingerprints":{"codehealthFindingId/v1":"902bc7b4e879b8719806e68780ccc7df0f3891a4c96b0d65cef950976b00eb0d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19\u201320 lines \u00D7 2): colossalai/checkpoint_io/utils.py:875-894 | colossalai/inference/utils.py:68-86 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/utils.py"},"region":{"startLine":875}}}],"partialFingerprints":{"codehealthFindingId/v1":"c52c0d5071aec0912c2c84ad6719c3a6a61ecb0c6bec83875c910c5447dd9a11"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201320 lines \u00D7 2): colossalai/fx/tracer/bias_addition_patch/patched_bias_addition_function/addbmm.py:52-71 | colossalai/fx/tracer/bias_addition_patch/patched_bias_addition_function/addmm.py:40-56 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/bias_addition_patch/patched_bias_addition_function/addbmm.py"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"81bc218f6f0d1128ffcd5891c08a1907b8b89441794ae11122a17b786dcd28b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): colossalai/kernel/triton/flash_decoding.py:111-130 | colossalai/kernel/triton/flash_decoding.py:234-253 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/flash_decoding.py"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec8adff6fcf40b7ff81e0dd757b6f3dec9e899e54aa84bd75b2f660027909eb3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): colossalai/legacy/inference/hybridengine/polices/llama.py:94-113 | colossalai/legacy/inference/tensor_parallel/policies/llama.py:86-105 \u2014 before extracting anything, compare \u0060colossalai/legacy/inference/hybridengine/polices/llama.py\u0060 and \u0060colossalai/legacy/inference/tensor_parallel/policies/llama.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/inference/hybridengine/polices/llama.py:94\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/hybridengine/polices/llama.py"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad5f019df25fb3457051fe19c4d20cca69acb741b1f6244e87b9c39b81b3b440"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_2d/_operation.py:93-112 | colossalai/legacy/nn/layer/parallel_2p5d/_operation.py:45-64 \u2014 \u0060colossalai/legacy/nn/layer/parallel_2d/_operation.py\u0060 and \u0060colossalai/legacy/nn/layer/parallel_2p5d/_operation.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 16 separate duplicated blocks between them, totalling at least 185 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2d/_operation.py"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed3705fae14e2047c47844b8c1d6d5f214d5eea689d27378b4dc2a6072ec1120"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_2d/layers.py:651-670 | colossalai/legacy/nn/layer/parallel_2d/layers.py:797-816 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/nn/layer/parallel_2d/layers.py:651\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2d/layers.py"},"region":{"startLine":651}}}],"partialFingerprints":{"codehealthFindingId/v1":"33111758e7a64de6f0e4e3966424410342a41b6e767270f507fa11b641ecdeb6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_2p5d/layers.py:664-683 | colossalai/legacy/nn/layer/parallel_2p5d/layers.py:807-826 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/nn/layer/parallel_2p5d/layers.py:664\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2p5d/layers.py"},"region":{"startLine":664}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9d49a287834c0727d0398307d1c4f87eb9ab5746965a9cf595ae1ab276f4de9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19\u201320 lines \u00D7 2): colossalai/nn/optimizer/came.py:65-83 | colossalai/nn/optimizer/distributed_came.py:334-353 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/came.py"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"95d7966c05f86ce2d702771ec605435f78a14a870332e51a597cc8ac363e3623"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18\u201320 lines \u00D7 2): colossalai/shardformer/_utils.py:188-207 | colossalai/shardformer/_utils.py:215-232 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/_utils.py"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9f070d4d5458838f8d2bb9168c04f10962a53683e40b13fa861e8624e46fc69"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): colossalai/shardformer/modeling/_bert_tf4.py:341-360 | colossalai/shardformer/modeling/_bert_tf5.py:354-373 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 45 separate duplicated blocks between them, totalling at least 882 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":341}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb0f45098255d783ac96bbefac4af2efca088205816f33bd92bf73f386f41c46"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19\u201320 lines \u00D7 2): colossalai/shardformer/modeling/_deepseek_v3_tf5.py:130-148 | colossalai/shardformer/modeling/_mixtral_tf5.py:485-504 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_deepseek_v3_tf5.py\u0060 and \u0060colossalai/shardformer/modeling/_mixtral_tf5.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_deepseek_v3_tf5.py:130\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_deepseek_v3_tf5.py"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3aae6fbec67807a4e421a3c9f509e280b1e428d43e151b1b516e15c7154c150"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18\u201320 lines \u00D7 2): colossalai/shardformer/modeling/_whisper_tf4.py:233-250 | colossalai/shardformer/modeling/opt.py:691-710 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_whisper_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/opt.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 105 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_whisper_tf4.py:233\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_whisper_tf4.py"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"d62cc8dfbf95d94742dcffe0a9756d4131675a6d65baf51a71397a9b12e9b639"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19\u201320 lines \u00D7 2): colossalai/shardformer/modeling/bloom.py:590-608 | colossalai/shardformer/modeling/falcon.py:607-626 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/bloom.py\u0060 and \u0060colossalai/shardformer/modeling/falcon.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 594 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/bloom.py:590\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060colossalai/shardformer/modeling/bloom.py:610\u0060 calls \u0060to\u0060 and \u0060colossalai/shardformer/modeling/falcon.py:627\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/bloom.py"},"region":{"startLine":590}}}],"partialFingerprints":{"codehealthFindingId/v1":"4639ba0d1816641e49950b6fd8da51f85bc072d56b0f3a5a6e0e8c7661b96cfa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): colossalai/shardformer/modeling/gpt2.py:712-731 | colossalai/shardformer/modeling/gptj.py:375-394 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/gpt2.py\u0060 and \u0060colossalai/shardformer/modeling/gptj.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 321 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/gpt2.py"},"region":{"startLine":712}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e380adceec4bdb4c624845188ff75117a377acd2fee78edcdccc148afdaa0e3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19\u201320 lines \u00D7 2): colossalai/shardformer/modeling/opt.py:383-402 | colossalai/shardformer/modeling/opt.py:483-501 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/shardformer/modeling/opt.py:381\u0060 calls \u0060get_logger\u0060 and \u0060colossalai/shardformer/modeling/opt.py:481\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/opt.py"},"region":{"startLine":383}}}],"partialFingerprints":{"codehealthFindingId/v1":"732abb385b47af1eefdc24d7d4b7e68d1901784e108099fdae335e22449c7cbc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 14): colossalai/shardformer/modeling/_bert_tf4.py:308-326 | colossalai/shardformer/modeling/_bert_tf4.py:413-431 | colossalai/shardformer/modeling/_bert_tf4.py:501-519 | colossalai/shardformer/modeling/_bert_tf4.py:610-628 | colossalai/shardformer/modeling/_bert_tf4.py:686-704 | colossalai/shardformer/modeling/_bert_tf4.py:778-796 | colossalai/shardformer/modeling/_bert_tf4.py:952-970 | colossalai/shardformer/modeling/_bert_tf5.py:321-339 | colossalai/shardformer/modeling/_bert_tf5.py:426-444 | colossalai/shardformer/modeling/_bert_tf5.py:514-532 | colossalai/shardformer/modeling/_bert_tf5.py:623-641 | colossalai/shardformer/modeling/_bert_tf5.py:699-717 | colossalai/shardformer/modeling/_bert_tf5.py:791-809 | colossalai/shardformer/modeling/_bert_tf5.py:965-983 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 45 separate duplicated blocks between them, totalling at least 882 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_bert_tf4.py:308\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":308}}}],"partialFingerprints":{"codehealthFindingId/v1":"057406da5e1f040ada29a775713ed9750d4db6973723bc2d95fff58bdcb6f266"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 7): applications/Colossal-LLaMA/train.py:86-104 | applications/ColossalChat/examples/training_scripts/lora_finetune.py:82-100 | applications/ColossalChat/examples/training_scripts/train_dpo.py:61-79 | applications/ColossalChat/examples/training_scripts/train_kto.py:71-89 | applications/ColossalChat/examples/training_scripts/train_orpo.py:71-89 | applications/ColossalChat/examples/training_scripts/train_rm.py:99-117 | applications/ColossalChat/examples/training_scripts/train_sft.py:93-111 \u2014 before extracting anything, compare \u0060applications/Colossal-LLaMA/train.py\u0060 and \u0060applications/ColossalChat/examples/training_scripts/lora_finetune.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/Colossal-LLaMA/train.py:86\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060applications/Colossal-LLaMA/train.py:105\u0060 calls \u0060get_accelerator\u0060, \u0060is_available\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_dpo.py:80\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/train.py"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"49f23c1c2502b7a1b0bd2d989edc5dfc97840265debc4293ee9ac19ecf0fff45"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201319 lines \u00D7 7): colossalai/booster/plugin/dp_plugin_base.py:61-76 | colossalai/booster/plugin/gemini_plugin.py:635-653 | colossalai/booster/plugin/hybrid_parallel_plugin.py:1431-1449 | examples/language/data_utils.py:76-94 | examples/language/deepseek/data_utils.py:76-94 | examples/language/llama/data_utils.py:76-94 | examples/language/mixtral/data_utils.py:76-94 \u2014 before extracting anything, compare \u0060examples/language/data_utils.py\u0060 and \u0060examples/language/deepseek/data_utils.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/booster/plugin/gemini_plugin.py:635\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/plugin/dp_plugin_base.py"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea9a60b048dd14e823a4ca5b2426b0a31ad0b1418ba5aa3e138b43f811ee2f8e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201319 lines \u00D7 5): colossalai/auto_parallel/tensor_shard/node_handler/strategy/reshape_generator.py:174-192 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/reshape_generator.py:220-238 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/softmax_generator.py:78-95 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/sum_generator.py:86-103 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/unary_elementwise_generator.py:64-80 \u2014 before extracting anything, compare \u0060colossalai/auto_parallel/tensor_shard/node_handler/strategy/reshape_generator.py\u0060 and \u0060colossalai/auto_parallel/tensor_shard/node_handler/strategy/softmax_generator.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/auto_parallel/tensor_shard/node_handler/strategy/softmax_generator.py:77\u0060 calls \u0060deepcopy\u0060 and \u0060colossalai/auto_parallel/tensor_shard/node_handler/strategy/sum_generator.py:84\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/reshape_generator.py"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d2017c10c8e48322e8e3ad109c224117cc387869d85244b433dbea5b4ecb98c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 5): colossalai/shardformer/modeling/_qwen2_tf4.py:326-344 | colossalai/shardformer/modeling/_qwen2_tf5.py:235-253 | colossalai/shardformer/modeling/_qwen3_tf4.py:324-342 | colossalai/shardformer/modeling/_qwen3_tf5.py:236-254 | colossalai/shardformer/modeling/command.py:305-323 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_qwen2_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_qwen2_tf5.py\u0060 as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 242 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_qwen2_tf4.py:326\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen2_tf4.py"},"region":{"startLine":326}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ae7d0d472062cc73bbe793df5a1e40d608d15280204b7680bf18ce593d6bb56"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201319 lines \u00D7 4): colossalai/shardformer/layer/linear.py:288-299 | colossalai/shardformer/layer/linear.py:484-496 | colossalai/shardformer/layer/qkv_fused_linear.py:912-930 | colossalai/shardformer/layer/qkv_fused_linear.py:1112-1124 \u2014 before extracting anything, compare \u0060colossalai/shardformer/layer/linear.py\u0060 and \u0060colossalai/shardformer/layer/qkv_fused_linear.py\u0060 as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 261 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060module\u0060 to \u0060nn.Linear\u0060 in one and \u0060nn.Module\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/linear.py"},"region":{"startLine":288}}}],"partialFingerprints":{"codehealthFindingId/v1":"5eb0cc7cc8f1446d3060e5c41262cd6840faa445e482e6cbafa8aad5a4d4b3fa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201319 lines \u00D7 3): colossalai/nn/optimizer/cpu_adam.py:160-176 | colossalai/nn/optimizer/cpu_adam.py:197-215 | colossalai/nn/optimizer/hybrid_adam.py:128-144 \u2014 before extracting anything, compare \u0060colossalai/nn/optimizer/cpu_adam.py\u0060 and \u0060colossalai/nn/optimizer/hybrid_adam.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/nn/optimizer/cpu_adam.py:157\u0060 calls \u0060_pre_update\u0060 and \u0060colossalai/nn/optimizer/cpu_adam.py:195\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/cpu_adam.py"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"354e250f296d16958d586587cdf5aaa8ee8fadb3e9afce40c169bfd3a92dfbfc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 3): colossalai/shardformer/layer/qkv_fused_linear.py:252-270 | colossalai/shardformer/layer/qkv_fused_linear.py:847-865 | colossalai/shardformer/layer/qkv_fused_linear.py:1055-1073 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/shardformer/layer/qkv_fused_linear.py:1054\u0060 calls \u0060get_world_size\u0060 and \u0060colossalai/shardformer/layer/qkv_fused_linear.py:251\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/qkv_fused_linear.py"},"region":{"startLine":252}}}],"partialFingerprints":{"codehealthFindingId/v1":"38d34ca897f68109b948b7b4ae5c7e8ad67670519c3b79a1f38920e0e1da321f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 3): colossalai/shardformer/modeling/_bert_tf4.py:443-461 | colossalai/shardformer/modeling/_bert_tf5.py:456-474 | examples/community/roberta/pretraining/model/bert.py:1240-1258 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 45 separate duplicated blocks between them, totalling at least 882 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_bert_tf4.py:443\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/shardformer/modeling/_bert_tf4.py:442\u0060 calls \u0060is_last_stage\u0060 and \u0060examples/community/roberta/pretraining/model/bert.py:1238\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":443}}}],"partialFingerprints":{"codehealthFindingId/v1":"42b0341f0ff15c4887d90abd8bb887e196fd4762230856737ef51fe91186dc90"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201319 lines \u00D7 3): colossalai/shardformer/modeling/_llama_tf4.py:587-605 | colossalai/shardformer/modeling/_qwen2_tf4.py:580-596 | colossalai/shardformer/modeling/_qwen3_tf4.py:572-588 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_llama_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_qwen2_tf4.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 241 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_llama_tf4.py:587\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_llama_tf4.py"},"region":{"startLine":587}}}],"partialFingerprints":{"codehealthFindingId/v1":"093c6428d1d643bbd26fb259ff3088db865fc217e19909dda5444fdf84b2996d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): applications/ColossalChat/coati/distributed/consumer.py:150-168 | applications/ColossalChat/coati/distributed/consumer.py:336-354 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/consumer.py"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"20587c11d9cf715a402e8eb66bccbaa6a89aa3a505d09ea2cf9245789623a2c1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): applications/ColossalChat/coati/trainer/grpo.py:171-189 | applications/ColossalChat/coati/trainer/ppo.py:162-180 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/trainer/grpo.py\u0060 and \u0060applications/ColossalChat/coati/trainer/ppo.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 176 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/grpo.py"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"445928f0a436926144e87abfff5f648cd0b01ad9e5b01f1c423217ec90614000"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18\u201319 lines \u00D7 2): applications/ColossalEval/colossal_eval/evaluate/gpt_evaluate.py:412-429 | applications/ColossalEval/colossal_eval/evaluate/gpt_evaluate.py:475-493 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalEval/colossal_eval/evaluate/gpt_evaluate.py:475\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/evaluate/gpt_evaluate.py"},"region":{"startLine":412}}}],"partialFingerprints":{"codehealthFindingId/v1":"eec4ae5a71d39291e9a155084ebf784080fe0c27fc4970bed74ca2f75f518896"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): applications/ColossalQA/colossalqa/local/pangu_llm.py:111-129 | applications/ColossalQA/colossalqa/local/pangu_llm.py:132-150 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalQA/colossalqa/local/pangu_llm.py"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"1295b314f30df5f64f2addee98c5bd67b2120c6452104951d2b3dc66f991bc60"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): colossalai/_analyzer/_subclasses/flop_tensor.py:398-416 | colossalai/fx/profiler/opcount.py:201-219 \u2014 before extracting anything, compare \u0060colossalai/_analyzer/_subclasses/flop_tensor.py\u0060 and \u0060colossalai/fx/profiler/opcount.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 153 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/_subclasses/flop_tensor.py"},"region":{"startLine":398}}}],"partialFingerprints":{"codehealthFindingId/v1":"d75d60a3c3d32ab9abc4908a43d3fea867fe7c961160bd29832e4c1f97d56548"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18\u201319 lines \u00D7 2): colossalai/auto_parallel/meta_profiler/meta_registry/conv.py:125-143 | colossalai/auto_parallel/meta_profiler/meta_registry/linear.py:169-186 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/auto_parallel/meta_profiler/meta_registry/conv.py:125\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/meta_profiler/meta_registry/conv.py"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9ab36fa831a2eef5c3b89240d07b37b83f6f62d2d02d4e20384d716328cda2a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18\u201319 lines \u00D7 2): colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py:127-144 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/embedding_generator.py:159-177 \u2014 before extracting anything, compare \u0060colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py\u0060 and \u0060colossalai/auto_parallel/tensor_shard/node_handler/strategy/embedding_generator.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 143 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py:127\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"3603dc385e09f5f9da9f905f8bbc987c4ad6df00602c0d0ec5cbda1aafbdd3cb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): colossalai/booster/plugin/hybrid_parallel_plugin.py:444-462 | colossalai/booster/plugin/hybrid_parallel_plugin.py:651-669 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/plugin/hybrid_parallel_plugin.py"},"region":{"startLine":444}}}],"partialFingerprints":{"codehealthFindingId/v1":"1807efdb8c1d58a437b12bdcf4ec2570ad89d3696ac94d2e8629f7fffdfb228d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): colossalai/checkpoint_io/moe_checkpoint.py:226-244 | colossalai/checkpoint_io/moe_checkpoint.py:508-526 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/moe_checkpoint.py"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba8f14d20018a520d466ca0536e03c368b65d9313db76b10bdb0ef5c8bf97cce"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): colossalai/fx/profiler/profiler.py:90-108 | colossalai/fx/profiler/profiler.py:124-142 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/profiler/profiler.py"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"00cc947e8ee77299881cc86ca6ceb18e561b82d3f09baa573ba82ed9cc0499e1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): colossalai/inference/core/diffusion_engine.py:94-112 | colossalai/inference/core/llm_engine.py:170-188 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/core/diffusion_engine.py"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"dab21f10ab97311c9cd7b87ac4bff727bd317225dc73fb68033c47459da9ffdb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18\u201319 lines \u00D7 2): colossalai/kernel/triton/flash_decoding.py:50-67 | colossalai/kernel/triton/flash_decoding.py:168-186 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/flash_decoding.py"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6a46575b30ddb4fb926b0bea7f9f06d4b5de380ef0f87c8880f853a0e876971"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): colossalai/legacy/inference/hybridengine/modeling/llama.py:395-413 | colossalai/legacy/inference/tensor_parallel/modeling/llama.py:315-333 \u2014 before extracting anything, compare \u0060colossalai/legacy/inference/hybridengine/modeling/llama.py\u0060 and \u0060colossalai/legacy/inference/tensor_parallel/modeling/llama.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 250 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/hybridengine/modeling/llama.py"},"region":{"startLine":395}}}],"partialFingerprints":{"codehealthFindingId/v1":"c231bedba3e9f688fe39ce1d809ca9b252bdaa89c503fcabbcb60acae19643d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): colossalai/legacy/inference/quant/gptq/cai_gptq/cai_quant_linear.py:269-287 | colossalai/legacy/inference/quant/gptq/cai_gptq/cai_quant_linear.py:323-341 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/quant/gptq/cai_gptq/cai_quant_linear.py"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d518f9b376bc886f96396c176692c3f059c52c25e8b8ed67e76c3d09b2a9b5b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_2d/_operation.py:449-467 | colossalai/legacy/nn/layer/parallel_2d/_operation.py:606-624 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2d/_operation.py"},"region":{"startLine":449}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d22c715a8cd1b0a92fd15f34362cb44594b768172cc1a0cb2caeb3b8af32ae5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_2p5d/_operation.py:416-434 | colossalai/legacy/nn/layer/parallel_2p5d/_operation.py:579-597 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2p5d/_operation.py"},"region":{"startLine":416}}}],"partialFingerprints":{"codehealthFindingId/v1":"1bc46d2ddca1fe2c30c1bc05c04245a868bca9322b1bc6ee7991d1dac60b0350"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_3d/layers.py:291-309 | colossalai/legacy/nn/layer/parallel_3d/layers.py:623-641 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/nn/layer/parallel_3d/layers.py:291\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_3d/layers.py"},"region":{"startLine":291}}}],"partialFingerprints":{"codehealthFindingId/v1":"91c602af3e6e8b06bf54607ad491429a5046d96a9fc1b325141d7209730406ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_3d/layers.py:431-449 | colossalai/legacy/nn/layer/parallel_3d/layers.py:587-605 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_3d/layers.py"},"region":{"startLine":431}}}],"partialFingerprints":{"codehealthFindingId/v1":"853f056d60589e8ff7002dd8da4a8c9012afa9f16b30836c0e5be9405f8e1c63"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18\u201319 lines \u00D7 2): colossalai/nn/optimizer/adafactor.py:156-174 | colossalai/nn/optimizer/distributed_adafactor.py:379-396 \u2014 before extracting anything, compare \u0060colossalai/nn/optimizer/adafactor.py\u0060 and \u0060colossalai/nn/optimizer/distributed_adafactor.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/nn/optimizer/adafactor.py:156\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/adafactor.py"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2ff3c13c400f6ac5d48209094dff3669437bdb49992b1be88fbbfe171dc8a4d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18\u201319 lines \u00D7 2): colossalai/nn/optimizer/distributed_galore.py:164-181 | colossalai/nn/optimizer/galore.py:259-277 \u2014 before extracting anything, compare \u0060colossalai/nn/optimizer/distributed_galore.py\u0060 and \u0060colossalai/nn/optimizer/galore.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/nn/optimizer/galore.py:258\u0060 calls \u0060save\u0060 and \u0060colossalai/nn/optimizer/distributed_galore.py:163\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/distributed_galore.py"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"c79ca233b219412080359276443bed8313357bd42b7f96cdc28a6be200951b8a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): colossalai/shardformer/modeling/_mixtral_tf4.py:550-568 | colossalai/shardformer/modeling/_mixtral_tf5.py:930-948 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_mixtral_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_mixtral_tf5.py\u0060 as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 581 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_mixtral_tf4.py:550\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060colossalai/shardformer/modeling/_mixtral_tf5.py:952\u0060 calls \u0060getattr\u0060 and \u0060colossalai/shardformer/modeling/_mixtral_tf4.py:571\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_mixtral_tf4.py"},"region":{"startLine":550}}}],"partialFingerprints":{"codehealthFindingId/v1":"23c47702478dc081ec130c92f89cd259e6d9a0d3198fe359f808c58c92a68b3e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): colossalai/shardformer/modeling/_whisper_tf4.py:962-980 | colossalai/shardformer/modeling/t5.py:373-391 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/t5.py:373\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_whisper_tf4.py"},"region":{"startLine":962}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f822395a59d7355069e945a3f0b53197e05af882d0ad0041f3baf3190f2e64b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201318 lines \u00D7 4): colossalai/shardformer/modeling/_mixtral_tf4.py:480-496 | colossalai/shardformer/modeling/_mixtral_tf5.py:846-862 | colossalai/shardformer/modeling/deepseek.py:541-558 | colossalai/shardformer/modeling/mistral.py:244-261 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_mixtral_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_mixtral_tf5.py\u0060 as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 581 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_mixtral_tf4.py:480\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_mixtral_tf4.py"},"region":{"startLine":480}}}],"partialFingerprints":{"codehealthFindingId/v1":"e25125dd2880e2438a85756eae91eafde8f3684f3479804d67256a9f1221f76f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201318 lines \u00D7 4): colossalai/shardformer/modeling/gpt2.py:140-157 | colossalai/shardformer/modeling/gptj.py:103-120 | colossalai/shardformer/modeling/t5.py:301-317 | colossalai/shardformer/modeling/t5.py:441-457 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/gpt2.py\u0060 and \u0060colossalai/shardformer/modeling/gptj.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 321 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/gpt2.py"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"d79c63a95a09259885af8ddff976373900ead20f2c0b0ca19c6b22a4fed002f6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 3): applications/ColossalChat/coati/trainer/dpo.py:134-151 | applications/ColossalChat/coati/trainer/dpo.py:268-285 | applications/ColossalChat/coati/trainer/orpo.py:120-137 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/trainer/dpo.py\u0060 and \u0060applications/ColossalChat/coati/trainer/orpo.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 133 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/coati/trainer/dpo.py:134\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/dpo.py"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"32cc478b166cf9088ab606cbb80dfe986ab907bb8a62a15e9bd5c1ee3d76ec05"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 3): applications/ColossalChat/coati/trainer/dpo.py:154-171 | applications/ColossalChat/coati/trainer/dpo.py:306-323 | applications/ColossalChat/coati/trainer/dpo.py:445-462 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/dpo.py"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2b40f3d893d05c4f9e81d9a6da3c18adcbd30be7f42612b3e414a43772576eb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 3): applications/ColossalChat/coati/trainer/kto.py:96-113 | applications/ColossalChat/coati/trainer/orpo.py:86-103 | applications/ColossalChat/coati/trainer/rm.py:84-101 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/trainer/kto.py\u0060 and \u0060applications/ColossalChat/coati/trainer/orpo.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 138 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/kto.py"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"95913c332aeebf81ce608cfc49c9178235f0228804709f1fdc380c4bbf5e3333"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 3): colossalai/shardformer/modeling/_bert_tf4.py:333-350 | colossalai/shardformer/modeling/_bert_tf5.py:346-363 | examples/community/roberta/pretraining/model/bert.py:1124-1141 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 45 separate duplicated blocks between them, totalling at least 882 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_bert_tf4.py:333\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/shardformer/modeling/_bert_tf4.py:332\u0060 calls \u0060is_last_stage\u0060 and \u0060examples/community/roberta/pretraining/model/bert.py:1122\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":333}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ff3e4a188f430a62a3a6488422bd05efd07f0fde3a143d2b927edb4bf00096c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): applications/ColossalChat/coati/trainer/dpo.py:209-226 | applications/ColossalChat/coati/trainer/dpo.py:502-519 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/coati/trainer/dpo.py:209\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060applications/ColossalChat/coati/trainer/dpo.py:520\u0060 calls \u0060all_reduce_mean\u0060 and \u0060applications/ColossalChat/coati/trainer/dpo.py:227\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/dpo.py"},"region":{"startLine":209}}}],"partialFingerprints":{"codehealthFindingId/v1":"671ba39b85152006e43832aa97c67319405ee50e0e336e5b0b6e3152f8b4c973"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): applications/ColossalEval/colossal_eval/dataset/agieval.py:249-266 | applications/ColossalEval/colossal_eval/dataset/gaokaobench.py:105-122 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/dataset/agieval.py"},"region":{"startLine":249}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ddc1a6a25ed0256050176b5733aae459b464fc3833c577915672b3613c8405b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): applications/ColossalEval/colossal_eval/dataset/safetybench_en.py:134-151 | applications/ColossalEval/colossal_eval/dataset/safetybench_zh.py:134-151 \u2014 before extracting anything, compare \u0060applications/ColossalEval/colossal_eval/dataset/safetybench_en.py\u0060 and \u0060applications/ColossalEval/colossal_eval/dataset/safetybench_zh.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/dataset/safetybench_en.py"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"53f4114da2245248c4bcc414dbf3d626f5e2366cc4e545b432eb2c27659012a1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): applications/ColossalEval/colossal_eval/models/chatglm.py:207-224 | applications/ColossalEval/colossal_eval/models/huggingface.py:485-502 \u2014 before extracting anything, compare \u0060applications/ColossalEval/colossal_eval/models/chatglm.py\u0060 and \u0060applications/ColossalEval/colossal_eval/models/huggingface.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalEval/colossal_eval/models/chatglm.py:207\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/models/chatglm.py"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e75dc87622e1672c29be4e44b532b17945005aca2d39aff5380116c51e56fcb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (2\u201318 lines \u00D7 5): applications/ColossalMoE/train.py:105-121 | colossalai/legacy/moe/openmoe/train.py:150-167 | examples/language/deepseek/benchmark.py:106-107 | examples/language/llama/benchmark.py:92-93 | examples/language/mixtral/benchmark.py:86-87 \u2014 before extracting anything, compare \u0060applications/ColossalMoE/train.py\u0060 and \u0060colossalai/legacy/moe/openmoe/train.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 125 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalMoE/train.py:105\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalMoE/train.py"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ae6504c3acfc25cec01cdcfbeb85945be1d4b8bc154fea447b944687355e750"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201318 lines \u00D7 2): colossalai/auto_parallel/checkpoint/ckpt_solver_base.py:131-145 | colossalai/auto_parallel/offload/region_manager.py:344-361 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/checkpoint/ckpt_solver_base.py"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"02641e073cfd7109c7fc1cf241b3496145de246f228a27e04390ad223fd5439a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201318 lines \u00D7 2): colossalai/auto_parallel/tensor_shard/node_handler/embedding_handler.py:75-92 | colossalai/auto_parallel/tensor_shard/node_handler/linear_handler.py:112-127 \u2014 before extracting anything, compare \u0060colossalai/auto_parallel/tensor_shard/node_handler/embedding_handler.py\u0060 and \u0060colossalai/auto_parallel/tensor_shard/node_handler/linear_handler.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 68 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/auto_parallel/tensor_shard/node_handler/embedding_handler.py:75\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/embedding_handler.py"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f36923cd3dacdba2dcbd58bed3931f245d4517e56b0f310a369a2d6b6f24d41"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py:408-425 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/embedding_generator.py:248-265 \u2014 before extracting anything, compare \u0060colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py\u0060 and \u0060colossalai/auto_parallel/tensor_shard/node_handler/strategy/embedding_generator.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 143 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py"},"region":{"startLine":408}}}],"partialFingerprints":{"codehealthFindingId/v1":"0daab893be0404c4489af44f28acdb7ec23d4c099f3e5d5ce4f630a2e1ad5671"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py:560-577 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/embedding_generator.py:281-298 \u2014 before extracting anything, compare \u0060colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py\u0060 and \u0060colossalai/auto_parallel/tensor_shard/node_handler/strategy/embedding_generator.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 143 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py"},"region":{"startLine":560}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1cb51fac8cd4f62f4cb4bddf785fc6cb173ba479cce7d789217fbb7e80808ff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): colossalai/booster/plugin/hybrid_parallel_plugin.py:1066-1083 | colossalai/booster/plugin/moe_hybrid_parallel_plugin.py:289-306 \u2014 before extracting anything, compare \u0060colossalai/booster/plugin/hybrid_parallel_plugin.py\u0060 and \u0060colossalai/booster/plugin/moe_hybrid_parallel_plugin.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 100 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060colossalai/booster/plugin/hybrid_parallel_plugin.py:1085\u0060 calls \u0060warning\u0060 and \u0060colossalai/booster/plugin/moe_hybrid_parallel_plugin.py:307\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/plugin/hybrid_parallel_plugin.py"},"region":{"startLine":1066}}}],"partialFingerprints":{"codehealthFindingId/v1":"b39914eb26926bf79f7bbc2f752908747392074359254f93cd23a9bdc3806c90"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py:312-329 | colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py:355-372 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py:312\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":312}}}],"partialFingerprints":{"codehealthFindingId/v1":"370751f0121b54c9c7940c9a285c6648287db1ec82a773e090f55499c0e66e3b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py:576-593 | colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py:632-649 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py:576\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":576}}}],"partialFingerprints":{"codehealthFindingId/v1":"637075f2aac1825d4de244cb4710b1f76a59d2e30d5b9ee6031a5025c452d55e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): colossalai/inference/modeling/models/nopadding_baichuan.py:185-202 | colossalai/inference/modeling/models/nopadding_llama.py:559-576 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/inference/modeling/models/nopadding_baichuan.py:185\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/modeling/models/nopadding_baichuan.py"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"787cb819e5cbdc1062418ed59c16f05c86d6061194f0f4950ffc9c8f3b4fd64e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): colossalai/legacy/amp/naive_amp/_utils.py:15-32 | colossalai/zero/low_level/_utils.py:162-179 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/amp/naive_amp/_utils.py"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"3dbb984ee0f596ecbdc8ad48d8004f36a5d92af54b2b0087506b0ef99b05f671"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201318 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_2d/_operation.py:428-443 | colossalai/legacy/nn/layer/parallel_2p5d/_operation.py:393-410 \u2014 \u0060colossalai/legacy/nn/layer/parallel_2d/_operation.py\u0060 and \u0060colossalai/legacy/nn/layer/parallel_2p5d/_operation.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 16 separate duplicated blocks between them, totalling at least 185 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2d/_operation.py"},"region":{"startLine":428}}}],"partialFingerprints":{"codehealthFindingId/v1":"52f117630d94e938225fe1f56c1b3bd08284af270cc6d37d377792f2d62bc6ee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_2d/layers.py:124-141 | colossalai/legacy/nn/layer/parallel_2d/layers.py:1117-1134 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2d/layers.py"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"31b71962a9255981541c4a61cb6c641d79f80d2ce2141320f4c27f344f376185"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_2d/layers.py:901-918 | colossalai/legacy/nn/layer/parallel_2p5d/layers.py:916-933 \u2014 \u0060colossalai/legacy/nn/layer/parallel_2d/layers.py\u0060 and \u0060colossalai/legacy/nn/layer/parallel_2p5d/layers.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 18 separate duplicated blocks between them, totalling at least 219 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2d/layers.py"},"region":{"startLine":901}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1c47c7aff9c2af94103d69bdc679503f7d3088bc65d85fad5cc12cb3eee4e17"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201318 lines \u00D7 2): colossalai/nn/optimizer/distributed_galore.py:113-120 | colossalai/nn/optimizer/distributed_lamb.py:73-90 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/distributed_galore.py"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d31a1aa4917ffd34f930c957391b080442223bf5c4b213f616ac9fcdd8332d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201318 lines \u00D7 2): colossalai/nn/optimizer/distributed_lamb.py:131-147 | colossalai/nn/optimizer/lamb.py:73-90 \u2014 before extracting anything, compare \u0060colossalai/nn/optimizer/distributed_lamb.py\u0060 and \u0060colossalai/nn/optimizer/lamb.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060colossalai/nn/optimizer/lamb.py:94\u0060 calls \u0060pow\u0060, \u0060sum\u0060, \u0060sqrt\u0060 and \u0060colossalai/nn/optimizer/distributed_lamb.py:151\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/distributed_lamb.py"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"385156578a57ac5a548ce3b8239671fb2911b7fb44518afe11a3d81cd8b42883"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): colossalai/pipeline/schedule/interleaved_pp.py:129-146 | colossalai/pipeline/schedule/zero_bubble_pp.py:221-238 \u2014 before extracting anything, compare \u0060colossalai/pipeline/schedule/interleaved_pp.py\u0060 and \u0060colossalai/pipeline/schedule/zero_bubble_pp.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 82 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/pipeline/schedule/interleaved_pp.py"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fadcb9611ec2a95a5c3b1367f28a0226ad72d89eb4b65069efd3aa949e58883"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): colossalai/shardformer/layer/qkv_fused_linear.py:290-307 | colossalai/shardformer/layer/qkv_fused_linear.py:885-902 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/qkv_fused_linear.py"},"region":{"startLine":290}}}],"partialFingerprints":{"codehealthFindingId/v1":"5879e475ecc34ea14cdacc40d6744261f7963d46b3fc1b7c017b5f6227190c4f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201318 lines \u00D7 2): colossalai/shardformer/modeling/_llama_tf4.py:112-128 | colossalai/shardformer/modeling/command.py:104-121 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_llama_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/command.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 210 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_llama_tf4.py"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"11ea9c88d88514a06725d1f90b6f28a2c54579c386c71e41b159581ef5c2f9fc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201318 lines \u00D7 2): colossalai/shardformer/modeling/bloom.py:243-260 | colossalai/shardformer/modeling/falcon.py:289-305 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/bloom.py\u0060 and \u0060colossalai/shardformer/modeling/falcon.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 594 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/bloom.py:243\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/bloom.py"},"region":{"startLine":243}}}],"partialFingerprints":{"codehealthFindingId/v1":"adc4d27b932393e6224ff59a2570050ffdb7684bdab4ecb387abbf3548f46012"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201318 lines \u00D7 2): colossalai/shardformer/modeling/gpt2.py:89-105 | colossalai/shardformer/modeling/gptj.py:53-70 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/gpt2.py\u0060 and \u0060colossalai/shardformer/modeling/gptj.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 321 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/gpt2.py"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"cff7d8954e716564bb6167f48f576b5d898ee053586de61d89e33fbe856e7116"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): colossalai/shardformer/policies/_bert_tf4.py:90-107 | colossalai/shardformer/policies/_bert_tf5.py:97-114 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 475 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/policies/_bert_tf4.py:90\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_bert_tf4.py"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"41eb9e4608987a5c12b080cb67093eb7fa1a9096df3437d07fd1ad547d61197d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): colossalai/tensor/shape_consistency.py:127-144 | colossalai/tensor/shape_consistency.py:321-338 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/tensor/shape_consistency.py:127\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/tensor/shape_consistency.py"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"45ba121f791324d7bc2d3a67a911a35d75142859af0529cc86f69f8a2f9cfc32"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 10): colossalai/shardformer/modeling/_bert_tf4.py:618-634 | colossalai/shardformer/modeling/_bert_tf4.py:694-710 | colossalai/shardformer/modeling/_bert_tf4.py:786-802 | colossalai/shardformer/modeling/_bert_tf4.py:878-893 | colossalai/shardformer/modeling/_bert_tf4.py:960-975 | colossalai/shardformer/modeling/_bert_tf5.py:631-647 | colossalai/shardformer/modeling/_bert_tf5.py:707-723 | colossalai/shardformer/modeling/_bert_tf5.py:799-815 | colossalai/shardformer/modeling/_bert_tf5.py:891-906 | colossalai/shardformer/modeling/_bert_tf5.py:973-988 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 45 separate duplicated blocks between them, totalling at least 882 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_bert_tf4.py:618\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":618}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b6e2ed29b9df1a66167d4cd13fbf788325b4ba911ea6608b2393178dc1d157a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 9): applications/Colossal-LLaMA/train.py:81-97 | applications/ColossalChat/examples/training_scripts/lora_finetune.py:77-93 | applications/ColossalChat/examples/training_scripts/train_dpo.py:56-72 | applications/ColossalChat/examples/training_scripts/train_grpo.py:190-206 | applications/ColossalChat/examples/training_scripts/train_kto.py:66-82 | applications/ColossalChat/examples/training_scripts/train_orpo.py:66-82 | applications/ColossalChat/examples/training_scripts/train_ppo.py:228-244 | applications/ColossalChat/examples/training_scripts/train_rm.py:94-110 | applications/ColossalChat/examples/training_scripts/train_sft.py:88-104 \u2014 before extracting anything, compare \u0060applications/Colossal-LLaMA/train.py\u0060 and \u0060applications/ColossalChat/examples/training_scripts/lora_finetune.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/Colossal-LLaMA/train.py:81\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060applications/Colossal-LLaMA/train.py:79\u0060 calls \u0060get_accelerator\u0060, \u0060is_available\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_kto.py:64\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/train.py"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f5073eadfedb67c88a5b2cd24972c56ebc32a9c82c32c15a5983e16a87dc1f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 9): colossalai/shardformer/modeling/_bert_tf4.py:991-1007 | colossalai/shardformer/modeling/_bert_tf5.py:1004-1020 | colossalai/shardformer/modeling/bloom.py:701-717 | colossalai/shardformer/modeling/falcon.py:717-733 | colossalai/shardformer/modeling/gpt2.py:596-612 | colossalai/shardformer/modeling/gptj.py:545-561 | colossalai/shardformer/modeling/opt.py:517-533 | examples/community/roberta/pretraining/model/bert.py:1863-1879 | examples/community/roberta/pretraining/model/deberta_v2.py:1511-1527 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 45 separate duplicated blocks between them, totalling at least 882 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_bert_tf4.py:991\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":991}}}],"partialFingerprints":{"codehealthFindingId/v1":"3536274d185e0004f8bb9600e5f8068721aedcc5b5962925a16860a03f81de36"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 9): colossalai/shardformer/policies/_llama_tf4.py:249-266 | colossalai/shardformer/policies/_llama_tf5.py:247-264 | colossalai/shardformer/policies/_mixtral_tf4.py:209-225 | colossalai/shardformer/policies/_mixtral_tf5.py:233-249 | colossalai/shardformer/policies/_qwen2_tf5.py:235-252 | colossalai/shardformer/policies/_qwen3_tf5.py:236-253 | colossalai/shardformer/policies/gptj.py:201-217 | colossalai/shardformer/policies/mistral.py:194-211 | colossalai/shardformer/policies/opt.py:206-222 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_llama_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_llama_tf5.py\u0060 as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 404 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/policies/_llama_tf4.py:249\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_llama_tf4.py"},"region":{"startLine":249}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6b9ecc3ef9ff081a11571275e11d44ffd34a81a5dcb5f86ffde41bb251b944b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201317 lines \u00D7 8): colossalai/shardformer/modeling/_mixtral_tf4.py:477-492 | colossalai/shardformer/modeling/_mixtral_tf5.py:843-858 | colossalai/shardformer/modeling/bloom.py:369-383 | colossalai/shardformer/modeling/bloom.py:588-603 | colossalai/shardformer/modeling/deepseek.py:538-553 | colossalai/shardformer/modeling/falcon.py:392-407 | colossalai/shardformer/modeling/falcon.py:605-621 | colossalai/shardformer/modeling/mistral.py:241-257 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_mixtral_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_mixtral_tf5.py\u0060 as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 581 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_mixtral_tf4.py:477\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_mixtral_tf4.py"},"region":{"startLine":477}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c7a8e822d7575e0c7597d52e25c116d1345db079b5caa2e97d246777841126b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 7): colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py:135-151 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py:195-211 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py:267-282 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/embedding_generator.py:114-130 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/embedding_generator.py:168-184 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/matmul_strategy_generator.py:339-354 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/matmul_strategy_generator.py:418-433 \u2014 before extracting anything, compare \u0060colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py\u0060 and \u0060colossalai/auto_parallel/tensor_shard/node_handler/strategy/embedding_generator.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 143 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"797ab5dd82672c5fba581b7d886fe454ecbc840f24bac233910a9d0ce47f3379"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 7): colossalai/shardformer/layer/_operation.py:136-152 | colossalai/shardformer/layer/_operation.py:219-235 | colossalai/shardformer/layer/_operation.py:307-323 | colossalai/shardformer/layer/_operation.py:386-402 | colossalai/shardformer/layer/_operation.py:614-630 | colossalai/shardformer/layer/_operation.py:789-805 | colossalai/shardformer/layer/_operation.py:950-966 \u2014 all 7 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/layer/_operation.py:136\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/_operation.py"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"61d59a9739ad289df83f68160ebdbbdf267a8ed40243832a8e67ed00d2777df0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201317 lines \u00D7 7): colossalai/shardformer/modeling/_bert_tf4.py:698-714 | colossalai/shardformer/modeling/_bert_tf4.py:790-806 | colossalai/shardformer/modeling/_bert_tf4.py:882-896 | colossalai/shardformer/modeling/_bert_tf5.py:711-727 | colossalai/shardformer/modeling/_bert_tf5.py:803-819 | colossalai/shardformer/modeling/_bert_tf5.py:895-909 | colossalai/shardformer/modeling/t5.py:638-653 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 45 separate duplicated blocks between them, totalling at least 882 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_bert_tf4.py:698\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060colossalai/shardformer/modeling/_bert_tf4.py:897\u0060 calls \u0060view\u0060 and \u0060colossalai/shardformer/modeling/_bert_tf4.py:716\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":698}}}],"partialFingerprints":{"codehealthFindingId/v1":"efc187c09244eecc7513c875c618c0c2a3b0fb1877760f5e3bead7095747a3af"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 5): colossalai/shardformer/layer/linear.py:243-258 | colossalai/shardformer/layer/linear.py:438-454 | colossalai/shardformer/layer/qkv_fused_linear.py:259-275 | colossalai/shardformer/layer/qkv_fused_linear.py:854-870 | colossalai/shardformer/layer/qkv_fused_linear.py:1062-1078 \u2014 before extracting anything, compare \u0060colossalai/shardformer/layer/linear.py\u0060 and \u0060colossalai/shardformer/layer/qkv_fused_linear.py\u0060 as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 261 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/shardformer/layer/linear.py:434\u0060 calls \u0060get_world_size\u0060 and \u0060colossalai/shardformer/layer/linear.py:239\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/linear.py"},"region":{"startLine":243}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a4b6123565428b3bb6a1ff16145c0cc43cb6d64befb366f9068bd77f2bd362b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 3): applications/ColossalMoE/train.py:68-83 | colossalai/legacy/moe/openmoe/train.py:101-116 | examples/images/vit/args.py:22-38 \u2014 before extracting anything, compare \u0060applications/ColossalMoE/train.py\u0060 and \u0060colossalai/legacy/moe/openmoe/train.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 125 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalMoE/train.py:68\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060examples/images/vit/args.py:21\u0060 calls \u0060add_argument\u0060 and \u0060applications/ColossalMoE/train.py:68\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalMoE/train.py"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"12c1ac8b792816e5997c1310545d673894425a76d8aed38ef5c5f47fdd9ba7a3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201317 lines \u00D7 3): colossalai/auto_parallel/tensor_shard/node_handler/strategy/matmul_strategy_generator.py:846-860 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/matmul_strategy_generator.py:888-902 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/matmul_strategy_generator.py:929-945 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/auto_parallel/tensor_shard/node_handler/strategy/matmul_strategy_generator.py:846\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/matmul_strategy_generator.py"},"region":{"startLine":846}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b4501e386548555dd04a697b4b44be29890a80e80bb166f0d822462e831ae71"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 3): colossalai/auto_parallel/tensor_shard/node_handler/strategy/reshape_generator.py:136-152 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/reshape_generator.py:295-311 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/reshape_generator.py:366-381 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/reshape_generator.py"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"49adec0cc20fd192c6f5839b4e09c30834ed5370f3dc32a69b40bcbeebb357a4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 3): colossalai/kernel/triton/context_attn_unpad.py:627-643 | colossalai/kernel/triton/context_attn_unpad.py:667-683 | colossalai/kernel/triton/context_attn_unpad.py:703-719 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/context_attn_unpad.py"},"region":{"startLine":627}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e97d6e363e941eb7dd8e801dacd3024a2ac61ab54a1a8f482124cc2a0c216ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 3): colossalai/legacy/inference/hybridengine/modeling/llama.py:444-460 | colossalai/legacy/inference/tensor_parallel/modeling/chatglm2.py:496-512 | colossalai/legacy/inference/tensor_parallel/modeling/llama.py:364-380 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/inference/hybridengine/modeling/llama.py:444\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/hybridengine/modeling/llama.py"},"region":{"startLine":444}}}],"partialFingerprints":{"codehealthFindingId/v1":"5dc8f099f8676702acc15af687acaa3cc8044817639f6ed86ee0615c665f7d81"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 3): colossalai/legacy/nn/layer/parallel_2p5d/_operation.py:258-274 | colossalai/legacy/nn/layer/parallel_2p5d/_operation.py:423-439 | colossalai/legacy/nn/layer/parallel_2p5d/_operation.py:586-602 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2p5d/_operation.py"},"region":{"startLine":258}}}],"partialFingerprints":{"codehealthFindingId/v1":"8dc5452a9bdb6d9052907d57e5485f3e53d1964085c507bea53a2d786892b6b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 3): colossalai/legacy/nn/parallel/layers/cache_embedding/cached_embedding.py:117-133 | colossalai/legacy/nn/parallel/layers/cache_embedding/parallel_cached_embedding.py:107-122 | colossalai/legacy/nn/parallel/layers/cache_embedding/parallel_cached_embedding_tablewise.py:122-137 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/parallel/layers/cache_embedding/cached_embedding.py"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"374cb55f8059db56d043db1e29f808ca335b03b666b78e49176579d887c8f2ff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 3): colossalai/shardformer/policies/_qwen2_tf4.py:236-253 | colossalai/shardformer/policies/_qwen3_tf4.py:236-253 | colossalai/shardformer/policies/command.py:256-272 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_qwen2_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_qwen3_tf4.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 286 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/policies/_qwen2_tf4.py:236\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_qwen2_tf4.py"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"03fa56bdd2c19f5c4146c35b289ab1f60f7917cf77e458c137febaa959a7c3e9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 3): colossalai/shardformer/policies/bloom.py:283-298 | colossalai/shardformer/policies/falcon.py:223-238 | colossalai/shardformer/policies/gptj.py:301-317 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/bloom.py\u0060 and \u0060colossalai/shardformer/policies/falcon.py\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/bloom.py"},"region":{"startLine":283}}}],"partialFingerprints":{"codehealthFindingId/v1":"4222e747ab35e5d214909d74b6b516fb0571d684a0419264c606733f592aaa79"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): applications/ColossalChat/coati/distributed/consumer.py:73-89 | applications/ColossalChat/coati/distributed/zero_bubble/consumer.py:72-88 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/distributed/consumer.py\u0060 and \u0060applications/ColossalChat/coati/distributed/zero_bubble/consumer.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/coati/distributed/consumer.py:73\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060applications/ColossalChat/coati/distributed/consumer.py:71\u0060 calls \u0060DistCoordinator\u0060 and \u0060applications/ColossalChat/coati/distributed/zero_bubble/consumer.py:70\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/consumer.py"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"8390376b6a66353468d3d8682ae529c75f137bbe23a5cf09d240d6c50d24d6a1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 2): applications/ColossalChat/coati/trainer/dpo.py:366-382 | applications/ColossalChat/coati/trainer/orpo.py:196-211 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/trainer/dpo.py\u0060 and \u0060applications/ColossalChat/coati/trainer/orpo.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 133 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/coati/trainer/dpo.py:366\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/dpo.py"},"region":{"startLine":366}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8690e4ecbb2f41af9d6944de2c05aecd67393f457896c2c8ebe5720847d165c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 2): applications/ColossalChat/coati/trainer/sft.py:104-120 | applications/ColossalChat/coati/trainer/sft.py:192-207 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/coati/trainer/sft.py:104\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/sft.py"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"546ba2f5d00d316ee6d866dd438197d2dc615c79baa52ef693937aa041562e28"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): applications/ColossalEval/colossal_eval/evaluate/dataset_evaluator/dataset_evaluator.py:60-76 | applications/ColossalEval/colossal_eval/evaluate/dataset_evaluator/dataset_evaluator.py:107-123 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/evaluate/dataset_evaluator/dataset_evaluator.py"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8ea8cbed33ceef934878d5a3309e367519066531603c9efe51420ed2abb0cc3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201317 lines \u00D7 2): colossalai/auto_parallel/tensor_shard/node_handler/embedding_handler.py:143-159 | colossalai/auto_parallel/tensor_shard/node_handler/linear_handler.py:186-196 \u2014 before extracting anything, compare \u0060colossalai/auto_parallel/tensor_shard/node_handler/embedding_handler.py\u0060 and \u0060colossalai/auto_parallel/tensor_shard/node_handler/linear_handler.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 68 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/auto_parallel/tensor_shard/node_handler/embedding_handler.py:143\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/embedding_handler.py"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"7af1b1ef8a7979b6b52f2f60a06276f2e173f078710598db9f99eb8f322b1dff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201317 lines \u00D7 2): colossalai/auto_parallel/tensor_shard/node_handler/embedding_handler.py:210-226 | colossalai/auto_parallel/tensor_shard/node_handler/linear_handler.py:260-270 \u2014 before extracting anything, compare \u0060colossalai/auto_parallel/tensor_shard/node_handler/embedding_handler.py\u0060 and \u0060colossalai/auto_parallel/tensor_shard/node_handler/linear_handler.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 68 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/auto_parallel/tensor_shard/node_handler/embedding_handler.py:210\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/embedding_handler.py"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"88b7e9b1842a322eb3a4471ce2da7a9ced1e2c7f734cac3067012fe465d56693"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201317 lines \u00D7 2): colossalai/auto_parallel/tensor_shard/node_handler/permute_handler.py:61-75 | colossalai/auto_parallel/tensor_shard/node_handler/transpose_handler.py:48-64 \u2014 before extracting anything, compare \u0060colossalai/auto_parallel/tensor_shard/node_handler/permute_handler.py\u0060 and \u0060colossalai/auto_parallel/tensor_shard/node_handler/transpose_handler.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/permute_handler.py"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"da8787198b3282bf380bc5ed3542cd7d2bdd885463849b78d04f134ad48cc0d6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py:181-197 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py:450-469 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py:181\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3683a9b4e921a7994e6ca7bafc0ae5f7b84960c764c531b4ea09ae79c94b325"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): colossalai/inference/modeling/models/glide_llama.py:84-100 | colossalai/legacy/moe/openmoe/model/modeling_openmoe.py:908-924 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/inference/modeling/models/glide_llama.py:84\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/modeling/models/glide_llama.py"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"e134a0c71751a70e45754abcb21b2b4b93af9d7173ad4cad700bfbe378775b93"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): colossalai/kernel/triton/flash_decoding.py:473-489 | colossalai/kernel/triton/no_pad_rotary_embedding.py:548-564 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/flash_decoding.py"},"region":{"startLine":473}}}],"partialFingerprints":{"codehealthFindingId/v1":"30edb895228e518d139d7e723af566b3e7a93c5f1d679abc3bf4a67f3ba9af0c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): colossalai/legacy/inference/hybridengine/modeling/llama.py:236-252 | colossalai/legacy/inference/tensor_parallel/modeling/llama.py:145-161 \u2014 before extracting anything, compare \u0060colossalai/legacy/inference/hybridengine/modeling/llama.py\u0060 and \u0060colossalai/legacy/inference/tensor_parallel/modeling/llama.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 250 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/hybridengine/modeling/llama.py"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"216c4d057d39a7b1d73c411f8865d512a450c0ff4ee610aad8f74cd868e3dc17"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): colossalai/legacy/inference/hybridengine/modeling/llama.py:473-489 | colossalai/legacy/inference/tensor_parallel/modeling/llama.py:393-409 \u2014 before extracting anything, compare \u0060colossalai/legacy/inference/hybridengine/modeling/llama.py\u0060 and \u0060colossalai/legacy/inference/tensor_parallel/modeling/llama.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 250 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/hybridengine/modeling/llama.py"},"region":{"startLine":473}}}],"partialFingerprints":{"codehealthFindingId/v1":"f22a235adf06ea319f59e15d7d7941c2428404fdbe25c1dc737d0e1079b2be6a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): colossalai/legacy/inference/tensor_parallel/modeling/bloom.py:161-177 | colossalai/legacy/inference/tensor_parallel/modeling/llama.py:163-179 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/tensor_parallel/modeling/bloom.py"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"389e546fef120b49d665c21864b7b6cfdc50a802d16e71a8722dcc4ff1ffe1b6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_2d/_operation.py:319-334 | colossalai/legacy/nn/layer/parallel_2d/_operation.py:633-649 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2d/_operation.py"},"region":{"startLine":319}}}],"partialFingerprints":{"codehealthFindingId/v1":"b13a8dbc020178c1b249f7c58c80e2af9ac0574204a238e90a2f8f0b40096cd3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_2p5d/_operation.py:279-295 | colossalai/legacy/nn/layer/parallel_2p5d/_operation.py:607-623 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2p5d/_operation.py"},"region":{"startLine":279}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9d282455ea7f9917f84aa70554734f29b8c6159e9678e8dfb105771d9d9e386"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): colossalai/nn/optimizer/fused_adam.py:120-136 | colossalai/nn/optimizer/fused_lamb.py:157-173 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/fused_adam.py"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"b992ee90b10c44b3f0d0793afe9a2ab6e3ba2d6b881714bdb2951a1e9530a589"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): colossalai/shardformer/layer/qkv_fused_linear.py:277-293 | colossalai/shardformer/layer/qkv_fused_linear.py:1080-1096 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/layer/qkv_fused_linear.py:277\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/qkv_fused_linear.py"},"region":{"startLine":277}}}],"partialFingerprints":{"codehealthFindingId/v1":"690bb735cff2e52093d52d3926e59fe186d9f097867413128a1ba5a73b02051c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): colossalai/shardformer/modeling/_bert_tf4.py:248-264 | colossalai/shardformer/modeling/_bert_tf5.py:259-275 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 45 separate duplicated blocks between them, totalling at least 882 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":248}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfe881f49d933b8dc0f39900999077869b346df49356a4588367124c898ecfa8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): colossalai/shardformer/modeling/_llama_tf4.py:500-516 | colossalai/shardformer/modeling/_llama_tf5.py:544-560 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_llama_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_llama_tf5.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 483 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_llama_tf4.py:500\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060colossalai/shardformer/modeling/_llama_tf5.py:563\u0060 calls \u0060getattr\u0060 and \u0060colossalai/shardformer/modeling/_llama_tf4.py:518\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_llama_tf4.py"},"region":{"startLine":500}}}],"partialFingerprints":{"codehealthFindingId/v1":"78341965cabd80be0ed4e79276f384535f6e47cdb2a9ac8dd30aa21803859575"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): colossalai/shardformer/modeling/_mixtral_tf4.py:788-804 | colossalai/shardformer/modeling/deepseek.py:798-814 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_mixtral_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/deepseek.py\u0060 as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 427 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_mixtral_tf4.py:788\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_mixtral_tf4.py"},"region":{"startLine":788}}}],"partialFingerprints":{"codehealthFindingId/v1":"e633f5c20e30169091f379956e29923f0f0546b6895b01e486ca8c52455dc0c9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): colossalai/shardformer/modeling/_qwen2_tf5.py:446-462 | colossalai/shardformer/modeling/_qwen3_tf5.py:447-463 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_qwen2_tf5.py\u0060 and \u0060colossalai/shardformer/modeling/_qwen3_tf5.py\u0060 as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 628 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen2_tf5.py"},"region":{"startLine":446}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ca21a4f42ee3f45235fb95a30a73f173d046845d8579f9ca57c06deabdad2da"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 2): colossalai/shardformer/modeling/bloom.py:394-409 | colossalai/shardformer/modeling/falcon.py:434-450 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/bloom.py\u0060 and \u0060colossalai/shardformer/modeling/falcon.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 594 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/bloom.py:394\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/bloom.py"},"region":{"startLine":394}}}],"partialFingerprints":{"codehealthFindingId/v1":"daf5c81bcaf437f3a2498f8c6a0c567e6f12d35cedfcae7d6e837881b04a7c73"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 2): colossalai/shardformer/modeling/chatglm2.py:354-370 | colossalai/shardformer/modeling/chatglm2.py:656-671 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/chatglm2.py:354\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/chatglm2.py"},"region":{"startLine":354}}}],"partialFingerprints":{"codehealthFindingId/v1":"6da8fd52205905f103d11c5139dab9234aeff76e68d94178531350254b8bbf7a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201317 lines \u00D7 2): colossalai/shardformer/modeling/command.py:498-511 | colossalai/shardformer/modeling/deepseek.py:784-800 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/command.py\u0060 and \u0060colossalai/shardformer/modeling/deepseek.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/deepseek.py:784\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060colossalai/shardformer/modeling/command.py:514\u0060 calls \u0060rotary_emb\u0060 and \u0060colossalai/shardformer/modeling/deepseek.py:802\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/command.py"},"region":{"startLine":498}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba537741eec857f7c23502e52b48848d1f183918b92e0bff15cdb2c0b7d8e511"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): colossalai/shardformer/policies/_vit_tf4.py:309-325 | colossalai/shardformer/policies/_vit_tf5.py:159-175 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_vit_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_vit_tf5.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 133 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_vit_tf4.py"},"region":{"startLine":309}}}],"partialFingerprints":{"codehealthFindingId/v1":"83d1bb37e06c10402d73691fb8377b24a23287ddd54ec7628234792b0cb718a1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): colossalai/tensor/d_tensor/layout_converter.py:111-127 | colossalai/tensor/shape_consistency.py:106-122 \u2014 before extracting anything, compare \u0060colossalai/tensor/d_tensor/layout_converter.py\u0060 and \u0060colossalai/tensor/shape_consistency.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/tensor/d_tensor/layout_converter.py:111\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/tensor/d_tensor/layout_converter.py"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7ad17f7b3d41ea6ce7b991c70c04526ea54472ec341c44aa78c490a1e56a11a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201316 lines \u00D7 10): colossalai/shardformer/policies/_llama_tf4.py:334-348 | colossalai/shardformer/policies/_llama_tf5.py:332-346 | colossalai/shardformer/policies/_mixtral_tf4.py:311-325 | colossalai/shardformer/policies/_mixtral_tf5.py:338-352 | colossalai/shardformer/policies/_qwen2_tf4.py:344-359 | colossalai/shardformer/policies/_qwen2_tf5.py:343-358 | colossalai/shardformer/policies/_qwen3_tf4.py:344-359 | colossalai/shardformer/policies/_qwen3_tf5.py:364-379 | colossalai/shardformer/policies/command.py:312-326 | colossalai/shardformer/policies/mistral.py:295-309 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_llama_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_llama_tf5.py\u0060 as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 404 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_llama_tf4.py"},"region":{"startLine":334}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5fd06b30bbfd65b3cb0d7398a6b39a35e8425c40e7427e472cd3a6226816173"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 6): colossalai/shardformer/modeling/_bert_tf4.py:510-525 | colossalai/shardformer/modeling/_bert_tf5.py:523-538 | colossalai/shardformer/modeling/gpt2.py:473-488 | colossalai/shardformer/modeling/gpt2.py:650-665 | colossalai/shardformer/modeling/gpt2.py:735-750 | colossalai/shardformer/modeling/gptj.py:398-413 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 45 separate duplicated blocks between them, totalling at least 882 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_bert_tf4.py:510\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":510}}}],"partialFingerprints":{"codehealthFindingId/v1":"7907b368926e3fad3f156b655f5c5e6c2955858ee260b2ef0e09c64f72fd118e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 6): colossalai/shardformer/modeling/bloom.py:366-381 | colossalai/shardformer/modeling/bloom.py:459-474 | colossalai/shardformer/modeling/bloom.py:585-600 | colossalai/shardformer/modeling/falcon.py:389-405 | colossalai/shardformer/modeling/falcon.py:488-504 | colossalai/shardformer/modeling/falcon.py:602-618 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/bloom.py\u0060 and \u0060colossalai/shardformer/modeling/falcon.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 594 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/bloom.py:366\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/bloom.py"},"region":{"startLine":366}}}],"partialFingerprints":{"codehealthFindingId/v1":"9dd7653b2a591e2a5ceb7df827c422f5d47b763bea998ef83f0e9938f1412c8f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201316 lines \u00D7 5): colossalai/inference/modeling/layers/baichuan_tp_linear.py:29-43 | colossalai/shardformer/layer/linear.py:295-309 | colossalai/shardformer/layer/linear.py:491-506 | colossalai/shardformer/layer/qkv_fused_linear.py:329-344 | colossalai/shardformer/layer/qkv_fused_linear.py:528-543 \u2014 before extracting anything, compare \u0060colossalai/shardformer/layer/linear.py\u0060 and \u0060colossalai/shardformer/layer/qkv_fused_linear.py\u0060 as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 261 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: \u0060ParallelModule\u0060 names \u0060.parallel_module\u0060 in one and \u0060colossalai.shardformer.layer.parallel_module\u0060 in another \u2014 different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/modeling/layers/baichuan_tp_linear.py"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"c59cd06751d8d843df48a997e85ff83d865f857819faa15c47dc4a5e92efc828"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (4\u201316 lines \u00D7 6): colossalai/shardformer/modeling/_llama_tf4.py:536-550 | colossalai/shardformer/modeling/_llama_tf5.py:580-583 | colossalai/shardformer/modeling/_mixtral_tf4.py:588-603 | colossalai/shardformer/modeling/_qwen2_tf4.py:518-531 | colossalai/shardformer/modeling/_qwen3_tf4.py:504-517 | colossalai/shardformer/modeling/mistral.py:523-536 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_llama_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_llama_tf5.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 483 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_llama_tf4.py"},"region":{"startLine":536}}}],"partialFingerprints":{"codehealthFindingId/v1":"e77b01fba6f22eaa59bed472c369299086e874b9a6a3f05a2e1c35f8dd9210ee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201316 lines \u00D7 5): colossalai/shardformer/modeling/_qwen2_tf4.py:495-508 | colossalai/shardformer/modeling/_qwen2_tf5.py:393-406 | colossalai/shardformer/modeling/_qwen3_tf4.py:481-494 | colossalai/shardformer/modeling/_qwen3_tf5.py:394-407 | colossalai/shardformer/modeling/command.py:360-375 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_qwen2_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_qwen2_tf5.py\u0060 as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 242 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen2_tf4.py"},"region":{"startLine":495}}}],"partialFingerprints":{"codehealthFindingId/v1":"77e97dfb8371fab36a9d32d59da7efde5b870af23632d76f7c42b597d06c7013"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 4): colossalai/kernel/triton/context_attn_unpad.py:80-95 | colossalai/kernel/triton/context_attn_unpad.py:258-273 | colossalai/kernel/triton/context_attn_unpad.py:435-450 | colossalai/kernel/triton/flash_decoding.py:201-216 \u2014 there are 4 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/kernel/triton/context_attn_unpad.py:80\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/context_attn_unpad.py"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"36c8cf7fa75bf0f1652e54420edf6b92e3109a47b568a36f393817b9cf7f4f84"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201316 lines \u00D7 4): colossalai/legacy/nn/layer/parallel_2d/_operation.py:110-125 | colossalai/legacy/nn/layer/parallel_2d/_operation.py:300-314 | colossalai/legacy/nn/layer/parallel_2d/_operation.py:456-471 | colossalai/legacy/nn/layer/parallel_2d/_operation.py:613-628 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2d/_operation.py"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3dd8ffcff2a3a5fcacf9875401dd912e74a34482aeac7ac90b9f34935dfcc5e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201316 lines \u00D7 4): colossalai/shardformer/modeling/_bert_tf4.py:813-825 | colossalai/shardformer/modeling/_bert_tf5.py:826-838 | colossalai/shardformer/modeling/bloom.py:615-629 | colossalai/shardformer/modeling/falcon.py:631-646 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 45 separate duplicated blocks between them, totalling at least 882 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/bloom.py:615\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":813}}}],"partialFingerprints":{"codehealthFindingId/v1":"d892f16f15c90890b529e5be3f13a4e7a21d098868ea2f3e67046d8b0925d4bd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 4): colossalai/shardformer/modeling/_bert_tf4.py:895-910 | colossalai/shardformer/modeling/_bert_tf5.py:908-923 | examples/community/roberta/pretraining/model/bert.py:1672-1687 | examples/community/roberta/pretraining/model/deberta_v2.py:1615-1630 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 45 separate duplicated blocks between them, totalling at least 882 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_bert_tf4.py:895\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/shardformer/modeling/_bert_tf4.py:893\u0060 calls \u0060is_last_stage\u0060 and \u0060examples/community/roberta/pretraining/model/bert.py:1668\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":895}}}],"partialFingerprints":{"codehealthFindingId/v1":"3249937150cbb8aa04e45bf5f2e3eb3b89289070d06bab9b51e9fa0b462e914a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 3): applications/ColossalChat/coati/trainer/dpo.py:427-442 | applications/ColossalChat/coati/trainer/dpo.py:553-568 | applications/ColossalChat/coati/trainer/orpo.py:261-276 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/trainer/dpo.py\u0060 and \u0060applications/ColossalChat/coati/trainer/orpo.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 133 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060applications/ColossalChat/coati/trainer/orpo.py:257\u0060 calls \u0060reset\u0060 and \u0060applications/ColossalChat/coati/trainer/dpo.py:550\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/dpo.py"},"region":{"startLine":427}}}],"partialFingerprints":{"codehealthFindingId/v1":"30d057305d1cdd7af531f62a4b0a553cfef833082f65773b89adb9add3447581"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 3): colossalai/legacy/inference/quant/smoothquant/models/linear.py:19-34 | colossalai/legacy/inference/quant/smoothquant/models/linear.py:69-84 | colossalai/legacy/inference/quant/smoothquant/models/linear.py:125-140 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/inference/quant/smoothquant/models/linear.py:19\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/quant/smoothquant/models/linear.py"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"58c3b66c0f4919e88e0fc0de0e25fe5c3e00914b8e5bd4ff6333fd14aa3450b9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 3): colossalai/legacy/nn/layer/parallel_2d/layers.py:149-164 | colossalai/legacy/nn/layer/parallel_2d/layers.py:313-328 | colossalai/legacy/nn/layer/parallel_2d/layers.py:1144-1159 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/nn/layer/parallel_2d/layers.py:149\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2d/layers.py"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9ac4e02ce6ed0ef6dad658d0af6c68f5b2fb790b595d6268bec117800f7c9bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201316 lines \u00D7 3): colossalai/nn/optimizer/distributed_came.py:368-381 | colossalai/nn/optimizer/distributed_came.py:391-404 | colossalai/nn/optimizer/distributed_came.py:414-429 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/distributed_came.py"},"region":{"startLine":368}}}],"partialFingerprints":{"codehealthFindingId/v1":"639eb0fb9f1750897abc7e6e6fc34eea2dd9d10fecf4744065f1e5c49f979a59"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201316 lines \u00D7 3): colossalai/shardformer/modeling/_bert_tf4.py:635-649 | colossalai/shardformer/modeling/_bert_tf5.py:648-662 | examples/community/roberta/pretraining/model/bert.py:1473-1488 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 45 separate duplicated blocks between them, totalling at least 882 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_bert_tf4.py:635\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/shardformer/modeling/_bert_tf4.py:634\u0060 calls \u0060is_last_stage\u0060 and \u0060examples/community/roberta/pretraining/model/bert.py:1471\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":635}}}],"partialFingerprints":{"codehealthFindingId/v1":"46fde7b274fa722f11f3345e73cacf2a40bd2441dc1be4958283f328dd150a47"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 3): colossalai/shardformer/modeling/_llama_tf4.py:335-350 | colossalai/shardformer/modeling/_llama_tf5.py:377-392 | colossalai/shardformer/modeling/gpt2.py:381-396 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_llama_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_llama_tf5.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 483 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_llama_tf4.py:335\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_llama_tf4.py"},"region":{"startLine":335}}}],"partialFingerprints":{"codehealthFindingId/v1":"7725c1a1c86bdf15edfe4fc171c9fcfb8ddf9d039f833cef6d39a018a358043a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 3): colossalai/shardformer/modeling/_qwen2_tf4.py:178-193 | colossalai/shardformer/modeling/_qwen3_tf4.py:176-191 | colossalai/shardformer/modeling/command.py:162-177 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_qwen2_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_qwen3_tf4.py\u0060 as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1214 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_qwen2_tf4.py:178\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen2_tf4.py"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"379f96b71a60c32a77dcf72e4046a645f6af9bf904abdde708b784f41da7e998"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 3): colossalai/shardformer/modeling/t5.py:328-343 | colossalai/shardformer/modeling/t5.py:469-484 | colossalai/shardformer/modeling/t5.py:589-604 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/t5.py"},"region":{"startLine":328}}}],"partialFingerprints":{"codehealthFindingId/v1":"71c70dd314551b091685df3ed3bff7ad09376e6c2419bd04a607ff5df5eb9196"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): applications/ColossalEval/colossal_eval/dataset/ceval.py:103-118 | applications/ColossalEval/colossal_eval/dataset/cmmlu.py:114-129 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/dataset/ceval.py"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ff91225c2e85f13c221b61bbdb7267ccdf4c4e0a14a2e5e8f6864adddc7d93f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): applications/ColossalEval/colossal_eval/dataset/cmmlu.py:129-144 | applications/ColossalEval/colossal_eval/dataset/mmlu.py:58-73 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060applications/ColossalEval/colossal_eval/dataset/cmmlu.py:128\u0060 calls \u0060next\u0060 and \u0060applications/ColossalEval/colossal_eval/dataset/mmlu.py:57\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/dataset/cmmlu.py"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a31e02a4f673ace450de52f94c6682fa5e24165836a4de1ee1e3dbcb3235bab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201316 lines \u00D7 2): applications/ColossalQA/colossalqa/retrieval_conversation_en.py:24-38 | applications/ColossalQA/colossalqa/retrieval_conversation_zh.py:24-39 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalQA/colossalqa/retrieval_conversation_en.py:24\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalQA/colossalqa/retrieval_conversation_en.py"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"751d53e5d9528f1ce921aa79435e65bff7fc1bf617ada54d8a2f7ded09808aa1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): colossalai/auto_parallel/tensor_shard/node_handler/addmm_handler.py:76-91 | colossalai/auto_parallel/tensor_shard/node_handler/bmm_handler.py:95-110 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/addmm_handler.py"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"2758d0b8f7b73d99421b84b618523a8a4fe13c4b46c22fa65dc56a25fa3d5c24"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201316 lines \u00D7 2): colossalai/auto_parallel/tensor_shard/node_handler/conv_handler.py:107-119 | colossalai/auto_parallel/tensor_shard/node_handler/linear_handler.py:268-283 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/auto_parallel/tensor_shard/node_handler/linear_handler.py:268\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/conv_handler.py"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"d97f8768a6defa7deb56191d0a31185ae725ee08841f78d5d272c721a307ca17"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201316 lines \u00D7 2): colossalai/auto_parallel/tensor_shard/node_handler/embedding_handler.py:195-209 | colossalai/auto_parallel/tensor_shard/node_handler/linear_handler.py:242-257 \u2014 before extracting anything, compare \u0060colossalai/auto_parallel/tensor_shard/node_handler/embedding_handler.py\u0060 and \u0060colossalai/auto_parallel/tensor_shard/node_handler/linear_handler.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 68 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/auto_parallel/tensor_shard/node_handler/embedding_handler.py:195\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/embedding_handler.py"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"4565e49c9e6b269aa5f15468b5a6c77228c3e669fbaca008ef8b7ed821be59f9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): colossalai/auto_parallel/tensor_shard/node_handler/strategy/getattr_generator.py:29-44 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/placeholder_generator.py:35-50 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/getattr_generator.py"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"949678d07dfcd594b0f86cb35527d7842f1ee728b494c2dba1cd9adb9e914d9c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): colossalai/auto_parallel/tensor_shard/node_handler/strategy/matmul_strategy_generator.py:162-177 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/matmul_strategy_generator.py:180-195 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/matmul_strategy_generator.py"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"c40ebc98c6eb0971fd3cb29ddc2cdd3388a0ad30d6b7ad1a0c584f7fdff3fe90"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201316 lines \u00D7 2): colossalai/legacy/inference/quant/smoothquant/models/llama.py:622-635 | colossalai/legacy/moe/openmoe/model/modeling_openmoe.py:742-757 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/quant/smoothquant/models/llama.py"},"region":{"startLine":622}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd24837ffb27b0fd65f18d63cabd8191cc96f9a198b58d5a7e180ef1b1e40a4a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): colossalai/legacy/inference/tensor_parallel/modeling/bloom.py:86-101 | colossalai/shardformer/modeling/bloom.py:129-144 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/tensor_parallel/modeling/bloom.py"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"e56f524bf728b691b8732f7ba3683ca1f749d9889e6ffdd522e4ddfd91e059e1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201316 lines \u00D7 2): colossalai/legacy/inference/tensor_parallel/modeling/chatglm2.py:72-87 | colossalai/shardformer/modeling/chatglm2_6b/modeling_chatglm.py:799-813 \u2014 before extracting anything, compare \u0060colossalai/legacy/inference/tensor_parallel/modeling/chatglm2.py\u0060 and \u0060colossalai/shardformer/modeling/chatglm2_6b/modeling_chatglm.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 176 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/tensor_parallel/modeling/chatglm2.py"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"e45f05410e937bb88d62bdb9eb5f8342902d6a8b36d8c0f587d8a3c90bcda0c1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): colossalai/legacy/initialize.py:188-203 | colossalai/legacy/initialize.py:224-239 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/initialize.py"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7454e8145e9f8556bb71d5748068a6f2f297d167edcf297639c0059b693f268"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_1d/layers.py:528-543 | colossalai/legacy/nn/layer/parallel_1d/layers.py:671-686 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/nn/layer/parallel_1d/layers.py:528\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_1d/layers.py"},"region":{"startLine":528}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9a4977f125c93c4daabf579139a9c7343dd5b572e2125a48c4d0290ffecb276"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201316 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_2d/_operation.py:288-302 | colossalai/legacy/nn/layer/parallel_2p5d/_operation.py:245-260 \u2014 \u0060colossalai/legacy/nn/layer/parallel_2d/_operation.py\u0060 and \u0060colossalai/legacy/nn/layer/parallel_2p5d/_operation.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 16 separate duplicated blocks between them, totalling at least 185 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2d/_operation.py"},"region":{"startLine":288}}}],"partialFingerprints":{"codehealthFindingId/v1":"535f1830fbebcaa6cef701e3307600f0ceb3e34a99836b05e611e6c9d000e0ba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_2p5d/layers.py:188-203 | colossalai/legacy/nn/layer/parallel_2p5d/layers.py:1160-1175 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/nn/layer/parallel_2p5d/layers.py:188\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2p5d/layers.py"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"11d426ff3b79a9f3aa64d2fd421ae4b174662445263da47214fe017fbb3f025b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): colossalai/nn/optimizer/cpu_adam.py:135-150 | colossalai/nn/optimizer/hybrid_adam.py:103-118 \u2014 before extracting anything, compare \u0060colossalai/nn/optimizer/cpu_adam.py\u0060 and \u0060colossalai/nn/optimizer/hybrid_adam.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/cpu_adam.py"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"012b995e527c19c3e6db364d156131ed1d9fe422abad0898b22034b30752e892"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): colossalai/nn/optimizer/fused_lamb.py:189-204 | colossalai/nn/optimizer/fused_lamb.py:207-222 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/nn/optimizer/fused_lamb.py:189\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/fused_lamb.py"},"region":{"startLine":189}}}],"partialFingerprints":{"codehealthFindingId/v1":"6fa9f2891be3c04967e137037de442e12ea28c504c173c8c5ab6e8b7832e36b6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): colossalai/shardformer/modeling/_deepseek_v3_tf4.py:165-180 | colossalai/shardformer/modeling/_deepseek_v3_tf5.py:190-205 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_deepseek_v3_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_deepseek_v3_tf5.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_deepseek_v3_tf4.py"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"67a3d0b2f52ec61b20f0d313f83e9b87269d649e15338a7a9e6ed1cef26f7fb6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): colossalai/shardformer/modeling/_mixtral_tf4.py:511-526 | colossalai/shardformer/modeling/_mixtral_tf5.py:889-904 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_mixtral_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_mixtral_tf5.py\u0060 as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 581 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_mixtral_tf4.py:511\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_mixtral_tf4.py"},"region":{"startLine":511}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ec39fef63a21367fd5f8734834f4c9fd934f1c23846ad0557bc334f14b6c56a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201316 lines \u00D7 2): colossalai/shardformer/modeling/bloom.py:302-317 | colossalai/shardformer/modeling/falcon.py:337-351 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/bloom.py\u0060 and \u0060colossalai/shardformer/modeling/falcon.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 594 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/shardformer/modeling/bloom.py:300\u0060 calls \u0060to_legacy_cache\u0060 and \u0060colossalai/shardformer/modeling/falcon.py:335\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/bloom.py"},"region":{"startLine":302}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f34842c70227035aa167d67fef494178e4230601c3cc223fdb4bda2834b82f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): colossalai/shardformer/modeling/bloom.py:511-526 | colossalai/shardformer/modeling/falcon.py:540-555 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/bloom.py\u0060 and \u0060colossalai/shardformer/modeling/falcon.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 594 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/bloom.py:511\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/bloom.py"},"region":{"startLine":511}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2358a43a21e0889a5ed615c6f8d483f8f4a311de9c4c990d16d376b906e8453"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): colossalai/shardformer/modeling/bloom.py:736-751 | colossalai/shardformer/modeling/bloom.py:858-873 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/bloom.py:736\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/bloom.py"},"region":{"startLine":736}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0ead09ec5583964dbb26b46f8062a334250668de9258c809b7c4835b0b1cc8a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): colossalai/shardformer/policies/_llama_tf4.py:453-468 | colossalai/shardformer/policies/_llama_tf5.py:451-466 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_llama_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_llama_tf5.py\u0060 as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 404 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_llama_tf4.py"},"region":{"startLine":453}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c27208653c5b12664d8a37520a076c9d5c1467c66d5e289047e53c699dfb276"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): colossalai/tensor/d_tensor/layout_converter.py:324-339 | colossalai/tensor/shape_consistency.py:302-317 \u2014 before extracting anything, compare \u0060colossalai/tensor/d_tensor/layout_converter.py\u0060 and \u0060colossalai/tensor/shape_consistency.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/tensor/d_tensor/layout_converter.py:324\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/tensor/d_tensor/layout_converter.py"},"region":{"startLine":324}}}],"partialFingerprints":{"codehealthFindingId/v1":"d83e898ee1d96f96f790c1903f2911546b5355eca7a780eab44c21baad4a5f58"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 14): colossalai/shardformer/modeling/_bert_tf4.py:420-434 | colossalai/shardformer/modeling/_bert_tf4.py:508-522 | colossalai/shardformer/modeling/_bert_tf4.py:617-631 | colossalai/shardformer/modeling/_bert_tf4.py:693-707 | colossalai/shardformer/modeling/_bert_tf4.py:785-799 | colossalai/shardformer/modeling/_bert_tf4.py:877-891 | colossalai/shardformer/modeling/_bert_tf4.py:959-973 | colossalai/shardformer/modeling/_bert_tf5.py:433-447 | colossalai/shardformer/modeling/_bert_tf5.py:521-535 | colossalai/shardformer/modeling/_bert_tf5.py:630-644 | colossalai/shardformer/modeling/_bert_tf5.py:706-720 | colossalai/shardformer/modeling/_bert_tf5.py:798-812 | colossalai/shardformer/modeling/_bert_tf5.py:890-904 | colossalai/shardformer/modeling/_bert_tf5.py:972-986 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 45 separate duplicated blocks between them, totalling at least 882 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_bert_tf4.py:420\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":420}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7c65ca388a1b1b7435d2e4c66dd8c347b3aff0fe6c66cf8a80d3dd1c143966f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201315 lines \u00D7 13): colossalai/shardformer/policies/_deepseek_v3_tf4.py:123-137 | colossalai/shardformer/policies/_deepseek_v3_tf5.py:130-144 | colossalai/shardformer/policies/_llama_tf4.py:351-363 | colossalai/shardformer/policies/_llama_tf5.py:349-361 | colossalai/shardformer/policies/_mixtral_tf4.py:329-343 | colossalai/shardformer/policies/_mixtral_tf5.py:356-370 | colossalai/shardformer/policies/_qwen2_tf4.py:362-375 | colossalai/shardformer/policies/_qwen2_tf5.py:361-374 | colossalai/shardformer/policies/_qwen3_tf4.py:362-375 | colossalai/shardformer/policies/_qwen3_tf5.py:382-395 | colossalai/shardformer/policies/command.py:329-342 | colossalai/shardformer/policies/deepseek.py:337-349 | colossalai/shardformer/policies/mistral.py:312-324 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_deepseek_v3_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_deepseek_v3_tf5.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_deepseek_v3_tf4.py"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d9b152dc4353f0f5a5a19994983812625656bf96e8fe35f0f44e197a5ce21cb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 12): colossalai/shardformer/modeling/_bert_tf4.py:619-634 | colossalai/shardformer/modeling/_bert_tf4.py:695-710 | colossalai/shardformer/modeling/_bert_tf4.py:787-802 | colossalai/shardformer/modeling/_bert_tf4.py:879-893 | colossalai/shardformer/modeling/_bert_tf4.py:961-975 | colossalai/shardformer/modeling/_bert_tf5.py:632-647 | colossalai/shardformer/modeling/_bert_tf5.py:708-723 | colossalai/shardformer/modeling/_bert_tf5.py:800-815 | colossalai/shardformer/modeling/_bert_tf5.py:892-906 | colossalai/shardformer/modeling/_bert_tf5.py:974-988 | colossalai/shardformer/modeling/opt.py:387-402 | colossalai/shardformer/modeling/opt.py:487-501 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 45 separate duplicated blocks between them, totalling at least 882 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_bert_tf4.py:619\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":619}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c182b725dbe82edce2a5cb54d50b861f1bae59b4fa1097bd7c95c2a406de0a3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 12): colossalai/shardformer/modeling/_bert_tf4.py:718-732 | colossalai/shardformer/modeling/_bert_tf5.py:731-745 | colossalai/shardformer/modeling/_llama_tf4.py:456-470 | colossalai/shardformer/modeling/_llama_tf5.py:498-512 | colossalai/shardformer/modeling/_qwen2_tf4.py:446-460 | colossalai/shardformer/modeling/bloom.py:502-516 | colossalai/shardformer/modeling/falcon.py:531-545 | colossalai/shardformer/modeling/gpt2.py:778-792 | colossalai/shardformer/modeling/gptj.py:442-456 | colossalai/shardformer/modeling/mistral.py:342-356 | colossalai/shardformer/modeling/opt.py:424-438 | examples/community/roberta/pretraining/model/bert.py:1566-1580 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 45 separate duplicated blocks between them, totalling at least 882 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/shardformer/modeling/_llama_tf4.py:455\u0060 calls \u0060to\u0060 and \u0060colossalai/shardformer/modeling/_bert_tf4.py:717\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":718}}}],"partialFingerprints":{"codehealthFindingId/v1":"012d4ade698b88d89745d0392395b0800a9e9e0d0528e58f548b0937de23f144"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 10): colossalai/shardformer/modeling/_mixtral_tf4.py:476-491 | colossalai/shardformer/modeling/_mixtral_tf5.py:842-857 | colossalai/shardformer/modeling/bloom.py:368-382 | colossalai/shardformer/modeling/bloom.py:461-475 | colossalai/shardformer/modeling/bloom.py:587-602 | colossalai/shardformer/modeling/deepseek.py:537-552 | colossalai/shardformer/modeling/falcon.py:391-406 | colossalai/shardformer/modeling/falcon.py:490-505 | colossalai/shardformer/modeling/falcon.py:604-620 | colossalai/shardformer/modeling/mistral.py:240-256 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_mixtral_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_mixtral_tf5.py\u0060 as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 581 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_mixtral_tf4.py:476\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_mixtral_tf4.py"},"region":{"startLine":476}}}],"partialFingerprints":{"codehealthFindingId/v1":"d706872785cdfb96f732853ecdc9f03b5061ff89bf8afa5d04a8d693b4c2e08c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 9): colossalai/shardformer/modeling/_bert_tf4.py:510-525 | colossalai/shardformer/modeling/_bert_tf5.py:523-538 | colossalai/shardformer/modeling/_whisper_tf4.py:1064-1078 | colossalai/shardformer/modeling/_whisper_tf5.py:579-593 | colossalai/shardformer/modeling/gpt2.py:473-488 | colossalai/shardformer/modeling/gpt2.py:650-665 | colossalai/shardformer/modeling/gpt2.py:735-750 | colossalai/shardformer/modeling/gptj.py:297-311 | colossalai/shardformer/modeling/gptj.py:398-413 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 45 separate duplicated blocks between them, totalling at least 882 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_bert_tf4.py:510\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":510}}}],"partialFingerprints":{"codehealthFindingId/v1":"db9d6d2db883579098c0a73c9bbb079df9cca6d817bec058c9f30bb8a739cbb1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 8): colossalai/shardformer/modeling/_llama_tf4.py:187-200 | colossalai/shardformer/modeling/_llama_tf5.py:237-250 | colossalai/shardformer/modeling/_qwen2_tf4.py:188-202 | colossalai/shardformer/modeling/_qwen2_tf5.py:131-145 | colossalai/shardformer/modeling/_qwen3_tf4.py:186-200 | colossalai/shardformer/modeling/_qwen3_tf5.py:132-146 | colossalai/shardformer/modeling/command.py:172-186 | colossalai/shardformer/modeling/mistral.py:118-132 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_llama_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_llama_tf5.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 483 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_llama_tf4.py"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"a43a9fa8a1b2663f1fb0ac77653fdceca47c96d3a800fa472b1dcd8b744ca38c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 6): colossalai/inference/modeling/models/nopadding_llama.py:216-230 | colossalai/legacy/inference/dynamic_batching/infer_batch.py:114-128 | colossalai/legacy/moe/openmoe/model/modeling_openmoe.py:122-136 | colossalai/shardformer/modeling/_whisper_tf4.py:1064-1078 | colossalai/shardformer/modeling/_whisper_tf5.py:579-593 | colossalai/shardformer/modeling/gptj.py:297-311 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_whisper_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_whisper_tf5.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 257 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/inference/modeling/models/nopadding_llama.py:216\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/modeling/models/nopadding_llama.py"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"84fcdff7b3fda9f760037e843e2be57ba7e898a8caf715180000d246cefe9ca2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 6): colossalai/legacy/moe/openmoe/model/openmoe_policy.py:470-484 | colossalai/shardformer/modeling/_llama_tf4.py:334-348 | colossalai/shardformer/modeling/_llama_tf5.py:376-390 | colossalai/shardformer/modeling/_mixtral_tf4.py:473-487 | colossalai/shardformer/modeling/_mixtral_tf5.py:839-853 | colossalai/shardformer/modeling/command.py:303-317 \u2014 before extracting anything, compare \u0060colossalai/legacy/moe/openmoe/model/openmoe_policy.py\u0060 and \u0060colossalai/shardformer/modeling/_mixtral_tf4.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 130 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/openmoe/model/openmoe_policy.py"},"region":{"startLine":470}}}],"partialFingerprints":{"codehealthFindingId/v1":"861a8d1e51b91c5c859be156bc023b6e9029bc25327747196d8cb73d8a3913d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201315 lines \u00D7 6): colossalai/shardformer/modeling/_qwen2_tf4.py:829-841 | colossalai/shardformer/modeling/_qwen2_tf5.py:606-618 | colossalai/shardformer/modeling/_qwen3_tf4.py:822-834 | colossalai/shardformer/modeling/_qwen3_tf5.py:608-620 | colossalai/shardformer/modeling/command.py:650-664 | colossalai/shardformer/modeling/mistral.py:625-637 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_qwen2_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_qwen2_tf5.py\u0060 as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 242 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/command.py:650\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen2_tf4.py"},"region":{"startLine":829}}}],"partialFingerprints":{"codehealthFindingId/v1":"e07fdef269d54a92c145d00b74b8b17a052d44bf752875dc75a38f21b468d320"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 6): colossalai/shardformer/modeling/gpt2.py:377-391 | colossalai/shardformer/modeling/gpt2.py:472-486 | colossalai/shardformer/modeling/gpt2.py:649-663 | colossalai/shardformer/modeling/gpt2.py:734-748 | colossalai/shardformer/modeling/gptj.py:294-308 | colossalai/shardformer/modeling/gptj.py:397-411 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/gpt2.py\u0060 and \u0060colossalai/shardformer/modeling/gptj.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 321 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/shardformer/modeling/gpt2.py:376\u0060 calls \u0060gpt2_model_forward\u0060 and \u0060colossalai/shardformer/modeling/gpt2.py:467\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/gpt2.py"},"region":{"startLine":377}}}],"partialFingerprints":{"codehealthFindingId/v1":"81769cd389d227522571f0785f40e524524f70fdf58b7976a1d8aecca5db3053"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 5): colossalai/initialize.py:136-150 | colossalai/initialize.py:169-183 | colossalai/legacy/initialize.py:147-161 | colossalai/legacy/initialize.py:187-201 | colossalai/legacy/initialize.py:223-237 \u2014 before extracting anything, compare \u0060colossalai/initialize.py\u0060 and \u0060colossalai/legacy/initialize.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 107 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/initialize.py:136\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/initialize.py"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"8feb508c5c0b8a549ccdbe65a79ed1bf252881e28d8fdce8c70cdb3eea57d395"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 5): colossalai/legacy/moe/openmoe/model/openmoe_policy.py:472-487 | colossalai/shardformer/modeling/_bert_tf4.py:512-527 | colossalai/shardformer/modeling/_bert_tf5.py:525-540 | colossalai/shardformer/modeling/opt.py:317-331 | colossalai/shardformer/modeling/t5.py:635-649 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 5 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/moe/openmoe/model/openmoe_policy.py:472\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/openmoe/model/openmoe_policy.py"},"region":{"startLine":472}}}],"partialFingerprints":{"codehealthFindingId/v1":"146195be8328455739fc6718293a7ab4cb8b81a4b6ce4abfcb8fddb5ced3fadb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201315 lines \u00D7 4): applications/ColossalChat/coati/trainer/dpo.py:263-277 | applications/ColossalChat/coati/trainer/kto.py:125-132 | applications/ColossalChat/coati/trainer/kto.py:274-281 | applications/ColossalChat/coati/trainer/orpo.py:115-129 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/trainer/dpo.py\u0060 and \u0060applications/ColossalChat/coati/trainer/kto.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/coati/trainer/dpo.py:263\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/dpo.py"},"region":{"startLine":263}}}],"partialFingerprints":{"codehealthFindingId/v1":"a12d31a98a8494c444dfb1290b137d8f8c3f464968c1a8643d90c3df3171ca25"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 4): colossalai/initialize.py:97-111 | colossalai/initialize.py:135-149 | colossalai/legacy/initialize.py:146-160 | colossalai/legacy/initialize.py:186-200 \u2014 before extracting anything, compare \u0060colossalai/initialize.py\u0060 and \u0060colossalai/legacy/initialize.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 107 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/initialize.py:97\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/initialize.py"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"31edcf2746d9e1889df5f22c89f61732ba75170e84da81eb03009f76f1f80969"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 4): colossalai/kernel/triton/context_attn_unpad.py:655-669 | colossalai/kernel/triton/flash_decoding.py:427-441 | colossalai/kernel/triton/no_pad_rotary_embedding.py:551-565 | colossalai/kernel/triton/no_pad_rotary_embedding.py:627-641 \u2014 there are 4 copies across 3 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/context_attn_unpad.py"},"region":{"startLine":655}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fbb6044429cca9fb075f12b4b4fd546dd2f28b17fa93aa3a0f892d5ee12e1d7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 4): colossalai/legacy/nn/layer/parallel_2d/_operation.py:419-432 | colossalai/legacy/nn/layer/parallel_2d/_operation.py:575-589 | colossalai/legacy/nn/layer/parallel_2p5d/_operation.py:384-397 | colossalai/legacy/nn/layer/parallel_2p5d/_operation.py:549-562 \u2014 \u0060colossalai/legacy/nn/layer/parallel_2d/_operation.py\u0060 and \u0060colossalai/legacy/nn/layer/parallel_2p5d/_operation.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 16 separate duplicated blocks between them, totalling at least 185 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/nn/layer/parallel_2d/_operation.py:419\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2d/_operation.py"},"region":{"startLine":419}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcab6a0f3df557495938ba39e2e8d7781d8f42c3c4e534f5c9db39d59d7c553a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 4): colossalai/shardformer/modeling/_bert_tf4.py:528-542 | colossalai/shardformer/modeling/_bert_tf5.py:541-555 | examples/community/roberta/pretraining/model/bert.py:1356-1370 | examples/community/roberta/pretraining/model/deberta_v2.py:1165-1179 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 45 separate duplicated blocks between them, totalling at least 882 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_bert_tf4.py:528\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/shardformer/modeling/_bert_tf4.py:527\u0060 calls \u0060is_last_stage\u0060 and \u0060examples/community/roberta/pretraining/model/bert.py:1354\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":528}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc999926047828511b59e0303e50f5c98ad5b4409831d427167353c9b0f9fcb8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201315 lines \u00D7 3): colossalai/auto_parallel/tensor_shard/node_handler/strategy/reshape_generator.py:119-131 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/reshape_generator.py:278-292 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/reshape_generator.py:351-361 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/auto_parallel/tensor_shard/node_handler/strategy/reshape_generator.py:118\u0060 calls \u0060list\u0060, \u0060keys\u0060 and \u0060colossalai/auto_parallel/tensor_shard/node_handler/strategy/reshape_generator.py:277\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/reshape_generator.py"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ddfd6cb7cb3e31b9b99226fa070c0e4a7d776ebd273a25f86184ee0cc01c32e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 3): colossalai/legacy/nn/layer/parallel_2p5d/_operation.py:297-311 | colossalai/legacy/nn/layer/parallel_2p5d/_operation.py:462-476 | colossalai/legacy/nn/layer/parallel_2p5d/_operation.py:625-639 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/nn/layer/parallel_2p5d/_operation.py:297\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2p5d/_operation.py"},"region":{"startLine":297}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a1d211b50fdd6e7015083d2bd753cc154306b9f946ffb3618a6b8faeb665def"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 3): colossalai/shardformer/modeling/_qwen2_tf4.py:246-259 | colossalai/shardformer/modeling/_qwen3_tf4.py:244-257 | colossalai/shardformer/modeling/deepseek.py:457-471 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_qwen2_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_qwen3_tf4.py\u0060 as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1214 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/deepseek.py:457\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/shardformer/modeling/_qwen2_tf4.py:242\u0060 calls \u0060is_share_sp_tp\u0060, \u0060gather_sp_output\u0060 and \u0060colossalai/shardformer/modeling/deepseek.py:454\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen2_tf4.py"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b7deb08de5eb953a59895be1c3c9531e7f36031e84fbb62a5a767226fe459b1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 3): colossalai/shardformer/modeling/_qwen2_tf4.py:746-760 | colossalai/shardformer/modeling/_qwen3_tf4.py:738-752 | colossalai/shardformer/modeling/opt.py:748-761 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_qwen2_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_qwen3_tf4.py\u0060 as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1214 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen2_tf4.py"},"region":{"startLine":746}}}],"partialFingerprints":{"codehealthFindingId/v1":"2eaa438b5bba6cce34ce740f09daf4147dde9b301669342c3363c0e361c69d8d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 3): colossalai/shardformer/policies/_mixtral_tf4.py:288-302 | colossalai/shardformer/policies/_mixtral_tf5.py:315-329 | colossalai/shardformer/policies/deepseek.py:298-312 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_mixtral_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_mixtral_tf5.py\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 408 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_mixtral_tf4.py"},"region":{"startLine":288}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a627ec729499651344dea99232281db81fa261bce7444fb560c6c0ebe4257e2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): applications/ColossalChat/coati/distributed/launch.py:130-144 | applications/ColossalChat/coati/distributed/launch_zero_bubble.py:134-148 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/distributed/launch.py\u0060 and \u0060applications/ColossalChat/coati/distributed/launch_zero_bubble.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/launch.py"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"170e7de093c33851ddf06c7551cfcc27f37b6d699a1b9f08cad3680e28863879"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): applications/ColossalChat/coati/distributed/launch.py:149-163 | applications/ColossalChat/coati/distributed/launch_zero_bubble.py:152-166 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/distributed/launch.py\u0060 and \u0060applications/ColossalChat/coati/distributed/launch_zero_bubble.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060applications/ColossalChat/coati/distributed/launch.py:148\u0060 calls \u0060get\u0060, \u0060remote\u0060 and \u0060applications/ColossalChat/coati/distributed/launch_zero_bubble.py:150\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/launch.py"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa2e1097f61dd81e510f27a50ed97acd5a407e8cbd5fd6b3c2497bdd79f92672"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201315 lines \u00D7 2): applications/ColossalEval/colossal_eval/models/huggingface.py:276-290 | applications/ColossalEval/colossal_eval/models/vllm.py:424-432 \u2014 before extracting anything, compare \u0060applications/ColossalEval/colossal_eval/models/huggingface.py\u0060 and \u0060applications/ColossalEval/colossal_eval/models/vllm.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 157 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/models/huggingface.py"},"region":{"startLine":276}}}],"partialFingerprints":{"codehealthFindingId/v1":"677d9dffb1e9b52655fe0278796dc9efb09fd5ba1af993922b8ab7c75c89900c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): colossalai/_analyzer/fx/codegen.py:227-241 | colossalai/fx/codegen/activation_checkpoint_codegen.py:435-449 \u2014 before extracting anything, compare \u0060colossalai/_analyzer/fx/codegen.py\u0060 and \u0060colossalai/fx/codegen/activation_checkpoint_codegen.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/fx/codegen.py"},"region":{"startLine":227}}}],"partialFingerprints":{"codehealthFindingId/v1":"68a3798d73eab7f0ce9955c76586676fa2b1e72d794e29e091e488935dc4f644"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 2): colossalai/auto_parallel/meta_profiler/meta_registry/activation.py:61-75 | colossalai/auto_parallel/meta_profiler/meta_registry/tensor.py:43-56 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/auto_parallel/meta_profiler/meta_registry/activation.py:61\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/meta_profiler/meta_registry/activation.py"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"82a19b88029ea17c5fdd19fa4b23aa3e634a336e151c114f6414fa3378923019"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201315 lines \u00D7 2): colossalai/auto_parallel/meta_profiler/meta_registry/norm.py:75-89 | colossalai/auto_parallel/meta_profiler/meta_registry/norm.py:136-147 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/auto_parallel/meta_profiler/meta_registry/norm.py:75\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/meta_profiler/meta_registry/norm.py"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad4137a51ae92f3dc4a8c4802b46b6bb4c5419a7df0fc2c8e60cf7c410fa0857"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 2): colossalai/auto_parallel/tensor_shard/node_handler/strategy/matmul_strategy_generator.py:798-811 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/matmul_strategy_generator.py:952-966 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/matmul_strategy_generator.py"},"region":{"startLine":798}}}],"partialFingerprints":{"codehealthFindingId/v1":"07d90b32c204c2b7901c43b50325f9dd80cc05adc669df8f5d2647f7d47018d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 2): colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py:335-348 | colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py:608-622 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":335}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba36781f5e16d5d4abbfb4c080b07e34583c3a22ded7ae262f6cedda133f35e3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): colossalai/fx/passes/split_module.py:122-136 | colossalai/fx/passes/split_module.py:138-152 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/passes/split_module.py"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"fec4124b5e8d2521ab43e3eaa2071bfe03c4e73507016cf163bc9e62a040b475"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): colossalai/kernel/triton/flash_decoding.py:513-527 | colossalai/kernel/triton/kvcache_copy.py:269-283 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/flash_decoding.py"},"region":{"startLine":513}}}],"partialFingerprints":{"codehealthFindingId/v1":"1556a956674e679602bd515cc4b71a557ff5900fdf17fcd4e4d07a7e1395a695"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): colossalai/legacy/engine/schedule/_pipeline_schedule.py:263-277 | colossalai/legacy/engine/schedule/_pipeline_schedule.py:544-558 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/engine/schedule/_pipeline_schedule.py"},"region":{"startLine":263}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ba192a9bc4afe45090aedec42ae9d280eb351209e48520d74e0b81afc108a9a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201315 lines \u00D7 2): colossalai/legacy/inference/dynamic_batching/ray_dist_init.py:109-123 | colossalai/legacy/inference/serving/ray_serve/Colossal_Inference_rayserve.py:112-123 \u2014 before extracting anything, compare \u0060colossalai/legacy/inference/dynamic_batching/ray_dist_init.py\u0060 and \u0060colossalai/legacy/inference/serving/ray_serve/Colossal_Inference_rayserve.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/inference/dynamic_batching/ray_dist_init.py:109\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/dynamic_batching/ray_dist_init.py"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0c5e22eb8ece69c6db5f7e63b745feea480e21a115acea81e6facc207386e13"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_1d/layers.py:262-276 | colossalai/legacy/nn/layer/parallel_1d/layers.py:677-691 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_1d/layers.py"},"region":{"startLine":262}}}],"partialFingerprints":{"codehealthFindingId/v1":"50c51c879a4a3d7b362057731b5f49cad990355e80a9c5a9634000c80f8c9215"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_1d/layers.py:399-413 | colossalai/legacy/nn/layer/parallel_1d/layers.py:534-548 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_1d/layers.py"},"region":{"startLine":399}}}],"partialFingerprints":{"codehealthFindingId/v1":"b811fc432bb5f4022007ea04f7cf304a87a7e5b57cd6fb9745f6e8e0c3d83fc6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_2d/_operation.py:444-458 | colossalai/legacy/nn/layer/parallel_2p5d/_operation.py:411-425 \u2014 \u0060colossalai/legacy/nn/layer/parallel_2d/_operation.py\u0060 and \u0060colossalai/legacy/nn/layer/parallel_2p5d/_operation.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 16 separate duplicated blocks between them, totalling at least 185 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2d/_operation.py"},"region":{"startLine":444}}}],"partialFingerprints":{"codehealthFindingId/v1":"7bf583c85188dfa1cd67ed042eb870bf01e50f1aef0fbbe98c53f638c949f118"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_2d/_operation.py:601-615 | colossalai/legacy/nn/layer/parallel_2p5d/_operation.py:574-588 \u2014 \u0060colossalai/legacy/nn/layer/parallel_2d/_operation.py\u0060 and \u0060colossalai/legacy/nn/layer/parallel_2p5d/_operation.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 16 separate duplicated blocks between them, totalling at least 185 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2d/_operation.py"},"region":{"startLine":601}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ce4b9c4dac257cff2138dce731ce3f640a3ca3cbb14a4326c327c2b5db9387d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_2p5d/layers.py:964-978 | colossalai/legacy/nn/layer/parallel_2p5d/layers.py:1127-1141 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/nn/layer/parallel_2p5d/layers.py:964\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2p5d/layers.py"},"region":{"startLine":964}}}],"partialFingerprints":{"codehealthFindingId/v1":"beface032f130377cf1c318bea746d42000eab8905c9aaf6fef00b854d3978e6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 2): colossalai/legacy/pipeline/rpc/_pipeline_base.py:852-865 | colossalai/legacy/pipeline/rpc/_pipeline_base.py:880-894 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/pipeline/rpc/_pipeline_base.py"},"region":{"startLine":852}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddadd4f97fa783bcde5b6c1f3ef6ffb67936b140345905f9345f58fca22e3cd6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): colossalai/shardformer/layer/qkv_fused_linear.py:674-688 | colossalai/shardformer/layer/qkv_fused_linear.py:1249-1263 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/qkv_fused_linear.py"},"region":{"startLine":674}}}],"partialFingerprints":{"codehealthFindingId/v1":"da8b2e76c3af2fb125322ea76f9e0ab63f7fc3bb67755b71028a58c9258d7883"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 2): colossalai/shardformer/layer/utils.py:252-265 | colossalai/shardformer/layer/utils.py:273-287 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/utils.py"},"region":{"startLine":252}}}],"partialFingerprints":{"codehealthFindingId/v1":"999a755f8e760b3537272d84a6edfaf3ad3ecb46fd1da6ad9af449f11725c08b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): colossalai/shardformer/modeling/_bert_tf4.py:142-156 | examples/community/roberta/pretraining/model/bert.py:988-1002 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_bert_tf4.py\u0060 and \u0060examples/community/roberta/pretraining/model/bert.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 255 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060colossalai/shardformer/modeling/_bert_tf4.py:159\u0060 calls \u0060is_first_stage\u0060 and \u0060examples/community/roberta/pretraining/model/bert.py:1004\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a1f973f200d8e38ccbc313186f1b33b46ef24ba3803e02362c5dba3a543a947"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): colossalai/shardformer/modeling/_bert_tf4.py:736-750 | colossalai/shardformer/modeling/_bert_tf5.py:749-763 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 45 separate duplicated blocks between them, totalling at least 882 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":736}}}],"partialFingerprints":{"codehealthFindingId/v1":"63d07110797f8be6164c59ba769b9366f69753e2b9921bf4fca69f1ca45a8b4f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): colossalai/shardformer/modeling/_deepseek_v3_tf4.py:186-200 | colossalai/shardformer/modeling/_deepseek_v3_tf5.py:215-229 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_deepseek_v3_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_deepseek_v3_tf5.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_deepseek_v3_tf4.py"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"fed08901af82b52572b7d349dbcb96e12d1ccf89b9700ff7c951813b961b5b3b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): colossalai/shardformer/modeling/chatglm2_6b/modeling_chatglm.py:501-515 | colossalai/shardformer/modeling/chatglm2_6b/modeling_chatglm.py:516-530 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/chatglm2_6b/modeling_chatglm.py"},"region":{"startLine":501}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb7ae80aacc64a8f729544ff68956c085bd3434ea1fad9f2786eef52d570695a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 16): colossalai/shardformer/modeling/_bert_tf4.py:513-527 | colossalai/shardformer/modeling/_bert_tf4.py:619-634 | colossalai/shardformer/modeling/_bert_tf4.py:695-710 | colossalai/shardformer/modeling/_bert_tf4.py:787-802 | colossalai/shardformer/modeling/_bert_tf4.py:879-893 | colossalai/shardformer/modeling/_bert_tf4.py:961-975 | colossalai/shardformer/modeling/_bert_tf5.py:526-540 | colossalai/shardformer/modeling/_bert_tf5.py:632-647 | colossalai/shardformer/modeling/_bert_tf5.py:708-723 | colossalai/shardformer/modeling/_bert_tf5.py:800-815 | colossalai/shardformer/modeling/_bert_tf5.py:892-906 | colossalai/shardformer/modeling/_bert_tf5.py:974-988 | colossalai/shardformer/modeling/opt.py:318-331 | colossalai/shardformer/modeling/opt.py:387-402 | colossalai/shardformer/modeling/opt.py:487-501 | colossalai/shardformer/modeling/t5.py:636-649 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 45 separate duplicated blocks between them, totalling at least 882 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_bert_tf4.py:513\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":513}}}],"partialFingerprints":{"codehealthFindingId/v1":"a806554e1a0eb48e2cce122c324e069d3e955df51b2f02643f6bbad614013f76"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 16): colossalai/shardformer/modeling/_bert_tf4.py:514-528 | colossalai/shardformer/modeling/_bert_tf4.py:621-635 | colossalai/shardformer/modeling/_bert_tf4.py:697-711 | colossalai/shardformer/modeling/_bert_tf4.py:789-803 | colossalai/shardformer/modeling/_bert_tf4.py:881-894 | colossalai/shardformer/modeling/_bert_tf4.py:963-976 | colossalai/shardformer/modeling/_bert_tf5.py:527-541 | colossalai/shardformer/modeling/_bert_tf5.py:634-648 | colossalai/shardformer/modeling/_bert_tf5.py:710-724 | colossalai/shardformer/modeling/_bert_tf5.py:802-816 | colossalai/shardformer/modeling/_bert_tf5.py:894-907 | colossalai/shardformer/modeling/_bert_tf5.py:976-989 | colossalai/shardformer/modeling/bloom.py:672-687 | colossalai/shardformer/modeling/opt.py:389-403 | colossalai/shardformer/modeling/opt.py:489-502 | colossalai/shardformer/modeling/t5.py:637-650 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 45 separate duplicated blocks between them, totalling at least 882 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_bert_tf4.py:514\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060colossalai/shardformer/modeling/_bert_tf4.py:897\u0060 calls \u0060view\u0060 and \u0060colossalai/shardformer/modeling/_bert_tf4.py:716\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":514}}}],"partialFingerprints":{"codehealthFindingId/v1":"096b55b330985ce4dce9221001b1f3a8d523971449d0bad91b1809377328a4af"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 12): colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py:134-147 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py:154-166 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py:194-207 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py:214-226 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py:266-279 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py:284-296 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/embedding_generator.py:113-126 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/embedding_generator.py:167-180 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/matmul_strategy_generator.py:338-350 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/matmul_strategy_generator.py:360-372 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/matmul_strategy_generator.py:417-429 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/matmul_strategy_generator.py:439-451 \u2014 before extracting anything, compare \u0060colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py\u0060 and \u0060colossalai/auto_parallel/tensor_shard/node_handler/strategy/embedding_generator.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 143 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py:134\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ca497967c1caad0d1cd959adc0f50651ecfab92ff42c53b3db10adc85edd320"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 9): colossalai/legacy/inference/hybridengine/modeling/llama.py:217-229 | colossalai/legacy/moe/openmoe/model/openmoe_policy.py:263-275 | colossalai/shardformer/modeling/_mixtral_tf4.py:242-254 | colossalai/shardformer/modeling/_mixtral_tf5.py:586-598 | colossalai/shardformer/modeling/_qwen2_tf4.py:72-85 | colossalai/shardformer/modeling/_qwen2_tf5.py:71-84 | colossalai/shardformer/modeling/_qwen3_tf4.py:72-85 | colossalai/shardformer/modeling/_qwen3_tf5.py:72-85 | colossalai/shardformer/modeling/deepseek.py:339-351 \u2014 before extracting anything, compare \u0060colossalai/legacy/moe/openmoe/model/openmoe_policy.py\u0060 and \u0060colossalai/shardformer/modeling/_mixtral_tf4.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 130 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/hybridengine/modeling/llama.py"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"c60401178604af2a2124323e0984db10bd7254d32e0b8e90b4ab5326ff4e88d1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 9): colossalai/shardformer/modeling/_llama_tf4.py:477-490 | colossalai/shardformer/modeling/_llama_tf5.py:519-532 | colossalai/shardformer/modeling/_qwen2_tf4.py:467-480 | colossalai/shardformer/modeling/_qwen2_tf5.py:365-378 | colossalai/shardformer/modeling/_qwen3_tf4.py:453-466 | colossalai/shardformer/modeling/_qwen3_tf5.py:366-379 | colossalai/shardformer/modeling/bloom.py:523-535 | colossalai/shardformer/modeling/falcon.py:552-564 | colossalai/shardformer/modeling/opt.py:446-458 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_llama_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_llama_tf5.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 483 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_llama_tf4.py"},"region":{"startLine":477}}}],"partialFingerprints":{"codehealthFindingId/v1":"823a524654dced6633893b3d4c19922a0215dea508680ca22a79ccbaddc2d924"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 8): colossalai/legacy/nn/layer/parallel_1d/layers.py:255-268 | colossalai/legacy/nn/layer/parallel_1d/layers.py:392-405 | colossalai/legacy/nn/layer/parallel_2d/layers.py:943-956 | colossalai/legacy/nn/layer/parallel_2d/layers.py:1105-1118 | colossalai/legacy/nn/layer/parallel_2p5d/layers.py:958-971 | colossalai/legacy/nn/layer/parallel_2p5d/layers.py:1121-1134 | colossalai/legacy/nn/layer/parallel_3d/layers.py:425-438 | colossalai/legacy/nn/layer/parallel_3d/layers.py:581-594 \u2014 \u0060colossalai/legacy/nn/layer/parallel_1d/layers.py\u0060 and \u0060colossalai/legacy/nn/layer/parallel_2d/layers.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 6 separate duplicated blocks between them, totalling at least 56 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060colossalai/legacy/nn/layer/parallel_2d/layers.py:959\u0060 calls \u0060get_local_rank\u0060 and \u0060colossalai/legacy/nn/layer/parallel_1d/layers.py:270\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_1d/layers.py"},"region":{"startLine":255}}}],"partialFingerprints":{"codehealthFindingId/v1":"f94a4ddca5ddef751bc3fa364e8a658a9c3c5a2ce079256c3cd975477d9a670e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 6): colossalai/kernel/triton/context_attn_unpad.py:616-629 | colossalai/kernel/triton/context_attn_unpad.py:656-669 | colossalai/kernel/triton/context_attn_unpad.py:692-705 | colossalai/kernel/triton/flash_decoding.py:428-441 | colossalai/kernel/triton/no_pad_rotary_embedding.py:552-565 | colossalai/kernel/triton/no_pad_rotary_embedding.py:628-641 \u2014 there are 6 copies across 3 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/context_attn_unpad.py"},"region":{"startLine":616}}}],"partialFingerprints":{"codehealthFindingId/v1":"05ad99d49e4267133bc5ed7b38eea0b941187040d4259ea19c2f76699a8d922e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 5): colossalai/shardformer/modeling/_deepseek_v3_tf4.py:345-358 | colossalai/shardformer/modeling/_deepseek_v3_tf5.py:383-396 | colossalai/shardformer/modeling/_mixtral_tf4.py:494-506 | colossalai/shardformer/modeling/_mixtral_tf5.py:860-872 | colossalai/shardformer/modeling/deepseek.py:555-568 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_deepseek_v3_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_deepseek_v3_tf5.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_deepseek_v3_tf4.py"},"region":{"startLine":345}}}],"partialFingerprints":{"codehealthFindingId/v1":"44a8851e3fa1f05f3796a5ea1ffc753fa26c9087578348423c67153ffb611999"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 4): applications/ColossalChat/coati/trainer/dpo.py:244-257 | applications/ColossalChat/coati/trainer/dpo.py:364-377 | applications/ColossalChat/coati/trainer/kto.py:229-241 | applications/ColossalChat/coati/trainer/orpo.py:194-206 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/trainer/dpo.py\u0060 and \u0060applications/ColossalChat/coati/trainer/kto.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/dpo.py"},"region":{"startLine":244}}}],"partialFingerprints":{"codehealthFindingId/v1":"430a73cc941e80b5bcaa3fb2427b376a8a9b1849d5184b04461911c5f9b9c882"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 4): colossalai/legacy/inference/hybridengine/modeling/llama.py:439-451 | colossalai/legacy/inference/quant/smoothquant/models/llama.py:187-200 | colossalai/legacy/inference/tensor_parallel/modeling/chatglm2.py:490-503 | colossalai/legacy/inference/tensor_parallel/modeling/llama.py:359-371 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/inference/hybridengine/modeling/llama.py:439\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/hybridengine/modeling/llama.py"},"region":{"startLine":439}}}],"partialFingerprints":{"codehealthFindingId/v1":"6546b189c89767ea97af6e848f7b222bd20eca47b2cc27021be26540e92e5f90"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 4): colossalai/legacy/moe/openmoe/model/openmoe_policy.py:93-106 | colossalai/shardformer/policies/_mixtral_tf4.py:295-308 | colossalai/shardformer/policies/_mixtral_tf5.py:322-335 | colossalai/shardformer/policies/deepseek.py:305-318 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 4 times. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/shardformer/policies/_mixtral_tf4.py:294\u0060 calls \u0060NotImplementedError\u0060 and \u0060colossalai/legacy/moe/openmoe/model/openmoe_policy.py:92\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/openmoe/model/openmoe_policy.py"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"f89fe49ccce1a664549dcff0359d40df9acd86c5fe4f4b14d2900d0ef56a309e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 4): colossalai/shardformer/modeling/_mixtral_tf4.py:695-708 | colossalai/shardformer/modeling/_mixtral_tf5.py:1089-1102 | colossalai/shardformer/modeling/_qwen2_tf4.py:628-641 | colossalai/shardformer/modeling/_qwen3_tf4.py:620-633 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_mixtral_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_mixtral_tf5.py\u0060 as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 581 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_mixtral_tf4.py:695\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_mixtral_tf4.py"},"region":{"startLine":695}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c1eeb4b4d38cb01bdba4cdc52dc27d28146b74392d6de28c6873aae6b4ce3f3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201314 lines \u00D7 3): applications/Colossal-LLaMA/dataset/prepare_pretrain_dataset.py:125-138 | applications/Colossal-LLaMA/dataset/prepare_sft_dataset.py:135-145 | applications/ColossalChat/examples/data_preparation_scripts/prepare_dataset.py:256-268 \u2014 before extracting anything, compare \u0060applications/Colossal-LLaMA/dataset/prepare_pretrain_dataset.py\u0060 and \u0060applications/Colossal-LLaMA/dataset/prepare_sft_dataset.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 116 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/Colossal-LLaMA/dataset/prepare_pretrain_dataset.py:125\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/dataset/prepare_pretrain_dataset.py"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"705f0b4eab065b7c277cc7c4c691e763941af8d895e13efe7b60eb88d2e60d6a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): colossalai/auto_parallel/offload/runtime.py:150-163 | colossalai/auto_parallel/passes/runtime_apply_pass.py:201-214 | colossalai/auto_parallel/passes/runtime_preparation_pass.py:182-195 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/offload/runtime.py"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"53fadeccd2fa74b8dd9ae8cb9cee68574f77bceca3f7c6d3474465be73e49aa7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 3): colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py:466-478 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py:485-497 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/embedding_generator.py:209-222 \u2014 before extracting anything, compare \u0060colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py\u0060 and \u0060colossalai/auto_parallel/tensor_shard/node_handler/strategy/embedding_generator.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 143 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py:466\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py"},"region":{"startLine":466}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2097d47ca420d24a878c6b70c9f1d615685b4d73f9a53c2cbf96da6f4e4db80"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): colossalai/auto_parallel/tensor_shard/solver/strategies_constructor.py:128-141 | colossalai/auto_parallel/tensor_shard/solver/strategies_constructor.py:143-156 | colossalai/auto_parallel/tensor_shard/solver/strategies_constructor.py:158-171 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/auto_parallel/tensor_shard/solver/strategies_constructor.py:126\u0060 calls \u0060get_submodule\u0060 and \u0060colossalai/auto_parallel/tensor_shard/solver/strategies_constructor.py:142\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/solver/strategies_constructor.py"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b882d3a14b945b8c89eac46c84f47bf8eee67f25b068c813297b3827845ffcb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): colossalai/kernel/triton/flash_decoding.py:485-498 | colossalai/kernel/triton/kvcache_copy.py:278-291 | colossalai/kernel/triton/no_pad_rotary_embedding.py:640-653 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/kernel/triton/kvcache_copy.py:275\u0060 calls \u0060stride\u0060 and \u0060colossalai/kernel/triton/flash_decoding.py:484\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/flash_decoding.py"},"region":{"startLine":485}}}],"partialFingerprints":{"codehealthFindingId/v1":"77d9f984e1418d6653a39f6fa81867755b273dec9ecee8b3536bafbd4b14858c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201314 lines \u00D7 3): colossalai/legacy/inference/hybridengine/modeling/llama.py:243-256 | colossalai/legacy/inference/tensor_parallel/modeling/chatglm2.py:132-143 | colossalai/legacy/inference/tensor_parallel/modeling/llama.py:152-165 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/hybridengine/modeling/llama.py"},"region":{"startLine":243}}}],"partialFingerprints":{"codehealthFindingId/v1":"df538f5a47662d6a54b81af35c1f42447f07dbdd06f78b0bab60d7f51ceb80ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201314 lines \u00D7 3): colossalai/legacy/inference/quant/smoothquant/models/llama.py:574-587 | colossalai/legacy/inference/tensor_parallel/modeling/bloom.py:99-110 | colossalai/legacy/moe/openmoe/model/modeling_openmoe.py:720-733 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/inference/quant/smoothquant/models/llama.py:574\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/quant/smoothquant/models/llama.py"},"region":{"startLine":574}}}],"partialFingerprints":{"codehealthFindingId/v1":"3759cbd16e6b1c573e0e594731146e7527f62cc730204c734c51fe09ba7da471"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): colossalai/legacy/nn/layer/parallel_2d/_operation.py:336-349 | colossalai/legacy/nn/layer/parallel_2d/_operation.py:494-507 | colossalai/legacy/nn/layer/parallel_2d/_operation.py:651-664 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/nn/layer/parallel_2d/_operation.py:336\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2d/_operation.py"},"region":{"startLine":336}}}],"partialFingerprints":{"codehealthFindingId/v1":"909751c987136e9774e9fa455aa1d4f54348ec8ae35eff850fdc13f0e33ae8a5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): colossalai/legacy/nn/layer/parallel_2d/layers.py:909-922 | colossalai/legacy/nn/layer/parallel_2p5d/layers.py:924-937 | colossalai/legacy/nn/layer/parallel_3d/layers.py:390-403 \u2014 \u0060colossalai/legacy/nn/layer/parallel_2d/layers.py\u0060 and \u0060colossalai/legacy/nn/layer/parallel_2p5d/layers.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 18 separate duplicated blocks between them, totalling at least 219 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/nn/layer/parallel_2d/layers.py:909\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2d/layers.py"},"region":{"startLine":909}}}],"partialFingerprints":{"codehealthFindingId/v1":"847e823c0d17cc9830d7a9bec76d666fd8cb9e80b517ba9129ec4a10468d9d6f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): colossalai/legacy/zero/sharded_model/sharded_model_v2.py:568-581 | colossalai/shardformer/layer/parallel_module.py:164-177 | colossalai/shardformer/layer/parallel_module.py:342-355 \u2014 before extracting anything, compare \u0060colossalai/legacy/zero/sharded_model/sharded_model_v2.py\u0060 and \u0060colossalai/shardformer/layer/parallel_module.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 96 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/zero/sharded_model/sharded_model_v2.py"},"region":{"startLine":568}}}],"partialFingerprints":{"codehealthFindingId/v1":"78cf88786f6e24c65addb9ab5a2992b995235759cbd2d7d9297e87ea5ea81774"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 3): colossalai/shardformer/modeling/_llama_tf4.py:110-122 | colossalai/shardformer/modeling/_llama_tf5.py:152-164 | colossalai/shardformer/modeling/command.py:102-115 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_llama_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_llama_tf5.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 483 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060colossalai/shardformer/modeling/_llama_tf4.py:124\u0060 calls \u0060warning_once\u0060 and \u0060colossalai/shardformer/modeling/_llama_tf5.py:168\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_llama_tf4.py"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd280b1bf0956eda6e02cd6e535521ce9fda0e0adf00a422ade977352014eb6b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 2): applications/Colossal-LLaMA/colossal_llama/utils/stream_chat_patch.py:186-198 | colossalai/shardformer/modeling/chatglm2_6b/modeling_chatglm.py:1310-1323 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/Colossal-LLaMA/colossal_llama/utils/stream_chat_patch.py:186\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/colossal_llama/utils/stream_chat_patch.py"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"70783ee3e18bcd6f4159480ccbd468910faf9ead3cf23c1511b0a6c3244909fa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): applications/ColossalChat/coati/distributed/grpo_consumer.py:144-157 | applications/ColossalChat/coati/distributed/zero_bubble/grpo_consumer.py:135-148 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/distributed/grpo_consumer.py\u0060 and \u0060applications/ColossalChat/coati/distributed/zero_bubble/grpo_consumer.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 407 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/grpo_consumer.py"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcec8b6e0f2cb627df2b10f323dbe21a977c8cd25999f6a0cc86e5b2d6506d1b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 2): applications/ColossalChat/coati/models/generation.py:74-86 | applications/ColossalChat/examples/inference/web_chatbot/utils.py:13-26 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/examples/inference/web_chatbot/utils.py:13\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/models/generation.py"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd28463b793120f4d4245ebcac40a2844459ac07de09c43c660763cd64cbd01c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): applications/ColossalEval/colossal_eval/dataset/safetybench_en.py:39-52 | applications/ColossalEval/colossal_eval/dataset/safetybench_zh.py:39-52 \u2014 before extracting anything, compare \u0060applications/ColossalEval/colossal_eval/dataset/safetybench_en.py\u0060 and \u0060applications/ColossalEval/colossal_eval/dataset/safetybench_zh.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/dataset/safetybench_en.py"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4e8d1f28a09420d5c4c01b1857441975eb5297a4b1318183531b497f73b5bed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): colossalai/_analyzer/_subclasses/_meta_registration.py:39-52 | colossalai/fx/_meta_regist_12.py:19-32 \u2014 before extracting anything, compare \u0060colossalai/_analyzer/_subclasses/_meta_registration.py\u0060 and \u0060colossalai/fx/_meta_regist_12.py\u0060 as WHOLE FILES: 83% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060colossalai/_analyzer/_subclasses/_meta_registration.py:55\u0060 calls \u0060parse\u0060 and \u0060colossalai/fx/_meta_regist_12.py:37\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/_subclasses/_meta_registration.py"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"01662a61f935ff94c203fa4c147f63a90cc50013b0355e15735541d5db9464cd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): colossalai/_analyzer/_subclasses/flop_tensor.py:260-273 | colossalai/fx/profiler/opcount.py:50-63 \u2014 before extracting anything, compare \u0060colossalai/_analyzer/_subclasses/flop_tensor.py\u0060 and \u0060colossalai/fx/profiler/opcount.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 153 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/_subclasses/flop_tensor.py"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"b382af27e69b5232d3a2ec686ada7ddd9ef2956d62298bc9e40abb617436ece1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): colossalai/auto_parallel/tensor_shard/node_handler/strategy/matmul_strategy_generator.py:681-694 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/matmul_strategy_generator.py:829-842 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/matmul_strategy_generator.py"},"region":{"startLine":681}}}],"partialFingerprints":{"codehealthFindingId/v1":"60e45aaeecc7320309490112e541b9ec514b8593820a3ff0b3354ece8faa9227"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): colossalai/booster/plugin/hybrid_parallel_plugin.py:710-723 | colossalai/booster/plugin/moe_hybrid_parallel_plugin.py:79-92 \u2014 before extracting anything, compare \u0060colossalai/booster/plugin/hybrid_parallel_plugin.py\u0060 and \u0060colossalai/booster/plugin/moe_hybrid_parallel_plugin.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 100 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/booster/plugin/hybrid_parallel_plugin.py:710\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/plugin/hybrid_parallel_plugin.py"},"region":{"startLine":710}}}],"partialFingerprints":{"codehealthFindingId/v1":"c82bbd368a5cf0c29d58de2f0836794ee8d749df0074ee23f7b055475981b95a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 2): colossalai/booster/plugin/hybrid_parallel_plugin.py:1006-1018 | colossalai/booster/plugin/moe_hybrid_parallel_plugin.py:240-253 \u2014 before extracting anything, compare \u0060colossalai/booster/plugin/hybrid_parallel_plugin.py\u0060 and \u0060colossalai/booster/plugin/moe_hybrid_parallel_plugin.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 100 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/booster/plugin/hybrid_parallel_plugin.py:1006\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/plugin/hybrid_parallel_plugin.py"},"region":{"startLine":1006}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd1e0f9f5bd177bf06efc7846f66087d7112be9a9a46b2a586131cc78ea03356"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): colossalai/booster/plugin/low_level_zero_plugin.py:266-279 | colossalai/checkpoint_io/general_checkpoint_io.py:85-98 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/plugin/low_level_zero_plugin.py"},"region":{"startLine":266}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b4d446de79dd32f04df8e52e63585b045a00ae1c2acb23107cd4a78671fbdee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201314 lines \u00D7 2): colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py:216-229 | colossalai/checkpoint_io/moe_checkpoint.py:393-404 \u2014 before extracting anything, compare \u0060colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py\u0060 and \u0060colossalai/checkpoint_io/moe_checkpoint.py\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 249 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"36a54c5f4deccea74b43b3111d4d7551ab3b6f3963b28a4128485688304bd43e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py:393-406 | colossalai/checkpoint_io/moe_checkpoint.py:275-288 \u2014 before extracting anything, compare \u0060colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py\u0060 and \u0060colossalai/checkpoint_io/moe_checkpoint.py\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 249 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: \u0060CheckpointIndexFile\u0060 names \u0060.index_file\u0060 in one and \u0060colossalai.checkpoint_io\u0060 in another \u2014 different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":393}}}],"partialFingerprints":{"codehealthFindingId/v1":"04cc04226516eccb98e139e7b3643bef8f2346ed99c45ba225f7042e48da895c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py:501-514 | colossalai/inference/core/plugin.py:116-129 \u2014 before extracting anything, compare \u0060colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py\u0060 and \u0060colossalai/inference/core/plugin.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":501}}}],"partialFingerprints":{"codehealthFindingId/v1":"3229e10f6f519be2b857aa412e001840d0aa8e813c37c17028e212b5a38d3e69"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): colossalai/fx/tracer/experimental.py:266-279 | colossalai/fx/tracer/experimental.py:474-487 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/experimental.py"},"region":{"startLine":266}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e385ae53c748602db205f02b1967f37c7183d0c7f61d8ee9a5c82094208c0e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): colossalai/inference/modeling/layers/distrifusion.py:452-465 | colossalai/inference/modeling/layers/distrifusion.py:608-621 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/modeling/layers/distrifusion.py"},"region":{"startLine":452}}}],"partialFingerprints":{"codehealthFindingId/v1":"3379ecb7162f963d025b7aa3cc21501e167494708a24b8751d57c83925a40a68"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): colossalai/kernel/triton/flash_decoding.py:481-494 | colossalai/kernel/triton/kvcache_copy.py:186-199 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/flash_decoding.py"},"region":{"startLine":481}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f3e9e62ca5783caa4036c0e23fed345f81d8188a9b51a874195687d75bef946"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): colossalai/legacy/engine/schedule/_pipeline_schedule.py:55-68 | colossalai/legacy/engine/schedule/_pipeline_schedule_v2.py:20-33 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/engine/schedule/_pipeline_schedule.py"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e87eef17e85e83bd51f395d4f28c4afa4367051f0a6586977c79eaf1eb2665d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): colossalai/legacy/inference/quant/smoothquant/models/llama.py:529-542 | colossalai/legacy/inference/tensor_parallel/modeling/chatglm2.py:44-57 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/inference/quant/smoothquant/models/llama.py:529\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/quant/smoothquant/models/llama.py"},"region":{"startLine":529}}}],"partialFingerprints":{"codehealthFindingId/v1":"99b9ee12a8599615e9a0487fd4532b53aef35390923689562140bcd501f32885"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201314 lines \u00D7 2): colossalai/legacy/inference/tensor_parallel/modeling/bloom.py:314-327 | colossalai/shardformer/modeling/falcon.py:407-418 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/shardformer/modeling/falcon.py:406\u0060 calls \u0060is_last_stage\u0060 and \u0060colossalai/legacy/inference/tensor_parallel/modeling/bloom.py:313\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/tensor_parallel/modeling/bloom.py"},"region":{"startLine":314}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cf8d56217d7e7608b13e717ff16003a500caad73767b395624ce9f4796b3d21"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): colossalai/legacy/moe/openmoe/model/modeling_openmoe.py:958-971 | colossalai/legacy/moe/openmoe/model/openmoe_policy.py:527-540 \u2014 before extracting anything, compare \u0060colossalai/legacy/moe/openmoe/model/modeling_openmoe.py\u0060 and \u0060colossalai/legacy/moe/openmoe/model/openmoe_policy.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/openmoe/model/modeling_openmoe.py"},"region":{"startLine":958}}}],"partialFingerprints":{"codehealthFindingId/v1":"523ac8a038ad1a6d4aa5abbf55304e3fb88fae215a63d054805c17db8ae73618"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_2d/layers.py:686-699 | colossalai/legacy/nn/layer/parallel_2d/layers.py:832-845 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/nn/layer/parallel_2d/layers.py:686\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2d/layers.py"},"region":{"startLine":686}}}],"partialFingerprints":{"codehealthFindingId/v1":"c011e89ad04231d2f44f2d5e2e642ba8544b30b87170d7d485fd3272a81c0794"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_2d/layers.py:763-776 | colossalai/legacy/nn/layer/parallel_2p5d/layers.py:777-790 \u2014 \u0060colossalai/legacy/nn/layer/parallel_2d/layers.py\u0060 and \u0060colossalai/legacy/nn/layer/parallel_2p5d/layers.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 18 separate duplicated blocks between them, totalling at least 219 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2d/layers.py"},"region":{"startLine":763}}}],"partialFingerprints":{"codehealthFindingId/v1":"f49fd386b1166068a9383a72c74b03bbd0594bcc4731fd82a872d877f5f4ed21"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_2p5d/layers.py:699-712 | colossalai/legacy/nn/layer/parallel_2p5d/layers.py:842-855 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/nn/layer/parallel_2p5d/layers.py:699\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2p5d/layers.py"},"region":{"startLine":699}}}],"partialFingerprints":{"codehealthFindingId/v1":"b310fdc612b1d18e6e310b81dd874f20dc8bc32352a19084e73bded96ced7697"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 2): colossalai/pipeline/p2p.py:493-505 | colossalai/pipeline/p2p.py:522-535 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/pipeline/p2p.py:522\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/pipeline/p2p.py"},"region":{"startLine":493}}}],"partialFingerprints":{"codehealthFindingId/v1":"26019ca585e1d5aa7384ff2430fc4c69892e2ae28cd1b660fb575fe3dec67ccd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): colossalai/shardformer/layer/_operation.py:102-115 | colossalai/shardformer/layer/_operation.py:192-205 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/_operation.py"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"405ddf1f785647953d994a67405a29fa6cc1a3120255b743638612aa15b659e9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201314 lines \u00D7 2): colossalai/shardformer/layer/_operation.py:202-215 | colossalai/shardformer/layer/_operation.py:371-382 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/layer/_operation.py:202\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/_operation.py"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa73fe6576cf1d9a3ab987abda9869d5526bf356e3183e6a3825cd7941bca3f4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 2): colossalai/shardformer/layer/linear.py:461-474 | colossalai/shardformer/layer/qkv_fused_linear.py:499-511 \u2014 before extracting anything, compare \u0060colossalai/shardformer/layer/linear.py\u0060 and \u0060colossalai/shardformer/layer/qkv_fused_linear.py\u0060 as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 261 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060colossalai/shardformer/layer/linear.py:477\u0060 calls \u0060fork_rng\u0060 and \u0060colossalai/shardformer/layer/qkv_fused_linear.py:515\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/linear.py"},"region":{"startLine":461}}}],"partialFingerprints":{"codehealthFindingId/v1":"381d059f6b9ae4580d02dc9431765bb1c64c3d82c043096a6b86bb4cf9031b7f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): colossalai/shardformer/layer/parallel_module.py:109-122 | colossalai/shardformer/layer/parallel_module.py:284-297 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060colossalai/shardformer/layer/parallel_module.py:299\u0060 calls \u0060is_padded_tensor\u0060, \u0060to_padded_tensor\u0060 and \u0060colossalai/shardformer/layer/parallel_module.py:124\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/parallel_module.py"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c315b6a2677a89ca123d9eb0935e20a51e36fc1ca0679f6f5a15085efced6ab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): colossalai/shardformer/modeling/_deepseek_v3_tf5.py:42-55 | colossalai/shardformer/modeling/_mixtral_tf5.py:345-358 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_deepseek_v3_tf5.py\u0060 and \u0060colossalai/shardformer/modeling/_mixtral_tf5.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_deepseek_v3_tf5.py"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"eeb2391ab011e7c8067cab5a7ea9c48b48f50998b6079aced283f1291a0a24ac"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): colossalai/shardformer/modeling/_mixtral_tf4.py:64-77 | colossalai/shardformer/modeling/deepseek.py:78-91 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_mixtral_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/deepseek.py\u0060 as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 427 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/shardformer/modeling/_mixtral_tf4.py:62\u0060 calls \u0060ValueError\u0060 and \u0060colossalai/shardformer/modeling/deepseek.py:77\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_mixtral_tf4.py"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"820065ea69171f54b39e849a935e9910d67db6cc4374e2c42f9f48ef000d7c1f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 2): colossalai/shardformer/modeling/_whisper_tf4.py:762-774 | colossalai/shardformer/modeling/opt.py:210-223 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_whisper_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/opt.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 105 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_whisper_tf4.py"},"region":{"startLine":762}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f3d670d52ed1809eb05ba110e8d862ab95cf01143a338401144b4618f2b77e2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): colossalai/shardformer/modeling/bloom.py:794-807 | colossalai/shardformer/modeling/bloom.py:917-930 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/bloom.py:794\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/bloom.py"},"region":{"startLine":794}}}],"partialFingerprints":{"codehealthFindingId/v1":"db88d6044d403e0844dc0a0525a586ea4216b90f775ccf7cd07546572b81b7fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): colossalai/shardformer/policies/_deepseek_v3_tf4.py:87-100 | colossalai/shardformer/policies/_deepseek_v3_tf5.py:92-105 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_deepseek_v3_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_deepseek_v3_tf5.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_deepseek_v3_tf4.py"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"36eb7119fc3fbd0741e430a87079ce9055c8d2473c354b7667f61554fbea2dc0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201314 lines \u00D7 2): colossalai/shardformer/policies/gpt2.py:650-663 | colossalai/shardformer/policies/gptj.py:442-452 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/gpt2.py\u0060 and \u0060colossalai/shardformer/policies/gptj.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/gpt2.py"},"region":{"startLine":650}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e16cdd58005c8d60c8814aa8ffe9541f7358925039c22137a534cce7bf370e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 17): colossalai/shardformer/modeling/_bert_tf4.py:515-528 | colossalai/shardformer/modeling/_bert_tf4.py:622-635 | colossalai/shardformer/modeling/_bert_tf4.py:698-711 | colossalai/shardformer/modeling/_bert_tf4.py:790-803 | colossalai/shardformer/modeling/_bert_tf4.py:882-894 | colossalai/shardformer/modeling/_bert_tf4.py:964-976 | colossalai/shardformer/modeling/_bert_tf5.py:528-541 | colossalai/shardformer/modeling/_bert_tf5.py:635-648 | colossalai/shardformer/modeling/_bert_tf5.py:711-724 | colossalai/shardformer/modeling/_bert_tf5.py:803-816 | colossalai/shardformer/modeling/_bert_tf5.py:895-907 | colossalai/shardformer/modeling/_bert_tf5.py:977-989 | colossalai/shardformer/modeling/bloom.py:674-687 | colossalai/shardformer/modeling/falcon.py:689-703 | colossalai/shardformer/modeling/opt.py:390-403 | colossalai/shardformer/modeling/opt.py:490-502 | colossalai/shardformer/modeling/t5.py:638-650 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 45 separate duplicated blocks between them, totalling at least 882 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_bert_tf4.py:515\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060colossalai/shardformer/modeling/_bert_tf4.py:897\u0060 calls \u0060view\u0060 and \u0060colossalai/shardformer/modeling/_bert_tf4.py:716\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":515}}}],"partialFingerprints":{"codehealthFindingId/v1":"95ef331dd5b83c6016dcc9cd764118ea7a4c75d033607c3a985907d40b6d1c9b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201313 lines \u00D7 11): colossalai/legacy/moe/openmoe/model/modeling_openmoe.py:977-987 | colossalai/shardformer/modeling/_deepseek_v3_tf4.py:360-370 | colossalai/shardformer/modeling/_deepseek_v3_tf5.py:398-408 | colossalai/shardformer/modeling/_llama_tf4.py:361-371 | colossalai/shardformer/modeling/_llama_tf5.py:403-413 | colossalai/shardformer/modeling/_qwen2_tf4.py:352-362 | colossalai/shardformer/modeling/_qwen2_tf5.py:260-272 | colossalai/shardformer/modeling/_qwen3_tf4.py:350-360 | colossalai/shardformer/modeling/_qwen3_tf5.py:261-273 | colossalai/shardformer/modeling/command.py:332-342 | colossalai/shardformer/modeling/opt.py:341-353 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 11 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 11 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_qwen2_tf5.py:260\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/openmoe/model/modeling_openmoe.py"},"region":{"startLine":977}}}],"partialFingerprints":{"codehealthFindingId/v1":"28b46ceadde4608c84a4fa671e97467296446e12a42a047202b46a9d47b6a37d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 8): colossalai/shardformer/modeling/_llama_tf4.py:473-484 | colossalai/shardformer/modeling/_llama_tf5.py:515-526 | colossalai/shardformer/modeling/_qwen2_tf4.py:463-474 | colossalai/shardformer/modeling/bloom.py:519-530 | colossalai/shardformer/modeling/falcon.py:548-559 | colossalai/shardformer/modeling/gpt2.py:795-806 | colossalai/shardformer/modeling/gptj.py:459-470 | colossalai/shardformer/modeling/opt.py:441-453 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_llama_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_llama_tf5.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 483 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_llama_tf4.py:473\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_llama_tf4.py"},"region":{"startLine":473}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8745567892d0b89b164c5b64583a1d90b6c5c127025e5e00669765fd0040069"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 7): colossalai/kernel/triton/context_attn_unpad.py:618-630 | colossalai/kernel/triton/context_attn_unpad.py:658-670 | colossalai/kernel/triton/context_attn_unpad.py:694-706 | colossalai/kernel/triton/flash_decoding.py:430-442 | colossalai/kernel/triton/flash_decoding.py:513-525 | colossalai/kernel/triton/kvcache_copy.py:269-281 | colossalai/kernel/triton/no_pad_rotary_embedding.py:630-642 \u2014 there are 7 copies across 4 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 7 sites; resolving a subset leaves the remainder to drift apart. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060colossalai/kernel/triton/context_attn_unpad.py:632\u0060 calls \u0060stride\u0060 and \u0060colossalai/kernel/triton/flash_decoding.py:527\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/context_attn_unpad.py"},"region":{"startLine":618}}}],"partialFingerprints":{"codehealthFindingId/v1":"564c20464c8e61e36b46be43db1a06d41125e8573c69bb22a18d876d2f1df5aa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 7): colossalai/legacy/moe/openmoe/model/openmoe_policy.py:259-270 | colossalai/shardformer/modeling/_mixtral_tf4.py:237-249 | colossalai/shardformer/modeling/_mixtral_tf5.py:581-593 | colossalai/shardformer/modeling/_qwen2_tf4.py:68-79 | colossalai/shardformer/modeling/_qwen3_tf4.py:68-79 | colossalai/shardformer/modeling/deepseek.py:334-346 | colossalai/shardformer/modeling/falcon.py:222-233 \u2014 before extracting anything, compare \u0060colossalai/legacy/moe/openmoe/model/openmoe_policy.py\u0060 and \u0060colossalai/shardformer/modeling/_mixtral_tf4.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 130 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/openmoe/model/openmoe_policy.py"},"region":{"startLine":259}}}],"partialFingerprints":{"codehealthFindingId/v1":"45fc9bb2e753db4d9c29a31e9f59ed8ee1783a998195ce3c5d30d6ed2d1a5f7e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 7): colossalai/shardformer/layer/linear.py:96-107 | colossalai/shardformer/layer/linear.py:251-262 | colossalai/shardformer/layer/linear.py:446-458 | colossalai/shardformer/layer/qkv_fused_linear.py:692-704 | colossalai/shardformer/layer/qkv_fused_linear.py:862-874 | colossalai/shardformer/layer/qkv_fused_linear.py:1070-1082 | colossalai/shardformer/layer/qkv_fused_linear.py:1267-1279 \u2014 before extracting anything, compare \u0060colossalai/shardformer/layer/linear.py\u0060 and \u0060colossalai/shardformer/layer/qkv_fused_linear.py\u0060 as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 261 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060colossalai/shardformer/layer/linear.py:264\u0060 calls \u0060is_distributed_tensor\u0060, \u0060shard_rowwise\u0060, \u0060sharded_tensor_to_existing_param\u0060 and \u0060colossalai/shardformer/layer/linear.py:109\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/linear.py"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b4c9bf9ae810f712039830a9d7386fcd15b7937b96e29e2a4357793b1ee7d78"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201313 lines \u00D7 7): colossalai/shardformer/modeling/_mixtral_tf4.py:568-580 | colossalai/shardformer/modeling/_qwen2_tf4.py:499-509 | colossalai/shardformer/modeling/_qwen2_tf5.py:397-407 | colossalai/shardformer/modeling/_qwen3_tf4.py:485-495 | colossalai/shardformer/modeling/_qwen3_tf5.py:398-408 | colossalai/shardformer/modeling/command.py:364-376 | colossalai/shardformer/modeling/deepseek.py:618-630 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_mixtral_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_qwen2_tf4.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 172 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_mixtral_tf4.py"},"region":{"startLine":568}}}],"partialFingerprints":{"codehealthFindingId/v1":"8766d1fb0640a3bda343a5a978c2dbbe3d2ce819af3e4d92f3326e5021533e04"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 6): applications/ColossalChat/coati/trainer/dpo.py:279-290 | applications/ColossalChat/coati/trainer/dpo.py:562-573 | applications/ColossalChat/coati/trainer/kto.py:135-146 | applications/ColossalChat/coati/trainer/kto.py:284-296 | applications/ColossalChat/coati/trainer/orpo.py:131-143 | applications/ColossalChat/coati/trainer/orpo.py:270-282 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/trainer/dpo.py\u0060 and \u0060applications/ColossalChat/coati/trainer/kto.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/coati/trainer/dpo.py:279\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/dpo.py"},"region":{"startLine":279}}}],"partialFingerprints":{"codehealthFindingId/v1":"029522e16507e73a786aaf6464f830d7f5f711b836a7d3c1bb2be59610e5ff7e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 5): applications/ColossalChat/coati/trainer/grpo.py:179-191 | applications/ColossalChat/coati/trainer/kto.py:103-115 | applications/ColossalChat/coati/trainer/orpo.py:93-105 | applications/ColossalChat/coati/trainer/ppo.py:170-182 | applications/ColossalChat/coati/trainer/rm.py:91-103 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/trainer/grpo.py\u0060 and \u0060applications/ColossalChat/coati/trainer/ppo.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 176 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/grpo.py"},"region":{"startLine":179}}}],"partialFingerprints":{"codehealthFindingId/v1":"7364d1d98812b50ca7c75797b85ac8f4634b4bf763e9e4f366ae59811098e791"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 5): colossalai/auto_parallel/tensor_shard/node_handler/strategy/getitem_generator.py:32-44 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/reshape_generator.py:36-48 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/softmax_generator.py:36-48 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/sum_generator.py:33-45 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/unary_elementwise_generator.py:24-36 \u2014 before extracting anything, compare \u0060colossalai/auto_parallel/tensor_shard/node_handler/strategy/getitem_generator.py\u0060 and \u0060colossalai/auto_parallel/tensor_shard/node_handler/strategy/reshape_generator.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/getitem_generator.py"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"8714aea44dfd2f5c809c86412330fe18f4173cecdb3c77ba8359c8211cbfe505"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 4): colossalai/inference/utils.py:30-42 | colossalai/legacy/inference/hybridengine/modeling/_utils.py:34-46 | colossalai/legacy/inference/tensor_parallel/modeling/_utils.py:34-46 | colossalai/legacy/inference/tensor_parallel/modeling/chatglm2.py:35-46 \u2014 before extracting anything, compare \u0060colossalai/legacy/inference/hybridengine/modeling/_utils.py\u0060 and \u0060colossalai/legacy/inference/tensor_parallel/modeling/_utils.py\u0060 as WHOLE FILES: 100% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/utils.py"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f46bbcb7e46e4638179fcbac1a6752578f81fda4c9e8302242736caacc4fee8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): applications/Colossal-LLaMA/dataset/prepare_pretrain_dataset.py:63-75 | applications/Colossal-LLaMA/dataset/prepare_sft_dataset.py:61-73 | applications/ColossalChat/examples/data_preparation_scripts/prepare_dataset.py:120-132 \u2014 before extracting anything, compare \u0060applications/Colossal-LLaMA/dataset/prepare_pretrain_dataset.py\u0060 and \u0060applications/Colossal-LLaMA/dataset/prepare_sft_dataset.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 116 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/dataset/prepare_pretrain_dataset.py"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fa57bf496ac835da6bf9b0eacab274f6468e4f3cbfc85db68d5e163761cd8e6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): applications/ColossalChat/coati/trainer/kto.py:246-258 | applications/ColossalChat/coati/trainer/orpo.py:221-233 | applications/ColossalChat/coati/trainer/rm.py:181-193 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/trainer/kto.py\u0060 and \u0060applications/ColossalChat/coati/trainer/orpo.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 138 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/coati/trainer/kto.py:246\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/kto.py"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"b624b94436c525ba2594e85ba090aa136b65ae5fa2ac3e12e641c08ea45f9bc0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201313 lines \u00D7 3): colossalai/legacy/inference/tensor_parallel/modeling/chatglm2.py:203-213 | colossalai/shardformer/modeling/chatglm2_6b/modeling_chatglm.py:1116-1126 | colossalai/shardformer/modeling/gptj.py:339-351 \u2014 before extracting anything, compare \u0060colossalai/legacy/inference/tensor_parallel/modeling/chatglm2.py\u0060 and \u0060colossalai/shardformer/modeling/chatglm2_6b/modeling_chatglm.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 176 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/inference/tensor_parallel/modeling/chatglm2.py:203\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/tensor_parallel/modeling/chatglm2.py"},"region":{"startLine":203}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb151771154786ed08171b2b6eaca300e5336d3635e1945a4d13b4243d5950b0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): colossalai/legacy/nn/layer/parallel_2d/layers.py:113-125 | colossalai/legacy/nn/layer/parallel_2p5d/layers.py:115-127 | colossalai/legacy/nn/layer/parallel_3d/layers.py:250-262 \u2014 \u0060colossalai/legacy/nn/layer/parallel_2d/layers.py\u0060 and \u0060colossalai/legacy/nn/layer/parallel_2p5d/layers.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 18 separate duplicated blocks between them, totalling at least 219 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2d/layers.py"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc84ab7ffd3e3a2945c942514ea094886ed508331f2c167ab4547d56bd4df387"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201313 lines \u00D7 3): colossalai/shardformer/modeling/_llama_tf4.py:62-73 | colossalai/shardformer/modeling/command.py:58-70 | colossalai/shardformer/modeling/falcon.py:208-217 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_llama_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/command.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 210 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060colossalai/shardformer/modeling/falcon.py:219\u0060 calls \u0060warning_once\u0060 and \u0060colossalai/shardformer/modeling/command.py:73\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_llama_tf4.py"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c644113089bd3ab2ccdbefebd6570571e3b009b7027c6bd0af9c02ab39f9eff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 3): colossalai/shardformer/modeling/_mixtral_tf4.py:129-141 | colossalai/shardformer/modeling/_mixtral_tf5.py:477-489 | colossalai/shardformer/modeling/deepseek.py:163-174 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_mixtral_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_mixtral_tf5.py\u0060 as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 581 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_mixtral_tf4.py"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"1320b2deb47b006655b0bad5a31e1d76efd6470cf72b06e5380ba256e080ca8c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 3): colossalai/shardformer/modeling/_mixtral_tf4.py:155-167 | colossalai/shardformer/modeling/_mixtral_tf5.py:500-512 | colossalai/shardformer/modeling/deepseek.py:185-196 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_mixtral_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_mixtral_tf5.py\u0060 as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 581 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_mixtral_tf4.py"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"faf5f67f2ed2130ef78d6b6f1eb4a9517a8c0f8a4e5a9bf47cd79ad2599ec44e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): colossalai/shardformer/policies/gpt2.py:447-459 | colossalai/shardformer/policies/gpt2.py:532-544 | colossalai/shardformer/policies/gptj.py:408-420 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/gpt2.py\u0060 and \u0060colossalai/shardformer/policies/gptj.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/gpt2.py"},"region":{"startLine":447}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b1b07c6f294f70507118cc8a431532cc70e0ffad634058f0f557e659a5587d7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): .github/workflows/scripts/generate_leaderboard_and_send_to_lark.py:281-292 | .github/workflows/scripts/generate_leaderboard_and_send_to_lark.py:299-311 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":".github/workflows/scripts/generate_leaderboard_and_send_to_lark.py"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"5649f543cfedeeb3f2615955a9e541c816c9f4f85ffcb3566af1a002f9454c3d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): applications/Colossal-LLaMA/dataset/prepare_pretrain_dataset.py:109-121 | applications/ColossalChat/examples/data_preparation_scripts/prepare_dataset.py:242-254 \u2014 before extracting anything, compare \u0060applications/Colossal-LLaMA/dataset/prepare_pretrain_dataset.py\u0060 and \u0060applications/ColossalChat/examples/data_preparation_scripts/prepare_dataset.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/Colossal-LLaMA/dataset/prepare_pretrain_dataset.py:109\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/dataset/prepare_pretrain_dataset.py"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"82d58d1cca020ca7641d69cccb344a97355bc8135f35a3bff0b66cb1e59518a0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): applications/ColossalChat/coati/distributed/consumer.py:238-249 | applications/ColossalChat/coati/distributed/zero_bubble/consumer.py:193-205 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/distributed/consumer.py\u0060 and \u0060applications/ColossalChat/coati/distributed/zero_bubble/consumer.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060applications/ColossalChat/coati/distributed/zero_bubble/consumer.py:207\u0060 calls \u0060update\u0060 and \u0060applications/ColossalChat/coati/distributed/consumer.py:250\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/consumer.py"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"314f5798790168b4d945fb302768da135735e676c1a20a3c5addf55bd7f99bf6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): applications/ColossalChat/coati/distributed/launch.py:136-148 | applications/ColossalChat/coati/distributed/launch.py:177-189 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/coati/distributed/launch.py:136\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/launch.py"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba32a3241875cc95125623f8c53979d6127261dd330ad4c1724d9d5875359038"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201313 lines \u00D7 2): applications/ColossalChat/coati/trainer/dpo.py:576-588 | applications/ColossalChat/coati/trainer/dpo.py:590-600 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/coati/trainer/dpo.py:576\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/dpo.py"},"region":{"startLine":576}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2f1612403f303db3823fab411dbc2c5fde5699586cdfaa2a4afb51fc853def7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): applications/ColossalEval/colossal_eval/models/huggingface.py:101-113 | applications/ColossalEval/colossal_eval/models/vllm.py:163-175 \u2014 before extracting anything, compare \u0060applications/ColossalEval/colossal_eval/models/huggingface.py\u0060 and \u0060applications/ColossalEval/colossal_eval/models/vllm.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 157 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/models/huggingface.py"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"2cd465798cce9d92599444232ce6734453d0c2a88c35af97673a77d0a45e8461"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): colossalai/_analyzer/_subclasses/flop_tensor.py:345-357 | colossalai/fx/profiler/opcount.py:148-160 \u2014 before extracting anything, compare \u0060colossalai/_analyzer/_subclasses/flop_tensor.py\u0060 and \u0060colossalai/fx/profiler/opcount.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 153 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/_subclasses/flop_tensor.py"},"region":{"startLine":345}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f7f7eff46d03a2bc02e2c12ec236b1dd5dc192c8e7fe234af94a23d5ecdfe07"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): colossalai/_analyzer/_subclasses/meta_tensor.py:54-66 | colossalai/fx/profiler/tensor.py:33-45 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/_analyzer/_subclasses/meta_tensor.py:54\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/_subclasses/meta_tensor.py"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"770eb431305432ce13683e81951ddfb900c22fd3d550112fbc4b2453c0116727"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): colossalai/_analyzer/fx/node_util.py:24-36 | colossalai/fx/profiler/memory_utils.py:13-25 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/fx/node_util.py"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9f8a3a8a701e86f53a7d597d4333f094d777664bf8dda993c040c20e6557f1d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): colossalai/auto_parallel/tensor_shard/node_handler/split_handler.py:50-62 | colossalai/auto_parallel/tensor_shard/node_handler/sum_handler.py:69-81 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/split_handler.py"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"484cd57decf2abed508970e8f085e1a9a44302cdf9c9feb153a1aa4a4fcd4583"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): colossalai/auto_parallel/tensor_shard/node_handler/strategy/matmul_strategy_generator.py:589-601 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/matmul_strategy_generator.py:609-621 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/auto_parallel/tensor_shard/node_handler/strategy/matmul_strategy_generator.py:589\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/matmul_strategy_generator.py"},"region":{"startLine":589}}}],"partialFingerprints":{"codehealthFindingId/v1":"971572755b9276a5545c9dfacba82098ee715bdc261d50a1185f5874ca1493da"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): colossalai/booster/plugin/hybrid_parallel_plugin.py:1327-1339 | colossalai/booster/plugin/moe_hybrid_parallel_plugin.py:517-529 \u2014 before extracting anything, compare \u0060colossalai/booster/plugin/hybrid_parallel_plugin.py\u0060 and \u0060colossalai/booster/plugin/moe_hybrid_parallel_plugin.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 100 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/booster/plugin/hybrid_parallel_plugin.py:1327\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/plugin/hybrid_parallel_plugin.py"},"region":{"startLine":1327}}}],"partialFingerprints":{"codehealthFindingId/v1":"b87e32b153cf4941023f3f2926279bfdabc0701e5c1fffdf5e5a0094019aaac8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py:962-974 | colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py:990-1002 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":962}}}],"partialFingerprints":{"codehealthFindingId/v1":"31cb0bc4c066afccd6565b29d025ba0a0b12bc3608c6a6b8904f057be10099c7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py:1191-1203 | colossalai/checkpoint_io/moe_checkpoint.py:1019-1031 \u2014 before extracting anything, compare \u0060colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py\u0060 and \u0060colossalai/checkpoint_io/moe_checkpoint.py\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 249 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":1191}}}],"partialFingerprints":{"codehealthFindingId/v1":"64a1e313c9a68eb119826b3d1c5d86092d9971c0a4053f6a5a6a7756afbf1cf4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201313 lines \u00D7 2): colossalai/fx/tracer/meta_patch/patched_module/pooling.py:36-48 | colossalai/fx/tracer/meta_patch/patched_module/pooling.py:65-75 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060colossalai/fx/tracer/meta_patch/patched_module/pooling.py:77\u0060 calls \u0060floor\u0060 and \u0060colossalai/fx/tracer/meta_patch/patched_module/pooling.py:51\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/meta_patch/patched_module/pooling.py"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"64fe1d0864c2698ec10128bef3c8512dabc12050c6d196fb87f67a03986d0597"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): colossalai/inference/core/request_handler.py:190-202 | colossalai/inference/core/request_handler.py:204-216 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/inference/core/request_handler.py:190\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/core/request_handler.py"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"73e66eca05b40086aa3aaaca7aeb655698e8aaaabdf6624377157f17b0f0f06e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): colossalai/kernel/triton/context_attn_unpad.py:161-173 | colossalai/kernel/triton/context_attn_unpad.py:525-537 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/context_attn_unpad.py"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"73b616fe961c2c140a61b76ba4451764c6c6dd567ce196181e0c9744a740534d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201313 lines \u00D7 2): colossalai/legacy/inference/quant/smoothquant/models/base_model.py:347-356 | colossalai/legacy/inference/quant/smoothquant/models/base_model.py:461-473 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/inference/quant/smoothquant/models/base_model.py:461\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/quant/smoothquant/models/base_model.py"},"region":{"startLine":347}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8c51f73c6499f9f8f14be31a22502e811de5fab31d08ec3f854aeed534c6740"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): colossalai/legacy/inference/quant/smoothquant/models/llama.py:483-495 | colossalai/legacy/moe/openmoe/model/modeling_openmoe.py:414-426 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/legacy/moe/openmoe/model/modeling_openmoe.py:412\u0060 calls \u0060clone\u0060, \u0060detach\u0060 and \u0060colossalai/legacy/inference/quant/smoothquant/models/llama.py:482\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/quant/smoothquant/models/llama.py"},"region":{"startLine":483}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae04e15192282f6f5635acb457d0756c02ef4ee2b4f69db12f8c6e950f52f9e3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): colossalai/legacy/inference/tensor_parallel/modeling/chatglm2.py:115-127 | colossalai/legacy/inference/tensor_parallel/modeling/llama.py:136-148 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/tensor_parallel/modeling/chatglm2.py"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bb82bbf4e2a3f9c29d15910db395715d3f70d1ea4b31b8699b4e2a2f12f2c8f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): colossalai/legacy/moe/openmoe/train.py:169-181 | examples/images/vit/args.py:34-46 \u2014 before extracting anything, compare \u0060colossalai/legacy/moe/openmoe/train.py\u0060 and \u0060examples/images/vit/args.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/moe/openmoe/train.py:169\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/openmoe/train.py"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cd9a6d6fddd6aeb13feb81ab23731799164dfe9d460b73c428f560b42deeec7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_2d/_operation.py:401-413 | colossalai/legacy/nn/layer/parallel_2p5d/_operation.py:364-376 \u2014 \u0060colossalai/legacy/nn/layer/parallel_2d/_operation.py\u0060 and \u0060colossalai/legacy/nn/layer/parallel_2p5d/_operation.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 16 separate duplicated blocks between them, totalling at least 185 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/nn/layer/parallel_2d/_operation.py:401\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2d/_operation.py"},"region":{"startLine":401}}}],"partialFingerprints":{"codehealthFindingId/v1":"35dc3021653fdafc5b64c469a9a0fe9811ff415af39ece7c52b4d99e26bdf74f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_2d/layers.py:283-295 | colossalai/legacy/nn/layer/parallel_2d/layers.py:495-507 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/nn/layer/parallel_2d/layers.py:283\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2d/layers.py"},"region":{"startLine":283}}}],"partialFingerprints":{"codehealthFindingId/v1":"67cd868e40a703570c6f73abf7282e0351ba4b6117f63c6cc35aef1f277c407b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_2p5d/layers.py:296-308 | colossalai/legacy/nn/layer/parallel_2p5d/layers.py:508-520 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/nn/layer/parallel_2p5d/layers.py:296\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2p5d/layers.py"},"region":{"startLine":296}}}],"partialFingerprints":{"codehealthFindingId/v1":"43ca464b62e4d771ad19705bba767d733a6dc88b8001bb4f1008e0ad81c1e84d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_3d/layers.py:935-947 | colossalai/legacy/nn/layer/parallel_3d/layers.py:1073-1085 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/nn/layer/parallel_3d/layers.py:935\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_3d/layers.py"},"region":{"startLine":935}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7f46bf489550a8522482eaa205e7438a9d76bb8f2ad979825ac9ff3f933a064"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): colossalai/legacy/nn/loss/loss_2d.py:81-93 | colossalai/legacy/nn/loss/loss_2p5d.py:75-87 \u2014 before extracting anything, compare \u0060colossalai/legacy/nn/loss/loss_2d.py\u0060 and \u0060colossalai/legacy/nn/loss/loss_2p5d.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/loss/loss_2d.py"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"927032b879925d6323dfa33c43ac1e442ec658871cb85b313fdf70260fdbb9bc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): colossalai/nn/optimizer/distributed_adafactor.py:415-427 | colossalai/nn/optimizer/distributed_came.py:492-503 \u2014 before extracting anything, compare \u0060colossalai/nn/optimizer/distributed_adafactor.py\u0060 and \u0060colossalai/nn/optimizer/distributed_came.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 201 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/distributed_adafactor.py"},"region":{"startLine":415}}}],"partialFingerprints":{"codehealthFindingId/v1":"73846405fee514600c12e260d240c86384e60e16478c590fdaa310f31b51a966"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): colossalai/pipeline/p2p.py:663-674 | colossalai/pipeline/p2p.py:702-714 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/pipeline/p2p.py"},"region":{"startLine":663}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cba8a72c3410761cccfe17de99f116071a3360c8e4fcf5b852445afa426d140"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): colossalai/shardformer/layer/_operation.py:276-288 | colossalai/shardformer/layer/_operation.py:363-375 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/_operation.py"},"region":{"startLine":276}}}],"partialFingerprints":{"codehealthFindingId/v1":"e045d46de37e612d3e59758b5bbbacbc76618e26a822a85c65b048128d7da9d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201313 lines \u00D7 2): colossalai/shardformer/layer/_operation.py:634-646 | colossalai/shardformer/layer/_operation.py:970-980 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/layer/_operation.py:634\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/_operation.py"},"region":{"startLine":634}}}],"partialFingerprints":{"codehealthFindingId/v1":"66af13c37c954da22f0d05e2cbc4cb6258de14d67f013c0a4766dad82ede83d6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201313 lines \u00D7 2): colossalai/shardformer/layer/linear.py:156-168 | colossalai/shardformer/layer/qkv_fused_linear.py:1339-1346 \u2014 before extracting anything, compare \u0060colossalai/shardformer/layer/linear.py\u0060 and \u0060colossalai/shardformer/layer/qkv_fused_linear.py\u0060 as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 261 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/layer/linear.py:156\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/linear.py"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"31ebe81cfccfac8bb9256ca3684a2522e684ef54bcae02ff0f435d59782addf8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): colossalai/shardformer/layer/qkv_fused_linear.py:267-279 | colossalai/shardformer/layer/qkv_fused_linear.py:484-496 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/shardformer/layer/qkv_fused_linear.py:481\u0060 calls \u0060divide\u0060 and \u0060colossalai/shardformer/layer/qkv_fused_linear.py:264\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/qkv_fused_linear.py"},"region":{"startLine":267}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f55adc96f9899c278399a2d80db805ebdcfdba09d1e53b3de777dccf2676fb8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): colossalai/shardformer/modeling/_llama_tf4.py:604-616 | colossalai/shardformer/modeling/_llama_tf5.py:646-658 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_llama_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_llama_tf5.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 483 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_llama_tf4.py"},"region":{"startLine":604}}}],"partialFingerprints":{"codehealthFindingId/v1":"32b619e9dae605564e72518721597c78f97d8045327a54ee0541a145db86d306"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): colossalai/shardformer/modeling/gpt2.py:75-87 | colossalai/shardformer/modeling/gptj.py:39-51 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/gpt2.py\u0060 and \u0060colossalai/shardformer/modeling/gptj.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 321 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/gpt2.py"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"97e96047ba85abcd2f129d4b1761e6d19c50c33029d0243e598d6d3a6f319c3b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): colossalai/shardformer/modeling/gptj.py:650-662 | colossalai/shardformer/modeling/gptj.py:826-838 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/gptj.py:650\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/gptj.py"},"region":{"startLine":650}}}],"partialFingerprints":{"codehealthFindingId/v1":"90bb0190eabeff9e3754efef3e154811c69aa9eed7badd1e695fa5ce4f93da20"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): colossalai/shardformer/policies/_vit_tf4.py:386-398 | colossalai/shardformer/policies/_vit_tf5.py:236-248 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_vit_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_vit_tf5.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 133 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_vit_tf4.py"},"region":{"startLine":386}}}],"partialFingerprints":{"codehealthFindingId/v1":"2808e14cdfc1acb035d98a52e7aed0ea022d19dc22f5882d6b1302c8fb721a45"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): colossalai/shardformer/policies/_vit_tf4.py:422-434 | colossalai/shardformer/policies/_vit_tf5.py:272-284 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_vit_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_vit_tf5.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 133 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_vit_tf4.py"},"region":{"startLine":422}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2e9960ed93ebe28835c1f137b812a92ebe5add6a33ada233f51b1f1bb527b1d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): colossalai/shardformer/policies/_whisper_tf4.py:141-153 | colossalai/shardformer/policies/_whisper_tf5.py:142-154 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_whisper_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_whisper_tf5.py\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 483 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/policies/_whisper_tf4.py:141\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_whisper_tf4.py"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b6c719fc76e1482c3b3adfe09b47f7fda43140ce9e54d087c4b966b30c23fcc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): colossalai/shardformer/policies/_whisper_tf4.py:830-842 | colossalai/shardformer/policies/_whisper_tf5.py:817-829 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_whisper_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_whisper_tf5.py\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 483 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_whisper_tf4.py"},"region":{"startLine":830}}}],"partialFingerprints":{"codehealthFindingId/v1":"446b0b7701b05c7ba9a2a6ad96f1372cc1235444bded09dedaf75acb6bf6d345"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): colossalai/shardformer/policies/bloom.py:540-552 | colossalai/shardformer/policies/falcon.py:489-501 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/bloom.py\u0060 and \u0060colossalai/shardformer/policies/falcon.py\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/bloom.py"},"region":{"startLine":540}}}],"partialFingerprints":{"codehealthFindingId/v1":"290364ae1f8c6cf6ca243f92dd847c8a96bd5f5fb3474dd7d7a57458bbb11e46"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 16): colossalai/legacy/context/process_group_initializer/initializer_1d.py:47-57 | colossalai/legacy/context/process_group_initializer/initializer_2d.py:60-70 | colossalai/legacy/context/process_group_initializer/initializer_2d.py:109-119 | colossalai/legacy/context/process_group_initializer/initializer_2p5d.py:79-90 | colossalai/legacy/context/process_group_initializer/initializer_2p5d.py:133-144 | colossalai/legacy/context/process_group_initializer/initializer_2p5d.py:187-198 | colossalai/legacy/context/process_group_initializer/initializer_2p5d.py:242-253 | colossalai/legacy/context/process_group_initializer/initializer_3d.py:66-76 | colossalai/legacy/context/process_group_initializer/initializer_3d.py:117-127 | colossalai/legacy/context/process_group_initializer/initializer_3d.py:168-178 | colossalai/legacy/context/process_group_initializer/initializer_3d.py:221-232 | colossalai/legacy/context/process_group_initializer/initializer_3d.py:275-286 | colossalai/legacy/context/process_group_initializer/initializer_data.py:45-55 | colossalai/legacy/context/process_group_initializer/initializer_model.py:47-57 | colossalai/legacy/context/process_group_initializer/initializer_sequence.py:48-58 | colossalai/legacy/context/process_group_initializer/initializer_tensor.py:45-55 \u2014 there are 16 copies across 8 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 16 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/context/process_group_initializer/initializer_2p5d.py:79\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/context/process_group_initializer/initializer_1d.py"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"db6df3dca286c4fa99478bff6258c98f5d998fa41f36b29beee9bc2e7fb4758e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 10): colossalai/shardformer/modeling/_llama_tf4.py:519-530 | colossalai/shardformer/modeling/_llama_tf5.py:566-577 | colossalai/shardformer/modeling/_mixtral_tf4.py:572-583 | colossalai/shardformer/modeling/_mixtral_tf5.py:957-968 | colossalai/shardformer/modeling/_qwen2_tf4.py:502-512 | colossalai/shardformer/modeling/_qwen2_tf5.py:400-410 | colossalai/shardformer/modeling/_qwen3_tf4.py:488-498 | colossalai/shardformer/modeling/_qwen3_tf5.py:401-411 | colossalai/shardformer/modeling/command.py:368-379 | colossalai/shardformer/modeling/deepseek.py:622-633 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_llama_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_llama_tf5.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 483 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/shardformer/modeling/_llama_tf5.py:563\u0060 calls \u0060getattr\u0060 and \u0060colossalai/shardformer/modeling/_llama_tf4.py:516\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_llama_tf4.py"},"region":{"startLine":519}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd4fff8195d047894fa16145287db01a5ee9fbc5b555159b4308e3f00c0d5305"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 9): colossalai/shardformer/modeling/_bert_tf4.py:976-987 | colossalai/shardformer/modeling/_bert_tf5.py:989-1000 | colossalai/shardformer/modeling/bloom.py:687-697 | colossalai/shardformer/modeling/falcon.py:703-713 | colossalai/shardformer/modeling/gpt2.py:581-591 | colossalai/shardformer/modeling/gptj.py:530-540 | colossalai/shardformer/modeling/opt.py:502-513 | examples/community/roberta/pretraining/model/bert.py:1848-1859 | examples/community/roberta/pretraining/model/deberta_v2.py:1496-1507 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 45 separate duplicated blocks between them, totalling at least 882 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/shardformer/modeling/_bert_tf4.py:975\u0060 calls \u0060is_last_stage\u0060 and \u0060examples/community/roberta/pretraining/model/bert.py:1846\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":976}}}],"partialFingerprints":{"codehealthFindingId/v1":"4eabe775348fcd9e9d164be03ff7683c2295c6444e2730104d95c15f30da22ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 7): colossalai/shardformer/modeling/_qwen2_tf4.py:776-807 | colossalai/shardformer/modeling/_qwen3_tf4.py:768-799 | colossalai/shardformer/modeling/bloom.py:1110-1121 | colossalai/shardformer/modeling/command.py:588-619 | colossalai/shardformer/modeling/falcon.py:757-768 | colossalai/shardformer/modeling/mistral.py:572-603 | colossalai/shardformer/modeling/opt.py:859-938 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_qwen2_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_qwen3_tf4.py\u0060 as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1214 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_qwen2_tf4.py:776\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen2_tf4.py"},"region":{"startLine":776}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f1ccea9436b9646879d8aa41550f4787ff94d77fe5f74f0492ee1379370ad82"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201312 lines \u00D7 6): applications/ColossalChat/coati/trainer/dpo.py:160-168 | applications/ColossalChat/coati/trainer/dpo.py:295-304 | applications/ColossalChat/coati/trainer/dpo.py:312-320 | applications/ColossalChat/coati/trainer/dpo.py:451-459 | applications/ColossalChat/coati/trainer/dpo.py:577-588 | applications/ColossalChat/coati/trainer/dpo.py:591-600 \u2014 all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/coati/trainer/dpo.py:160\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/dpo.py"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa7c098a03f85ac802bfaee3ce7a2bb18f5c469a3092dff9c664a92024a849b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u201312 lines \u00D7 5): applications/ColossalChat/coati/trainer/dpo.py:265-275 | applications/ColossalChat/coati/trainer/kto.py:127-132 | applications/ColossalChat/coati/trainer/kto.py:276-281 | applications/ColossalChat/coati/trainer/orpo.py:117-127 | applications/ColossalChat/coati/trainer/rm.py:110-121 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/trainer/dpo.py\u0060 and \u0060applications/ColossalChat/coati/trainer/kto.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/coati/trainer/dpo.py:265\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/dpo.py"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"92b9f45a8442dc91502e0896289391c44f621ca5825c26755574be83b4bd430c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201312 lines \u00D7 5): colossalai/inference/modeling/layers/baichuan_tp_linear.py:23-34 | colossalai/shardformer/layer/linear.py:293-300 | colossalai/shardformer/layer/linear.py:489-497 | colossalai/shardformer/layer/qkv_fused_linear.py:923-931 | colossalai/shardformer/layer/qkv_fused_linear.py:1117-1125 \u2014 before extracting anything, compare \u0060colossalai/shardformer/layer/linear.py\u0060 and \u0060colossalai/shardformer/layer/qkv_fused_linear.py\u0060 as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 261 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/inference/modeling/layers/baichuan_tp_linear.py:23\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: \u0060ParallelModule\u0060 names \u0060.parallel_module\u0060 in one and \u0060colossalai.shardformer.layer.parallel_module\u0060 in another \u2014 different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/modeling/layers/baichuan_tp_linear.py"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"e46c1db81cbb47fcb4f6d0cc10efd018c27ec9ef34ca88e23aa6fa0664c8f3f9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 5): colossalai/shardformer/modeling/_bert_tf4.py:803-814 | colossalai/shardformer/modeling/_bert_tf5.py:816-827 | colossalai/shardformer/modeling/t5.py:650-661 | examples/community/roberta/pretraining/model/bert.py:1757-1768 | examples/community/roberta/pretraining/model/deberta_v2.py:1413-1424 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 45 separate duplicated blocks between them, totalling at least 882 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/shardformer/modeling/_bert_tf4.py:802\u0060 calls \u0060is_last_stage\u0060 and \u0060examples/community/roberta/pretraining/model/bert.py:1755\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":803}}}],"partialFingerprints":{"codehealthFindingId/v1":"15eb17fe59f0ad7f7be208dafe42bbdc417e82561fd2fe29cd1235f05d8b5d4c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 5): colossalai/shardformer/modeling/_mixtral_tf4.py:693-704 | colossalai/shardformer/modeling/_mixtral_tf5.py:1087-1098 | colossalai/shardformer/modeling/_qwen2_tf4.py:626-637 | colossalai/shardformer/modeling/_qwen3_tf4.py:618-629 | colossalai/shardformer/modeling/deepseek.py:723-733 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_mixtral_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_mixtral_tf5.py\u0060 as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 581 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_mixtral_tf4.py"},"region":{"startLine":693}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4e2fb431ccc4e69213b4831e4ef55d40d7544f76617a8aaec59bf67c44933b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201312 lines \u00D7 4): colossalai/legacy/inference/quant/smoothquant/models/llama.py:572-583 | colossalai/legacy/inference/tensor_parallel/modeling/bloom.py:97-106 | colossalai/legacy/moe/openmoe/model/modeling_openmoe.py:718-729 | colossalai/shardformer/modeling/_deepseek_v3_tf4.py:162-172 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 4 times. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/quant/smoothquant/models/llama.py"},"region":{"startLine":572}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e87d9534fbc6c77463af2696bf793666c95c2b81266f7d7f4497c3bbcd72a05"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 4): colossalai/legacy/inference/tensor_parallel/modeling/bloom.py:330-341 | colossalai/shardformer/modeling/bloom.py:394-405 | colossalai/shardformer/modeling/falcon.py:434-445 | colossalai/shardformer/modeling/gpt2.py:417-428 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/inference/tensor_parallel/modeling/bloom.py:330\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/tensor_parallel/modeling/bloom.py"},"region":{"startLine":330}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1c2277b45a2b0d326c0a26aae5921bf04359b91978463217007a4870c5641ae"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 4): colossalai/legacy/moe/openmoe/model/openmoe_policy.py:296-307 | colossalai/shardformer/modeling/_mixtral_tf4.py:275-286 | colossalai/shardformer/modeling/_mixtral_tf5.py:621-632 | colossalai/shardformer/modeling/deepseek.py:372-383 \u2014 before extracting anything, compare \u0060colossalai/legacy/moe/openmoe/model/openmoe_policy.py\u0060 and \u0060colossalai/shardformer/modeling/_mixtral_tf4.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 130 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/openmoe/model/openmoe_policy.py"},"region":{"startLine":296}}}],"partialFingerprints":{"codehealthFindingId/v1":"e012806b3855245e95a577897057575a459861265dc32245a46ca8c25656f53b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 4): colossalai/legacy/nn/layer/parallel_1d/layers.py:261-272 | colossalai/legacy/nn/layer/parallel_1d/layers.py:398-409 | colossalai/legacy/nn/layer/parallel_1d/layers.py:533-544 | colossalai/legacy/nn/layer/parallel_1d/layers.py:676-687 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/nn/layer/parallel_1d/layers.py:261\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_1d/layers.py"},"region":{"startLine":261}}}],"partialFingerprints":{"codehealthFindingId/v1":"70eeb9d167cfaa5e04cd1bb4954aa3b70aec2ec2254f9945003fbb49c097e42c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201312 lines \u00D7 4): colossalai/shardformer/modeling/_whisper_tf4.py:178-188 | colossalai/shardformer/modeling/gptj.py:664-673 | colossalai/shardformer/modeling/gptj.py:840-849 | colossalai/shardformer/modeling/opt.py:629-640 \u2014 there are 4 copies across 3 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060colossalai/shardformer/modeling/gptj.py:674\u0060 calls \u0060warn_if_padding_and_no_attention_mask\u0060 and \u0060colossalai/shardformer/modeling/_whisper_tf4.py:189\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_whisper_tf4.py"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"d73e771716874c0141b9d9672377b276bca5142e473ab225b82bc7e6a3214a45"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): colossalai/auto_parallel/meta_profiler/meta_registry/conv.py:128-139 | colossalai/auto_parallel/meta_profiler/meta_registry/linear.py:171-182 | colossalai/auto_parallel/meta_profiler/meta_registry/norm.py:94-105 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/auto_parallel/meta_profiler/meta_registry/conv.py:128\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/meta_profiler/meta_registry/conv.py"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8a64e22bd2ca4b433657fcd15e68e011a6088dea938b3cffd997786532be609"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): colossalai/auto_parallel/tensor_shard/node_handler/strategy/batch_norm_generator.py:74-90 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py:79-90 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/layer_norm_generator.py:68-79 \u2014 before extracting anything, compare \u0060colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py\u0060 and \u0060colossalai/auto_parallel/tensor_shard/node_handler/strategy/layer_norm_generator.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/auto_parallel/tensor_shard/node_handler/strategy/batch_norm_generator.py:74\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/batch_norm_generator.py"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"60c98d3cb900f65b1cf7a53fc5302a76cc5163bd1913919b80256baa3cbbf8a7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): colossalai/checkpoint_io/utils.py:254-265 | colossalai/checkpoint_io/utils.py:305-316 | colossalai/checkpoint_io/utils.py:368-379 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/utils.py"},"region":{"startLine":254}}}],"partialFingerprints":{"codehealthFindingId/v1":"98caea59d9f5c3f9b5a8783fc92a79d6fca2b9abaaef7bddf889e4b60e182293"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201312 lines \u00D7 3): colossalai/fx/profiler/experimental/profiler_module/convolution.py:106-117 | colossalai/fx/profiler/experimental/profiler_module/convolution.py:142-151 | colossalai/fx/profiler/experimental/profiler_module/convolution.py:184-193 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/fx/profiler/experimental/profiler_module/convolution.py:106\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060self\u0060 to \u0060torch.nn.ConvTranspose1d\u0060 in one and \u0060torch.nn.ConvTranspose2d\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/profiler/experimental/profiler_module/convolution.py"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9d93527cb823a7d8769015b8906356c5e8623a60b1f62557c3c7283eb3787fd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201312 lines \u00D7 3): colossalai/fx/tracer/_tracer_utils.py:41-49 | colossalai/fx/tracer/experimental.py:546-557 | colossalai/fx/tracer/tracer.py:247-257 \u2014 before extracting anything, compare \u0060colossalai/fx/tracer/experimental.py\u0060 and \u0060colossalai/fx/tracer/tracer.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 138 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/_tracer_utils.py"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"25c933a19ed156c7e407bfa715d89eff89a1c64781a2a073d081b6521550cd59"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201312 lines \u00D7 3): colossalai/shardformer/policies/gpt2.py:565-576 | colossalai/shardformer/policies/gptj.py:479-488 | colossalai/shardformer/policies/opt.py:495-504 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/gpt2.py\u0060 and \u0060colossalai/shardformer/policies/gptj.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/gpt2.py"},"region":{"startLine":565}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b88d0e43e9b85e384385bf60e3aa0a8ae4fa8b3270d429d0744f50e72fd098b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): applications/Colossal-LLaMA/dataset/prepare_pretrain_dataset.py:28-39 | applications/Colossal-LLaMA/dataset/prepare_sft_dataset.py:25-36 \u2014 before extracting anything, compare \u0060applications/Colossal-LLaMA/dataset/prepare_pretrain_dataset.py\u0060 and \u0060applications/Colossal-LLaMA/dataset/prepare_sft_dataset.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 116 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060applications/Colossal-LLaMA/dataset/prepare_sft_dataset.py:38\u0060 calls \u0060add_argument\u0060 and \u0060applications/Colossal-LLaMA/dataset/prepare_pretrain_dataset.py:41\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/dataset/prepare_pretrain_dataset.py"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a669ec6e08e70daad2050c99eacc3faecdfeaf11324d3cf60e20a47d383aa3f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): applications/Colossal-LLaMA/dataset/prepare_pretrain_dataset.py:84-95 | applications/Colossal-LLaMA/dataset/prepare_sft_dataset.py:94-105 \u2014 before extracting anything, compare \u0060applications/Colossal-LLaMA/dataset/prepare_pretrain_dataset.py\u0060 and \u0060applications/Colossal-LLaMA/dataset/prepare_sft_dataset.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 116 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/Colossal-LLaMA/dataset/prepare_pretrain_dataset.py:84\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/dataset/prepare_pretrain_dataset.py"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec984642285252fc386e53cc8c1811e11ddb39e999a4fcfde86854ce3c7cf44e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): applications/Colossal-LLaMA/train.py:293-304 | applications/ColossalChat/examples/training_scripts/lora_finetune.py:282-293 \u2014 before extracting anything, compare \u0060applications/Colossal-LLaMA/train.py\u0060 and \u0060applications/ColossalChat/examples/training_scripts/lora_finetune.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/Colossal-LLaMA/train.py:293\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/train.py"},"region":{"startLine":293}}}],"partialFingerprints":{"codehealthFindingId/v1":"316310ebff683e82517ea5edd237b734966a46bc231937b2867e87529dc29a13"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): applications/ColossalChat/coati/dataset/loader.py:280-291 | applications/ColossalChat/coati/dataset/loader.py:299-310 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/dataset/loader.py"},"region":{"startLine":280}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c28d644980ece842e7d8a9c5cadf8103620e81c637a8acd1a877197f5e4ef16"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): applications/ColossalChat/coati/distributed/launch.py:85-96 | applications/ColossalChat/coati/distributed/launch_zero_bubble.py:81-92 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/distributed/launch.py\u0060 and \u0060applications/ColossalChat/coati/distributed/launch_zero_bubble.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060applications/ColossalChat/coati/distributed/launch_zero_bubble.py:95\u0060 calls \u0060remote\u0060 and \u0060applications/ColossalChat/coati/distributed/launch.py:97\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/launch.py"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"673378ec0bbb200cbe83a00320ffb65cba85992d3240fda7b1679de17da8f93c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): applications/ColossalChat/coati/models/lora.py:147-157 | applications/ColossalChat/coati/models/lora.py:201-212 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/models/lora.py"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"cebd3ee36b19ac1fab93e07f633269f1ec84acf396d73adaa1fe9b2baadd1f66"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): applications/ColossalChat/coati/ray/callbacks/performance_evaluator.py:79-90 | applications/ColossalChat/coati/trainer/callbacks/performance_evaluator.py:128-139 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/ray/callbacks/performance_evaluator.py"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"32b25b2a1fe6d70e6c19eb69a78a3d9147bc8a7d6280ceba50db20cd205d31eb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (3\u201312 lines \u00D7 3): applications/ColossalChat/coati/ray/callbacks/performance_evaluator.py:111-122 | applications/ColossalChat/coati/ray/callbacks/performance_evaluator.py:203-212 | applications/ColossalChat/coati/trainer/callbacks/performance_evaluator.py:185-187 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/coati/ray/callbacks/performance_evaluator.py:111\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/ray/callbacks/performance_evaluator.py"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"a79b4609900973d0d9c586faecc1e2488d75787c57005110664f74182fda9c00"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): applications/ColossalChat/coati/trainer/grpo.py:254-264 | applications/ColossalChat/coati/trainer/ppo.py:238-249 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/trainer/grpo.py\u0060 and \u0060applications/ColossalChat/coati/trainer/ppo.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 176 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/coati/trainer/ppo.py:238\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/grpo.py"},"region":{"startLine":254}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ba799ba4e47d0a59c8f020567e00e88844f20df4f3da9f08e964d2825d86107"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): applications/ColossalMoE/train.py:243-254 | colossalai/legacy/moe/openmoe/train.py:347-358 \u2014 before extracting anything, compare \u0060applications/ColossalMoE/train.py\u0060 and \u0060colossalai/legacy/moe/openmoe/train.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 125 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060applications/ColossalMoE/train.py:241\u0060 calls \u0060get_global_loss\u0060 and \u0060colossalai/legacy/moe/openmoe/train.py:346\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalMoE/train.py"},"region":{"startLine":243}}}],"partialFingerprints":{"codehealthFindingId/v1":"f72acea31cb1ce28746555abd086b86d63011ef2012cce79672ecbdb256aa92a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): colossalai/booster/plugin/hybrid_parallel_plugin.py:1154-1165 | colossalai/booster/plugin/moe_hybrid_parallel_plugin.py:372-383 \u2014 before extracting anything, compare \u0060colossalai/booster/plugin/hybrid_parallel_plugin.py\u0060 and \u0060colossalai/booster/plugin/moe_hybrid_parallel_plugin.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 100 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/plugin/hybrid_parallel_plugin.py"},"region":{"startLine":1154}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc5685d3de4d95c503db0b26f377bcc989765c4ce0ff59fa1779e6f75efa3250"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): colossalai/fx/tracer/meta_patch/patched_module/pooling.py:10-21 | colossalai/fx/tracer/meta_patch/patched_module/pooling.py:89-100 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/meta_patch/patched_module/pooling.py"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"6103477e839f11c293c38254183e61e5393a65567761f8051c6caeb142305acc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): colossalai/fx/tracer/meta_patch/patched_module/pooling.py:33-44 | colossalai/fx/tracer/meta_patch/patched_module/pooling.py:113-124 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/meta_patch/patched_module/pooling.py"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"08ad94adce36a17498aa5a77522138b280471a2500f6f8a4e7aae1efd07adb62"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): colossalai/fx/tracer/meta_patch/patched_module/pooling.py:60-71 | colossalai/fx/tracer/meta_patch/patched_module/pooling.py:141-152 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/meta_patch/patched_module/pooling.py"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"976e971b91262bb566716afd4258e5516178a826277ab2b07caa36432d4923cf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201312 lines \u00D7 2): colossalai/fx/tracer/meta_patch/patched_module/pooling.py:116-127 | colossalai/fx/tracer/meta_patch/patched_module/pooling.py:146-155 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060colossalai/fx/tracer/meta_patch/patched_module/pooling.py:159\u0060 calls \u0060floor\u0060 and \u0060colossalai/fx/tracer/meta_patch/patched_module/pooling.py:132\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/meta_patch/patched_module/pooling.py"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2f66b2bde8c2e6ebfd4ad08b66feac621d08dbea5f6d24e507dcbed0e3d835e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): colossalai/inference/core/llm_engine.py:704-715 | colossalai/inference/core/rpc_engine.py:242-253 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/inference/core/llm_engine.py:704\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/core/llm_engine.py"},"region":{"startLine":704}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1557aed816904826edc8e3a8e544d8400d686dd5d5faaa36871069563bea793"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): colossalai/inference/modeling/backends/attention_backend.py:73-84 | colossalai/inference/modeling/backends/attention_backend.py:117-128 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/modeling/backends/attention_backend.py"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"495d203599e8cf881dca86020a051c813af19c55fbbfdbd285dd7b1adedafd4d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): colossalai/kernel/triton/context_attn_unpad.py:174-185 | colossalai/kernel/triton/context_attn_unpad.py:538-549 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/context_attn_unpad.py"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd5af10a3009dd17607d8e99619b68a6e0d965b811c3fd6659c599abfbd3143d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): colossalai/kernel/triton/no_pad_rotary_embedding.py:55-66 | colossalai/kernel/triton/no_pad_rotary_embedding.py:92-103 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/kernel/triton/no_pad_rotary_embedding.py:55\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/no_pad_rotary_embedding.py"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"58a5aa0fa5d240d103642c2ad836e0c187504428e4b646c9befcc71fbb33ac30"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): colossalai/legacy/inference/dynamic_batching/ray_dist_init.py:65-75 | colossalai/legacy/inference/serving/ray_serve/Colossal_Inference_rayserve.py:65-76 \u2014 before extracting anything, compare \u0060colossalai/legacy/inference/dynamic_batching/ray_dist_init.py\u0060 and \u0060colossalai/legacy/inference/serving/ray_serve/Colossal_Inference_rayserve.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/dynamic_batching/ray_dist_init.py"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"492f9d272cad6a5136054ef034b13d5cdee96c81d28737af304d1b0e1ac18d7a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_2p5d/layers.py:76-87 | colossalai/legacy/nn/layer/parallel_2p5d/layers.py:1075-1086 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2p5d/layers.py"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ea0da398560f8d9928be23e30af6a0b2ee60b7c7258e8e119edcff587566e69"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): colossalai/legacy/trainer/_trainer.py:297-308 | colossalai/legacy/trainer/_trainer.py:371-382 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/trainer/_trainer.py:297\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/legacy/trainer/_trainer.py:293\u0060 calls \u0060isinstance\u0060 and \u0060colossalai/legacy/trainer/_trainer.py:369\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/trainer/_trainer.py"},"region":{"startLine":297}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ab9d93332552387d2c01c95e7ea085b3dc860f50bf10c03697eb3cb66f35dea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): colossalai/nn/optimizer/adafactor.py:190-201 | colossalai/nn/optimizer/distributed_adafactor.py:429-440 \u2014 before extracting anything, compare \u0060colossalai/nn/optimizer/adafactor.py\u0060 and \u0060colossalai/nn/optimizer/distributed_adafactor.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/adafactor.py"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a3bb69b3b1ceaff3cd1aaa8926cf7ca6966f76f5a8a5a7c38cbe3d85b272211"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): colossalai/nn/optimizer/distributed_adafactor.py:46-57 | colossalai/nn/optimizer/distributed_came.py:45-56 \u2014 before extracting anything, compare \u0060colossalai/nn/optimizer/distributed_adafactor.py\u0060 and \u0060colossalai/nn/optimizer/distributed_came.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 201 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/distributed_adafactor.py"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"e519ded2c6ecf000b74aefb9a2ff56fffad9a6e1765c5a11ce22ffc1a5611cb0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): colossalai/nn/optimizer/distributed_adafactor.py:131-142 | colossalai/nn/optimizer/distributed_came.py:125-136 \u2014 before extracting anything, compare \u0060colossalai/nn/optimizer/distributed_adafactor.py\u0060 and \u0060colossalai/nn/optimizer/distributed_came.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 201 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/distributed_adafactor.py"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef77f8b93caad99039dff1b19218e6d7d0aca077445b9b7f3209f3625ca12fe4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): colossalai/nn/optimizer/distributed_adafactor.py:204-214 | colossalai/nn/optimizer/distributed_came.py:197-208 \u2014 before extracting anything, compare \u0060colossalai/nn/optimizer/distributed_adafactor.py\u0060 and \u0060colossalai/nn/optimizer/distributed_came.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 201 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/distributed_adafactor.py"},"region":{"startLine":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1d89328b7d458b8601ec0dbb31eabcd8fd3137523331f5f31faff614169dd0f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): colossalai/nn/optimizer/distributed_adafactor.py:220-231 | colossalai/nn/optimizer/distributed_came.py:213-224 \u2014 before extracting anything, compare \u0060colossalai/nn/optimizer/distributed_adafactor.py\u0060 and \u0060colossalai/nn/optimizer/distributed_came.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 201 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/distributed_adafactor.py"},"region":{"startLine":220}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2a56fb4ba900ee119586bf04519457cf4acd8acb661e87d9480a1e8a0bec1a7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): colossalai/nn/optimizer/distributed_adafactor.py:336-346 | colossalai/nn/optimizer/distributed_adafactor.py:350-361 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/distributed_adafactor.py"},"region":{"startLine":336}}}],"partialFingerprints":{"codehealthFindingId/v1":"207aa5793a8f867f372ac7b379024067816640f3837ba8d8c415c5edbc255a77"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): colossalai/nn/optimizer/distributed_adafactor.py:357-368 | colossalai/nn/optimizer/distributed_came.py:408-418 \u2014 before extracting anything, compare \u0060colossalai/nn/optimizer/distributed_adafactor.py\u0060 and \u0060colossalai/nn/optimizer/distributed_came.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 201 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/nn/optimizer/distributed_adafactor.py:357\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/distributed_adafactor.py"},"region":{"startLine":357}}}],"partialFingerprints":{"codehealthFindingId/v1":"24455dbb520ec08e8b3c048eb857efd81726e21af0198e816e976bf61ddb3489"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): colossalai/nn/optimizer/distributed_galore.py:81-92 | colossalai/nn/optimizer/galore.py:221-232 \u2014 before extracting anything, compare \u0060colossalai/nn/optimizer/distributed_galore.py\u0060 and \u0060colossalai/nn/optimizer/galore.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/distributed_galore.py"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"a69bfdd221620a5d063966e52b3a89131b354988b0dd1d8e6182e543bbcabb00"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): colossalai/shardformer/layer/_operation.py:156-167 | colossalai/shardformer/layer/_operation.py:327-338 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/layer/_operation.py:156\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/_operation.py"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cd638334983910724f06203b810c4d1e7c9ba026ba1877745ec5e77564f8b54"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): colossalai/shardformer/layer/linear.py:529-540 | colossalai/shardformer/layer/qkv_fused_linear.py:1146-1157 \u2014 before extracting anything, compare \u0060colossalai/shardformer/layer/linear.py\u0060 and \u0060colossalai/shardformer/layer/qkv_fused_linear.py\u0060 as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 261 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/linear.py"},"region":{"startLine":529}}}],"partialFingerprints":{"codehealthFindingId/v1":"02a81f054579da129cc5328e5ee20b2484729a12319cc9a50993d731fac10fdc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): colossalai/shardformer/layer/linear.py:556-567 | colossalai/shardformer/layer/qkv_fused_linear.py:593-604 \u2014 before extracting anything, compare \u0060colossalai/shardformer/layer/linear.py\u0060 and \u0060colossalai/shardformer/layer/qkv_fused_linear.py\u0060 as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 261 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/layer/linear.py:556\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/linear.py"},"region":{"startLine":556}}}],"partialFingerprints":{"codehealthFindingId/v1":"556abad25dd8b0c0a1a7fcc4720d67e344cbe934e50c6f33e7c5901847d85282"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): colossalai/shardformer/modeling/_deepseek_v3_tf4.py:268-279 | colossalai/shardformer/modeling/_deepseek_v3_tf5.py:293-304 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_deepseek_v3_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_deepseek_v3_tf5.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_deepseek_v3_tf4.py"},"region":{"startLine":268}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9a871e7b600cb80c82fcf750ac82e27fc7390edf76a8671523a0645649385d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): colossalai/shardformer/modeling/_mixtral_tf4.py:718-728 | colossalai/shardformer/modeling/deepseek.py:748-759 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_mixtral_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/deepseek.py\u0060 as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 427 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_mixtral_tf4.py"},"region":{"startLine":718}}}],"partialFingerprints":{"codehealthFindingId/v1":"032c801a4425063812b74ee17c371ff348e55572e302e1997a4a9b8da40ec914"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): colossalai/shardformer/modeling/_whisper_tf4.py:794-806 | colossalai/shardformer/modeling/opt.py:238-249 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_whisper_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/opt.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 105 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/opt.py:238\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_whisper_tf4.py"},"region":{"startLine":794}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bca48a7218e9829afa3dfa574da9a829c9979f9954aa93bb44f8756a4c49613"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): colossalai/shardformer/modeling/bloom.py:1145-1156 | colossalai/shardformer/modeling/falcon.py:804-815 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/bloom.py\u0060 and \u0060colossalai/shardformer/modeling/falcon.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 594 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/bloom.py"},"region":{"startLine":1145}}}],"partialFingerprints":{"codehealthFindingId/v1":"7cecda0d44cf0cb8aeb18751f416b7fc6481a2905bd267d28123efcaf329b195"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): colossalai/shardformer/modeling/gpt2.py:261-272 | colossalai/shardformer/modeling/gptj.py:194-205 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/gpt2.py\u0060 and \u0060colossalai/shardformer/modeling/gptj.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 321 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/gpt2.py:261\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/gpt2.py"},"region":{"startLine":261}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfb0e569cdae5d2ecfb6907099490834f5a0dbcd43461848896879a94325e8c1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): colossalai/shardformer/policies/_bert_tf4.py:521-532 | colossalai/shardformer/policies/_bert_tf5.py:528-539 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 475 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_bert_tf4.py"},"region":{"startLine":521}}}],"partialFingerprints":{"codehealthFindingId/v1":"97ac01f2ba75b9bf935672fa4ff8bc14d4376f65c5c70d80277415a777759c7e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): colossalai/shardformer/policies/_bert_tf4.py:560-571 | colossalai/shardformer/policies/_bert_tf5.py:567-578 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 475 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_bert_tf4.py"},"region":{"startLine":560}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ffe8694b2b0d454780e9e78ddb9f019a5b3697709bce82036f19f8ec2d61acb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): colossalai/shardformer/policies/_bert_tf4.py:600-611 | colossalai/shardformer/policies/_bert_tf5.py:607-618 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 475 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_bert_tf4.py"},"region":{"startLine":600}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8df7608352cf66111e6171b985eec1ae6cc26cf15794f1680678d0d53db478f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): colossalai/shardformer/policies/_vit_tf4.py:255-266 | colossalai/shardformer/policies/_vit_tf5.py:105-116 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_vit_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_vit_tf5.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 133 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_vit_tf4.py"},"region":{"startLine":255}}}],"partialFingerprints":{"codehealthFindingId/v1":"cafe010c3da4696c48707ab1b1293ad8f2ec15eb2d9e1b01f814702733cda94d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): colossalai/shardformer/policies/_vit_tf4.py:404-415 | colossalai/shardformer/policies/_vit_tf5.py:254-265 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_vit_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_vit_tf5.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 133 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_vit_tf4.py"},"region":{"startLine":404}}}],"partialFingerprints":{"codehealthFindingId/v1":"17edfbe1b00f1ff7baf53f4a319bd8c274b19018776074826fee1f50f103d505"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 11): colossalai/shardformer/modeling/_bert_tf4.py:727-737 | colossalai/shardformer/modeling/_bert_tf5.py:740-750 | colossalai/shardformer/modeling/_llama_tf4.py:465-475 | colossalai/shardformer/modeling/_llama_tf5.py:507-517 | colossalai/shardformer/modeling/_qwen2_tf4.py:455-465 | colossalai/shardformer/modeling/gpt2.py:787-797 | colossalai/shardformer/modeling/gptj.py:451-461 | colossalai/shardformer/modeling/mistral.py:351-361 | colossalai/shardformer/modeling/opt.py:433-443 | examples/community/roberta/pretraining/model/bert.py:1575-1585 | examples/community/roberta/pretraining/model/deberta_v2.py:1335-1345 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 45 separate duplicated blocks between them, totalling at least 882 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":727}}}],"partialFingerprints":{"codehealthFindingId/v1":"21a8ae04e957d90f38b28281e08491ba58cee54d4c50b14def93ddd0b7e752c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 11): colossalai/shardformer/modeling/_llama_tf4.py:476-486 | colossalai/shardformer/modeling/_llama_tf5.py:518-528 | colossalai/shardformer/modeling/_qwen2_tf4.py:466-476 | colossalai/shardformer/modeling/_qwen2_tf5.py:364-374 | colossalai/shardformer/modeling/_qwen3_tf4.py:452-462 | colossalai/shardformer/modeling/_qwen3_tf5.py:365-375 | colossalai/shardformer/modeling/bloom.py:522-532 | colossalai/shardformer/modeling/falcon.py:551-561 | colossalai/shardformer/modeling/gpt2.py:798-808 | colossalai/shardformer/modeling/gptj.py:462-472 | colossalai/shardformer/modeling/opt.py:445-455 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_llama_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_llama_tf5.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 483 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_llama_tf4.py"},"region":{"startLine":476}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ec95365102894de8c864c4d40318388b2e3a7e8bd63235c9769e4e7a0f1c44b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 8): colossalai/kernel/triton/context_attn_unpad.py:621-631 | colossalai/kernel/triton/context_attn_unpad.py:661-671 | colossalai/kernel/triton/context_attn_unpad.py:697-707 | colossalai/kernel/triton/flash_decoding.py:433-443 | colossalai/kernel/triton/flash_decoding.py:490-500 | colossalai/kernel/triton/flash_decoding.py:516-526 | colossalai/kernel/triton/kvcache_copy.py:272-282 | colossalai/kernel/triton/no_pad_rotary_embedding.py:633-643 \u2014 there are 8 copies across 4 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 8 sites; resolving a subset leaves the remainder to drift apart. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060colossalai/kernel/triton/context_attn_unpad.py:632\u0060 calls \u0060stride\u0060 and \u0060colossalai/kernel/triton/flash_decoding.py:527\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/context_attn_unpad.py"},"region":{"startLine":621}}}],"partialFingerprints":{"codehealthFindingId/v1":"8612290c480789661cfa21a72d868df4ab6f2a3ea539fd9cfce740589d2c077b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 6): colossalai/legacy/inference/tensor_parallel/modeling/chatglm2.py:205-215 | colossalai/shardformer/modeling/bloom.py:1144-1154 | colossalai/shardformer/modeling/chatglm2.py:325-334 | colossalai/shardformer/modeling/chatglm2_6b/modeling_chatglm.py:1118-1128 | colossalai/shardformer/modeling/falcon.py:803-813 | colossalai/shardformer/modeling/gptj.py:343-353 \u2014 before extracting anything, compare \u0060colossalai/legacy/inference/tensor_parallel/modeling/chatglm2.py\u0060 and \u0060colossalai/shardformer/modeling/chatglm2_6b/modeling_chatglm.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 176 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/shardformer/modeling/gptj.py:341\u0060 calls \u0060to\u0060 and \u0060colossalai/shardformer/modeling/falcon.py:801\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/tensor_parallel/modeling/chatglm2.py"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"9744cfc10edb0e2423b9acc618c23648fe360e16dc6c43395acc52e571ebc85f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 6): colossalai/legacy/nn/layer/parallel_1d/layers.py:165-175 | colossalai/legacy/nn/layer/parallel_2d/layers.py:279-289 | colossalai/legacy/nn/layer/parallel_2d/layers.py:483-493 | colossalai/legacy/nn/layer/parallel_2p5d/layers.py:292-302 | colossalai/legacy/nn/layer/parallel_2p5d/layers.py:496-506 | colossalai/legacy/nn/layer/parallel_3d/layers.py:776-786 \u2014 \u0060colossalai/legacy/nn/layer/parallel_1d/layers.py\u0060 and \u0060colossalai/legacy/nn/layer/parallel_2d/layers.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 6 separate duplicated blocks between them, totalling at least 56 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_1d/layers.py"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"236cef27fffa934f4fc0e26751ad71373ee89fb80ef6acc6a175e212e26c2bd2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 5): applications/Colossal-LLaMA/colossal_llama/utils/utils.py:26-36 | examples/language/deepseek/model_utils.py:22-32 | examples/language/llama/model_utils.py:22-32 | examples/language/mixtral/model_utils.py:22-32 | examples/language/model_utils.py:22-32 \u2014 \u0060examples/language/deepseek/model_utils.py\u0060 and \u0060examples/language/llama/model_utils.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 1 separate duplicated blocks between them, totalling at least 11 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/colossal_llama/utils/utils.py"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"8395eaa78faba26a3edc8ade16b3f9b02f83015aac78fb5554447ad56a7e3a42"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201311 lines \u00D7 5): colossalai/auto_parallel/meta_profiler/meta_registry/activation.py:62-72 | colossalai/auto_parallel/meta_profiler/meta_registry/linear.py:435-442 | colossalai/auto_parallel/meta_profiler/meta_registry/norm.py:152-161 | colossalai/auto_parallel/meta_profiler/meta_registry/tensor.py:44-53 | colossalai/auto_parallel/meta_profiler/meta_registry/where.py:49-58 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 5 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/auto_parallel/meta_profiler/meta_registry/activation.py:62\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/auto_parallel/meta_profiler/meta_registry/linear.py:432\u0060 calls \u0060TrainCycleItem\u0060, \u0060MemoryCost\u0060 and \u0060colossalai/auto_parallel/meta_profiler/meta_registry/norm.py:152\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/meta_profiler/meta_registry/activation.py"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c02414cf555fdfde5cce10ed7e1fd46d97dc165baaf674747c373143bfcca1c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 5): colossalai/legacy/inference/tensor_parallel/modeling/bloom.py:84-94 | colossalai/shardformer/modeling/bloom.py:127-137 | colossalai/shardformer/modeling/bloom.py:344-354 | colossalai/shardformer/modeling/bloom.py:436-446 | colossalai/shardformer/modeling/bloom.py:562-572 \u2014 there are 5 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/tensor_parallel/modeling/bloom.py"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ad446eefdc9a4f9e559c732b0f12ee321aa73379fb65da9cf670defaa2827eb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): colossalai/legacy/inference/tensor_parallel/modeling/bloom.py:289-299 | colossalai/shardformer/modeling/bloom.py:346-356 | colossalai/shardformer/modeling/bloom.py:438-448 | colossalai/shardformer/modeling/bloom.py:564-574 \u2014 there are 4 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/tensor_parallel/modeling/bloom.py"},"region":{"startLine":289}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd140d4725fb82f456195ee7abac76ae1963d4eb2839f82098b6fc851b040877"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): colossalai/legacy/zero/sharded_model/sharded_model_v2.py:568-578 | colossalai/shardformer/layer/parallel_module.py:164-174 | colossalai/shardformer/layer/parallel_module.py:342-352 | colossalai/zero/gemini/gemini_ddp.py:805-815 \u2014 before extracting anything, compare \u0060colossalai/legacy/zero/sharded_model/sharded_model_v2.py\u0060 and \u0060colossalai/shardformer/layer/parallel_module.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 96 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/zero/sharded_model/sharded_model_v2.py"},"region":{"startLine":568}}}],"partialFingerprints":{"codehealthFindingId/v1":"1423124784b0b42d167b37283580aeeff2534cb5c36b6d834d4348acd90851dc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): colossalai/shardformer/modeling/_qwen2_tf4.py:249-259 | colossalai/shardformer/modeling/_qwen3_tf4.py:247-257 | colossalai/shardformer/modeling/deepseek.py:459-469 | colossalai/shardformer/modeling/gptj.py:243-256 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_qwen2_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_qwen3_tf4.py\u0060 as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1214 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen2_tf4.py"},"region":{"startLine":249}}}],"partialFingerprints":{"codehealthFindingId/v1":"b326b90c20eb1f5955f9872421db17dc570add894e0f43566869e03c45ab44eb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 3): colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py:182-192 | colossalai/checkpoint_io/moe_checkpoint.py:126-136 | colossalai/zero/gemini/gemini_ddp.py:970-979 \u2014 before extracting anything, compare \u0060colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py\u0060 and \u0060colossalai/checkpoint_io/moe_checkpoint.py\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 249 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e3d2c5160a0f9a20e4a4fee46cf19489c004198925d1e3b64d10bf128e52996"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): colossalai/fx/tracer/meta_patch/patched_module/pooling.py:15-25 | colossalai/fx/tracer/meta_patch/patched_module/pooling.py:38-48 | colossalai/fx/tracer/meta_patch/patched_module/pooling.py:65-75 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060colossalai/fx/tracer/meta_patch/patched_module/pooling.py:77\u0060 calls \u0060floor\u0060 and \u0060colossalai/fx/tracer/meta_patch/patched_module/pooling.py:51\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/meta_patch/patched_module/pooling.py"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"775edd357ce5ab47678d949fad3ff611337f03ff83038e3f7707bb75e3881299"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): colossalai/inference/modeling/models/glide_llama.py:156-166 | colossalai/shardformer/modeling/mistral.py:68-78 | colossalai/shardformer/modeling/mistral.py:411-421 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/modeling/models/glide_llama.py"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd259fa64a7eca9b21e359c0fd27a864bcb5f586f976b49dca73db279cde2e45"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): colossalai/kernel/triton/context_attn_unpad.py:124-134 | colossalai/kernel/triton/context_attn_unpad.py:302-312 | colossalai/kernel/triton/context_attn_unpad.py:484-494 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/context_attn_unpad.py"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2dd2f7053920becd6eb371749d8e10632c50c680fdb927b1fce698182606fb9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): colossalai/legacy/moe/openmoe/model/openmoe_policy.py:336-346 | colossalai/shardformer/modeling/_mixtral_tf4.py:322-332 | colossalai/shardformer/modeling/deepseek.py:412-422 \u2014 before extracting anything, compare \u0060colossalai/legacy/moe/openmoe/model/openmoe_policy.py\u0060 and \u0060colossalai/shardformer/modeling/_mixtral_tf4.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 130 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/openmoe/model/openmoe_policy.py"},"region":{"startLine":336}}}],"partialFingerprints":{"codehealthFindingId/v1":"e92051a50967cddb3d5db15a08de2e5c6735064cf62f0da911e928d2ca4da982"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): colossalai/legacy/moe/openmoe/train.py:171-184 | examples/images/vit/args.py:36-46 | examples/language/opt/args.py:24-34 \u2014 before extracting anything, compare \u0060colossalai/legacy/moe/openmoe/train.py\u0060 and \u0060examples/images/vit/args.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/moe/openmoe/train.py:171\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060examples/images/vit/args.py:48\u0060 calls \u0060add_argument\u0060 and \u0060examples/language/opt/args.py:37\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/openmoe/train.py"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0f61a176dac92b5d404a0cbe18d22f9543cb94eb56b06b027eace4a269629b1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): colossalai/legacy/nn/layer/parallel_2d/layers.py:122-132 | colossalai/legacy/nn/layer/parallel_2d/layers.py:953-963 | colossalai/legacy/nn/layer/parallel_2d/layers.py:1115-1125 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/nn/layer/parallel_2d/layers.py:122\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2d/layers.py"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"d16718542761cb7596d4d56b691cb08d41606914a1bb1b677bd1dddc152cdb5d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): colossalai/legacy/nn/layer/parallel_2d/layers.py:133-143 | colossalai/legacy/nn/layer/parallel_2d/layers.py:297-307 | colossalai/legacy/nn/layer/parallel_2d/layers.py:1126-1136 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/nn/layer/parallel_2d/layers.py:133\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2d/layers.py"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"713156c386e8063c02c9705c6433b0cafd02e09ed440d54323262f5b53ac8b13"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): colossalai/legacy/nn/loss/loss_1d.py:64-74 | examples/language/gpt/titans/model/embed.py:301-311 | examples/tutorial/sequence_parallel/loss_func/cross_entropy.py:49-59 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/loss/loss_1d.py"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"82c3c687870dabe6c1fe0b29f409c5fae4463e02eec30a72715e8706a7b40230"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 3): colossalai/legacy/nn/loss/loss_2d.py:111-121 | colossalai/legacy/nn/loss/loss_2p5d.py:105-115 | colossalai/legacy/nn/loss/loss_3d.py:104-113 \u2014 before extracting anything, compare \u0060colossalai/legacy/nn/loss/loss_2d.py\u0060 and \u0060colossalai/legacy/nn/loss/loss_2p5d.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/loss/loss_2d.py"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cbee8577d1c1924caddd36d940000f1557cbb92e12ebebbc607038fb9a581c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): colossalai/shardformer/layer/linear.py:526-536 | colossalai/shardformer/layer/qkv_fused_linear.py:564-574 | colossalai/shardformer/layer/qkv_fused_linear.py:1143-1153 \u2014 before extracting anything, compare \u0060colossalai/shardformer/layer/linear.py\u0060 and \u0060colossalai/shardformer/layer/qkv_fused_linear.py\u0060 as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 261 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/linear.py"},"region":{"startLine":526}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc97764bd175137edbfbab2c548e10a7625d8c50f0ee832c5c59e37f491270f4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): colossalai/shardformer/layer/qkv_fused_linear.py:287-297 | colossalai/shardformer/layer/qkv_fused_linear.py:882-892 | colossalai/shardformer/layer/qkv_fused_linear.py:1090-1100 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/qkv_fused_linear.py"},"region":{"startLine":287}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3b259e725b5da8b614cd3e9f615de373bd80d3a92301da175cf8db1e8009714"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 3): colossalai/shardformer/modeling/_bert_tf4.py:97-106 | colossalai/shardformer/modeling/_bert_tf5.py:99-108 | examples/community/roberta/pretraining/model/bert.py:956-966 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 45 separate duplicated blocks between them, totalling at least 882 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"7247c177806e1ea887fb1d5d6c1462d82fa52d380fbe908b6e33945c9472c3d9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): colossalai/shardformer/modeling/_qwen2_tf4.py:634-644 | colossalai/shardformer/modeling/_qwen3_tf4.py:626-636 | colossalai/shardformer/modeling/mistral.py:399-409 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_qwen2_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_qwen3_tf4.py\u0060 as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1214 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen2_tf4.py"},"region":{"startLine":634}}}],"partialFingerprints":{"codehealthFindingId/v1":"498ba272ba727c89bec16281e67e247cfe6d5d3302a6d92b383c51b9abc1fe87"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): colossalai/shardformer/modeling/deepseek.py:716-726 | colossalai/shardformer/modeling/gptj.py:658-668 | colossalai/shardformer/modeling/gptj.py:834-844 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/deepseek.py:716\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/deepseek.py"},"region":{"startLine":716}}}],"partialFingerprints":{"codehealthFindingId/v1":"899595331b5271654e36e10eae5f726d030c1480548ed55833c548a02fbdf4b5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): colossalai/shardformer/policies/_bert_tf4.py:468-478 | colossalai/shardformer/policies/_bert_tf5.py:475-485 | colossalai/shardformer/policies/_vit_tf4.py:262-272 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 475 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060colossalai/shardformer/policies/_bert_tf4.py:479\u0060 calls \u0060is_last_stage\u0060 and \u0060colossalai/shardformer/policies/_vit_tf4.py:273\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_bert_tf4.py"},"region":{"startLine":468}}}],"partialFingerprints":{"codehealthFindingId/v1":"983cd5a95a5edc139f46fa9c7a3f74cbcaa09d8d0215b405a330c0a3737ec217"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): applications/ColossalChat/coati/dataset/tokenization_utils.py:154-163 | applications/ColossalChat/coati/dataset/tokenization_utils.py:242-252 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/dataset/tokenization_utils.py"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"e33ced1368ed5b405676bdac453d7aa3f79ab8ff18c51ac07ca2115751e3b418"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): applications/ColossalMoE/train.py:215-225 | colossalai/legacy/moe/openmoe/train.py:321-331 \u2014 before extracting anything, compare \u0060applications/ColossalMoE/train.py\u0060 and \u0060colossalai/legacy/moe/openmoe/train.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 125 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalMoE/train.py:215\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060applications/ColossalMoE/train.py:210\u0060 calls \u0060print_on_master\u0060, \u0060load_checkpoint\u0060 and \u0060colossalai/legacy/moe/openmoe/train.py:320\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalMoE/train.py"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"54c00d177ae53108f59b5954fc3de19b23099616606631118863eafb7376d40e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): colossalai/auto_parallel/checkpoint/ckpt_solver_base.py:158-168 | colossalai/auto_parallel/offload/region_manager.py:387-396 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/checkpoint/ckpt_solver_base.py"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0b39422231c99b796275bff421cf004b771f48fc5e000985c557cafb2e714a8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): colossalai/auto_parallel/tensor_shard/utils/reshape.py:98-108 | colossalai/auto_parallel/tensor_shard/utils/reshape.py:118-128 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/utils/reshape.py"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"0db73cf56268c79617d99ef505d941cd848b58a53d354a0ec615d25429e7ff24"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): colossalai/booster/plugin/hybrid_parallel_plugin.py:1473-1483 | colossalai/booster/plugin/low_level_zero_plugin.py:503-513 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/plugin/hybrid_parallel_plugin.py"},"region":{"startLine":1473}}}],"partialFingerprints":{"codehealthFindingId/v1":"35666fe97f29279cf7a0e2a61b83c7347377aac90895e110c1c3ecd828544103"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201311 lines \u00D7 2): colossalai/booster/plugin/torch_fsdp_plugin.py:129-137 | colossalai/booster/plugin/torch_fsdp_plugin.py:291-301 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/booster/plugin/torch_fsdp_plugin.py:291\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/plugin/torch_fsdp_plugin.py"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"8046afe0564f3404b6509b2e41c7b048123557c2503aa9d0a250c56d849f1835"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py:477-487 | colossalai/inference/core/plugin.py:95-105 \u2014 before extracting anything, compare \u0060colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py\u0060 and \u0060colossalai/inference/core/plugin.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py:490\u0060 calls \u0060update_master_params\u0060 and \u0060colossalai/inference/core/plugin.py:107\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":477}}}],"partialFingerprints":{"codehealthFindingId/v1":"50e67368291c91e12b1504422487c46087d22d75fa376416a3af0fabcc12bb54"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): colossalai/fx/profiler/experimental/profiler_module/convolution.py:49-59 | colossalai/fx/profiler/experimental/profiler_module/convolution.py:79-89 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/fx/profiler/experimental/profiler_module/convolution.py:49\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060self\u0060 to \u0060torch.nn.Conv2d\u0060 in one and \u0060torch.nn.Conv3d\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/profiler/experimental/profiler_module/convolution.py"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"f49a045eee7b96616f16627b941580a0043f9ea9caec44e9591fc1d02086ca2b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): colossalai/fx/profiler/experimental/profiler_module/convolution.py:98-108 | colossalai/fx/tracer/meta_patch/patched_module/convolution.py:74-84 \u2014 before extracting anything, compare \u0060colossalai/fx/profiler/experimental/profiler_module/convolution.py\u0060 and \u0060colossalai/fx/tracer/meta_patch/patched_module/convolution.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/profiler/experimental/profiler_module/convolution.py"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb6250ac8e2a6599837608033bf1a69b75d7a9b1a1050be08255bdb35e8fa119"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): colossalai/fx/proxy.py:81-90 | colossalai/fx/tracer/_tracer_utils.py:24-34 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/proxy.py"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"877c740f3a04dcb551b94cc2c2f67a145be20e3f24f061fd950ca0593244dbf2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): colossalai/inference/core/diffusion_engine.py:174-183 | colossalai/inference/core/llm_engine.py:630-640 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/core/diffusion_engine.py"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"edb791d3590e4cc98ab3ac7fef9ac74dfb63276feeed184ac375f177bddfb9c7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): colossalai/inference/core/llm_engine.py:194-203 | colossalai/inference/executor/rpc_worker.py:242-252 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/inference/core/llm_engine.py:194\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/core/llm_engine.py"},"region":{"startLine":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"37f6c28ca25a43cafd44dcfc284797f09e99b6804061d3f7afb80bf885f6b591"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): colossalai/inference/core/llm_engine.py:672-682 | colossalai/inference/core/rpc_engine.py:214-224 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/core/llm_engine.py"},"region":{"startLine":672}}}],"partialFingerprints":{"codehealthFindingId/v1":"f65b43445c8f9e39dd8ecbd72fe2d1e647ee65ad6de45785376ad00139486561"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): colossalai/inference/kv_cache/kvcache_manager.py:189-199 | colossalai/inference/kv_cache/kvcache_manager.py:242-252 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/inference/kv_cache/kvcache_manager.py:240\u0060 calls \u0060size\u0060 and \u0060colossalai/inference/kv_cache/kvcache_manager.py:186\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/kv_cache/kvcache_manager.py"},"region":{"startLine":189}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d318959ccbe66b4df30307f73c3bb3a5d0a3d8e7cdeac4475df3f6b9f6ac11d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): colossalai/inference/modeling/layers/attention.py:217-227 | colossalai/inference/modeling/layers/attention.py:279-288 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/modeling/layers/attention.py"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ec8c00842b6deeeeba18c2896d7b45bb26cbc1ee0d2671806af5e0358509775"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): colossalai/legacy/inference/hybridengine/modeling/llama.py:267-277 | colossalai/legacy/inference/tensor_parallel/modeling/llama.py:181-191 \u2014 before extracting anything, compare \u0060colossalai/legacy/inference/hybridengine/modeling/llama.py\u0060 and \u0060colossalai/legacy/inference/tensor_parallel/modeling/llama.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 250 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/inference/hybridengine/modeling/llama.py:267\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/hybridengine/modeling/llama.py"},"region":{"startLine":267}}}],"partialFingerprints":{"codehealthFindingId/v1":"36cec67295ab88c156937516a327bc2ec992da51825297645c7ed8816a94bfdc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_1d/_utils.py:45-55 | colossalai/shardformer/layer/_operation.py:1197-1207 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/nn/layer/parallel_1d/_utils.py:45\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_1d/_utils.py"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5adea006550cf0625b0dab020d2832f71104d2eed381abb7e582a60351c96d2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201311 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_1d/layers.py:725-733 | colossalai/shardformer/layer/linear.py:559-569 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/nn/layer/parallel_1d/layers.py:725\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_1d/layers.py"},"region":{"startLine":725}}}],"partialFingerprints":{"codehealthFindingId/v1":"547b93708f3935b0fba042c4cf9ca82add81d7f1fd3d4ab931885091fac5a596"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_2d/_operation.py:269-279 | colossalai/legacy/nn/layer/parallel_2p5d/_operation.py:227-236 \u2014 \u0060colossalai/legacy/nn/layer/parallel_2d/_operation.py\u0060 and \u0060colossalai/legacy/nn/layer/parallel_2p5d/_operation.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 16 separate duplicated blocks between them, totalling at least 185 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/nn/layer/parallel_2d/_operation.py:269\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2d/_operation.py"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ad02c45d59c4844b0973719293c24e3ca6fed953df4b3884c355480fbd2a719"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_2p5d/layers.py:310-320 | colossalai/legacy/nn/layer/parallel_2p5d/layers.py:1142-1152 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/nn/layer/parallel_2p5d/layers.py:310\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2p5d/layers.py"},"region":{"startLine":310}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebdfe9572a050abd86945eb16eee9dec2629a54e471c7e985b7a11ca13c7a3f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_3d/layers.py:237-246 | colossalai/legacy/nn/layer/parallel_3d/layers.py:567-577 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_3d/layers.py"},"region":{"startLine":237}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4b606c456443acc2083c06a1ac465c89fb59cc22d5964b7c0ccec2b0346074f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_3d/layers.py:278-288 | colossalai/legacy/nn/layer/parallel_3d/layers.py:610-620 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/nn/layer/parallel_3d/layers.py:278\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_3d/layers.py"},"region":{"startLine":278}}}],"partialFingerprints":{"codehealthFindingId/v1":"56d28ea6104118475b6b99aa315d7a31ab67256a2457892529a427a1e345327f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): colossalai/legacy/nn/parallel/layers/cache_embedding/cache_mgr.py:417-427 | colossalai/legacy/nn/parallel/layers/cache_embedding/cache_mgr.py:435-444 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/parallel/layers/cache_embedding/cache_mgr.py"},"region":{"startLine":417}}}],"partialFingerprints":{"codehealthFindingId/v1":"345fbe69e68008eecff3cf947699d5a9cf0622a72d61a0b05e70c3d786cd5733"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): colossalai/nn/optimizer/distributed_adafactor.py:343-353 | colossalai/nn/optimizer/distributed_came.py:384-394 \u2014 before extracting anything, compare \u0060colossalai/nn/optimizer/distributed_adafactor.py\u0060 and \u0060colossalai/nn/optimizer/distributed_came.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 201 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/nn/optimizer/distributed_adafactor.py:343\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/distributed_adafactor.py"},"region":{"startLine":343}}}],"partialFingerprints":{"codehealthFindingId/v1":"38c8d50a1a7692f7d6e940f921f75e8ca53ebfbab51417fbf8412a16dbbad0d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): colossalai/nn/optimizer/distributed_came.py:261-271 | colossalai/nn/optimizer/distributed_came.py:314-324 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/distributed_came.py"},"region":{"startLine":261}}}],"partialFingerprints":{"codehealthFindingId/v1":"6831e3cab4ac5e9059b46b85345a8d855be85f0dff44a209b79390bdd0c77d8f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): colossalai/pipeline/schedule/interleaved_pp.py:115-125 | colossalai/pipeline/schedule/zero_bubble_pp.py:207-217 \u2014 before extracting anything, compare \u0060colossalai/pipeline/schedule/interleaved_pp.py\u0060 and \u0060colossalai/pipeline/schedule/zero_bubble_pp.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 82 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/pipeline/schedule/interleaved_pp.py"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"9dcb04c03725aa2be354c3d09e1f75c64effbc82ab8c3abfabc0ef616612b3c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): colossalai/pipeline/schedule/interleaved_pp.py:482-491 | colossalai/pipeline/schedule/interleaved_pp.py:510-520 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/pipeline/schedule/interleaved_pp.py"},"region":{"startLine":482}}}],"partialFingerprints":{"codehealthFindingId/v1":"5dec4e645d1e391d55fc8fad3de8594336139a94058109708625311699a8504e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): colossalai/pipeline/schedule/v_schedule.py:213-223 | colossalai/pipeline/schedule/v_schedule.py:258-268 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/pipeline/schedule/v_schedule.py"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"ded3826d1d79da241128fbd66c5f4487e553981bbe29664156386bfa85a19def"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): colossalai/shardformer/layer/attn.py:723-732 | colossalai/shardformer/layer/attn.py:743-753 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/layer/attn.py:723\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/attn.py"},"region":{"startLine":723}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a53822f238d1585d78cd4b89d4d2377ace58844f97e03e6bf919bf99fbbfc1c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): colossalai/shardformer/layer/attn.py:854-864 | colossalai/shardformer/layer/attn.py:870-880 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/attn.py"},"region":{"startLine":854}}}],"partialFingerprints":{"codehealthFindingId/v1":"f170de0c0fb25f7ec124c68742adae63a7f93263ad931eeffa027a45e09eda68"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): colossalai/shardformer/modeling/chatglm2.py:587-597 | colossalai/shardformer/modeling/chatglm2.py:602-612 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/chatglm2.py:587\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/chatglm2.py"},"region":{"startLine":587}}}],"partialFingerprints":{"codehealthFindingId/v1":"2677366e79f6562ac070265c4b1a5ded02d58319893e6917dc73106b092c4fca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): colossalai/shardformer/policies/_whisper_tf4.py:769-779 | colossalai/shardformer/policies/_whisper_tf5.py:756-766 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_whisper_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_whisper_tf5.py\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 483 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_whisper_tf4.py"},"region":{"startLine":769}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c0551b00b4c5a6b5f0baee0ea915dfa5d5e47bfb1d6858de4d687f92be6e3ab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): colossalai/shardformer/policies/blip2.py:49-59 | colossalai/shardformer/policies/sam.py:26-35 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/blip2.py"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"afd8c820598ebc8992c89d462b45049063e4b6f47f3dfffb22f2aea991a2d54a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): extensions/cpp_extension.py:98-108 | extensions/cuda_extension.py:103-113 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060extensions/cpp_extension.py:98\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060extensions/cuda_extension.py:102\u0060 calls \u0060nvcc_flags\u0060 and \u0060extensions/cpp_extension.py:97\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"extensions/cpp_extension.py"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"30f571c8862c140d3e1fb77c8caa025ab16c113c52ab445bdf1ac190956ac6a1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 7): colossalai/legacy/moe/openmoe/model/openmoe_policy.py:269-278 | colossalai/shardformer/modeling/_mixtral_tf4.py:248-257 | colossalai/shardformer/modeling/_mixtral_tf5.py:592-601 | colossalai/shardformer/modeling/_qwen2_tf4.py:78-88 | colossalai/shardformer/modeling/_qwen3_tf4.py:78-88 | colossalai/shardformer/modeling/command.py:80-89 | colossalai/shardformer/modeling/deepseek.py:345-354 \u2014 before extracting anything, compare \u0060colossalai/legacy/moe/openmoe/model/openmoe_policy.py\u0060 and \u0060colossalai/shardformer/modeling/_mixtral_tf4.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 130 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/moe/openmoe/model/openmoe_policy.py:269\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/openmoe/model/openmoe_policy.py"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"db1519d9fd7a934eb922f3b6fb9b2834193b564a8d9fec3673fa9ce2af6f2ac1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 6): applications/ColossalChat/coati/trainer/grpo.py:185-193 | applications/ColossalChat/coati/trainer/kto.py:109-117 | applications/ColossalChat/coati/trainer/orpo.py:99-107 | applications/ColossalChat/coati/trainer/ppo.py:176-184 | applications/ColossalChat/coati/trainer/rm.py:97-105 | applications/ColossalChat/coati/trainer/sft.py:87-96 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/trainer/grpo.py\u0060 and \u0060applications/ColossalChat/coati/trainer/ppo.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 176 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/grpo.py"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"15a24c64cbed7df17caf17e4dea27c22fedcb6bec65ca5e8b3baff2962b2cb48"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 6): colossalai/auto_parallel/tensor_shard/node_handler/strategy/embedding_generator.py:55-65 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/getitem_generator.py:35-44 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/reshape_generator.py:39-48 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/softmax_generator.py:39-48 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/sum_generator.py:36-45 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/unary_elementwise_generator.py:27-36 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 6 call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/embedding_generator.py"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"48919c5e16b94f07bb7ac4a085b6337f926f2cc8e6434528ac5420b0c65f642c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 6): colossalai/fx/profiler/experimental/profiler_module/convolution.py:98-107 | colossalai/fx/profiler/experimental/profiler_module/convolution.py:133-142 | colossalai/fx/profiler/experimental/profiler_module/convolution.py:174-183 | colossalai/fx/tracer/meta_patch/patched_module/convolution.py:74-83 | colossalai/fx/tracer/meta_patch/patched_module/convolution.py:101-110 | colossalai/fx/tracer/meta_patch/patched_module/convolution.py:136-145 \u2014 before extracting anything, compare \u0060colossalai/fx/profiler/experimental/profiler_module/convolution.py\u0060 and \u0060colossalai/fx/tracer/meta_patch/patched_module/convolution.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/fx/profiler/experimental/profiler_module/convolution.py:98\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060self\u0060 to \u0060torch.nn.ConvTranspose1d\u0060 in one and \u0060torch.nn.ConvTranspose2d\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/profiler/experimental/profiler_module/convolution.py"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"172b68b3114447633a8f717dd85ccf7ae2a14190b4933efc0b8f63acec36eb68"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 6): colossalai/shardformer/layer/linear.py:109-118 | colossalai/shardformer/layer/linear.py:467-476 | colossalai/shardformer/layer/qkv_fused_linear.py:504-513 | colossalai/shardformer/layer/qkv_fused_linear.py:706-715 | colossalai/shardformer/layer/qkv_fused_linear.py:1095-1104 | colossalai/shardformer/layer/qkv_fused_linear.py:1281-1290 \u2014 before extracting anything, compare \u0060colossalai/shardformer/layer/linear.py\u0060 and \u0060colossalai/shardformer/layer/qkv_fused_linear.py\u0060 as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 261 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060colossalai/shardformer/layer/linear.py:477\u0060 calls \u0060fork_rng\u0060 and \u0060colossalai/shardformer/layer/linear.py:120\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/linear.py"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f8fd180e65c478a23988c11b55822736e928e33de415fdc8184a8c9f229d3c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201310 lines \u00D7 6): colossalai/shardformer/modeling/_bert_tf4.py:810-819 | colossalai/shardformer/modeling/_bert_tf5.py:823-832 | colossalai/shardformer/modeling/gpt2.py:678-687 | colossalai/shardformer/modeling/t5.py:657-666 | examples/community/roberta/pretraining/model/bert.py:1764-1773 | examples/community/roberta/pretraining/model/deberta_v2.py:1420-1427 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 45 separate duplicated blocks between them, totalling at least 882 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_bert_tf4.py:810\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060examples/community/roberta/pretraining/model/deberta_v2.py:1397\u0060 calls \u0060LongTensor\u0060 and \u0060colossalai/shardformer/modeling/gpt2.py:641\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":810}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb4b6744c17c568e515af6b2a3721611dc07a4b2bd35fed4486a3821ba48857e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 5): colossalai/legacy/nn/layer/parallel_1d/layers.py:566-575 | colossalai/shardformer/layer/linear.py:154-164 | colossalai/shardformer/layer/linear.py:332-342 | colossalai/shardformer/layer/qkv_fused_linear.py:956-965 | colossalai/shardformer/layer/qkv_fused_linear.py:1337-1346 \u2014 there are 5 copies across 3 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_1d/layers.py"},"region":{"startLine":566}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc59fc26871497c1ffa94842f18a7ab9a0b34d9fdf3730975b0d05704c5716f6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201310 lines \u00D7 4): colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py:163-170 | colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py:177-184 | colossalai/zero/gemini/gemini_ddp.py:947-956 | colossalai/zero/gemini/gemini_ddp.py:965-972 \u2014 there are 4 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":163}}}],"partialFingerprints":{"codehealthFindingId/v1":"7cdb1376b211ef6243cc92ae71e153acfa90b86b9854f320a123efcda4cbc4c4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): colossalai/legacy/inference/hybridengine/modeling/llama.py:249-258 | colossalai/legacy/inference/tensor_parallel/modeling/bloom.py:156-165 | colossalai/legacy/inference/tensor_parallel/modeling/chatglm2.py:136-145 | colossalai/legacy/inference/tensor_parallel/modeling/llama.py:158-167 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/inference/hybridengine/modeling/llama.py:249\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/hybridengine/modeling/llama.py"},"region":{"startLine":249}}}],"partialFingerprints":{"codehealthFindingId/v1":"88e4577b86bca8065c8cd686a67ee6eea6b4ac9952426a0d9db51c999b906232"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201310 lines \u00D7 4): colossalai/shardformer/modeling/_llama_tf4.py:598-607 | colossalai/shardformer/modeling/_qwen2_tf4.py:591-599 | colossalai/shardformer/modeling/_qwen3_tf4.py:583-591 | colossalai/shardformer/modeling/command.py:412-419 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_llama_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_qwen2_tf4.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 241 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_llama_tf4.py:598\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_llama_tf4.py"},"region":{"startLine":598}}}],"partialFingerprints":{"codehealthFindingId/v1":"53b697c5332bc7a3972b844f3badba4bb2de31c0176b094abf2ff1888c5f5a80"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): colossalai/shardformer/modeling/bloom.py:483-492 | colossalai/shardformer/modeling/falcon.py:512-521 | colossalai/shardformer/modeling/gpt2.py:759-768 | colossalai/shardformer/modeling/gptj.py:422-431 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/bloom.py\u0060 and \u0060colossalai/shardformer/modeling/falcon.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 594 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/shardformer/modeling/bloom.py:482\u0060 calls \u0060ValueError\u0060 and \u0060colossalai/shardformer/modeling/gptj.py:420\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/bloom.py"},"region":{"startLine":483}}}],"partialFingerprints":{"codehealthFindingId/v1":"241c47a6d000997b153ce5d323ca25d2f25cc15be101241e2954a7672a9c1de6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): colossalai/shardformer/policies/_vit_tf4.py:382-391 | colossalai/shardformer/policies/_vit_tf4.py:418-427 | colossalai/shardformer/policies/_vit_tf5.py:232-241 | colossalai/shardformer/policies/_vit_tf5.py:268-277 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_vit_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_vit_tf5.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 133 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_vit_tf4.py"},"region":{"startLine":382}}}],"partialFingerprints":{"codehealthFindingId/v1":"77744bb840b96540018414e8ebffd592cbde5e0c17a6d79412020e7bdfc967aa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): applications/Colossal-LLaMA/dataset/prepare_pretrain_dataset.py:28-37 | applications/Colossal-LLaMA/dataset/prepare_sft_dataset.py:25-34 | applications/ColossalChat/examples/data_preparation_scripts/prepare_dataset.py:61-75 \u2014 before extracting anything, compare \u0060applications/Colossal-LLaMA/dataset/prepare_pretrain_dataset.py\u0060 and \u0060applications/Colossal-LLaMA/dataset/prepare_sft_dataset.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 116 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/examples/data_preparation_scripts/prepare_dataset.py:61\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/dataset/prepare_pretrain_dataset.py"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f6d61a798aad790091ba3512419aa4a3d5326e09875964439c3e1ceac4bc439"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): colossalai/auto_parallel/tensor_shard/node_handler/addmm_handler.py:77-86 | colossalai/auto_parallel/tensor_shard/node_handler/binary_elementwise_handler.py:101-110 | colossalai/auto_parallel/tensor_shard/node_handler/bmm_handler.py:96-105 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/auto_parallel/tensor_shard/node_handler/addmm_handler.py:77\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/addmm_handler.py"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"f870e543e7b51e546f25321c7626a295a4eb3e239d16549b1426e1b4fa2e677a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): colossalai/fx/tracer/meta_patch/patched_module/pooling.py:94-103 | colossalai/fx/tracer/meta_patch/patched_module/pooling.py:118-127 | colossalai/fx/tracer/meta_patch/patched_module/pooling.py:146-155 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060colossalai/fx/tracer/meta_patch/patched_module/pooling.py:159\u0060 calls \u0060floor\u0060 and \u0060colossalai/fx/tracer/meta_patch/patched_module/pooling.py:132\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/meta_patch/patched_module/pooling.py"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"99aa54fd32b1345ea43c0569efcc18d0135d471be6c4e1c5e8caafcbde29dc1e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): colossalai/legacy/moe/openmoe/model/convert_openmoe_ckpt.py:54-63 | colossalai/legacy/moe/openmoe/model/convert_openmoe_ckpt.py:67-76 | colossalai/legacy/moe/openmoe/model/convert_openmoe_ckpt.py:80-89 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/openmoe/model/convert_openmoe_ckpt.py"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"4685223151856fdd4872940602562f3a207a59fc84b9d7a0058ebf7283dd07ee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): colossalai/legacy/nn/layer/parallel_3d/layers.py:259-268 | colossalai/legacy/nn/layer/parallel_3d/layers.py:435-444 | colossalai/legacy/nn/layer/parallel_3d/layers.py:591-600 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/nn/layer/parallel_3d/layers.py:259\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_3d/layers.py"},"region":{"startLine":259}}}],"partialFingerprints":{"codehealthFindingId/v1":"f186a3fb497c90d1037df903cade9317b4fe4281b50542e72d35794b1ee155d2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201310 lines \u00D7 3): colossalai/legacy/pipeline/rpc/_pipeline_base.py:655-662 | colossalai/legacy/pipeline/rpc/_pipeline_base.py:717-724 | colossalai/legacy/pipeline/rpc/utils.py:90-99 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/pipeline/rpc/_pipeline_base.py"},"region":{"startLine":655}}}],"partialFingerprints":{"codehealthFindingId/v1":"e27a93eaf6aa3a4b760f062cbb0f26c2d9b1d3c7ef12be888c59be0cb5974c39"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): colossalai/nn/optimizer/distributed_adafactor.py:234-243 | colossalai/nn/optimizer/distributed_came.py:227-237 | colossalai/nn/optimizer/distributed_came.py:281-290 \u2014 before extracting anything, compare \u0060colossalai/nn/optimizer/distributed_adafactor.py\u0060 and \u0060colossalai/nn/optimizer/distributed_came.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 201 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/distributed_adafactor.py"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"37db49973f11d7195e18e78cf6d4ee918a72cdc228dbadc6b550cbf941e75904"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 3): colossalai/nn/optimizer/distributed_adafactor.py:253-261 | colossalai/nn/optimizer/distributed_came.py:247-256 | colossalai/nn/optimizer/distributed_came.py:300-309 \u2014 before extracting anything, compare \u0060colossalai/nn/optimizer/distributed_adafactor.py\u0060 and \u0060colossalai/nn/optimizer/distributed_came.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 201 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/distributed_adafactor.py"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4b01cb1876f962b97188d8f0b9d52638198722b7d902b33a3c09d901430d7eb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201310 lines \u00D7 3): colossalai/nn/optimizer/distributed_adafactor.py:336-343 | colossalai/nn/optimizer/distributed_adafactor.py:350-357 | colossalai/nn/optimizer/distributed_adafactor.py:364-373 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/distributed_adafactor.py"},"region":{"startLine":336}}}],"partialFingerprints":{"codehealthFindingId/v1":"04b5e5dba86bfb2f727e9578637e0ef5cd4ad388a80d8831f23a02da40eb0707"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): colossalai/shardformer/modeling/_bert_tf4.py:85-94 | colossalai/shardformer/modeling/_bert_tf5.py:87-96 | examples/community/roberta/pretraining/model/bert.py:945-954 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 45 separate duplicated blocks between them, totalling at least 882 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ff4a8cea82b33f8210bdab2a6153f6160dfce6a6dbfab0d5ffd66193200d880"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201310 lines \u00D7 3): colossalai/shardformer/modeling/_llama_tf5.py:640-649 | colossalai/shardformer/modeling/_qwen2_tf5.py:449-456 | colossalai/shardformer/modeling/_qwen3_tf5.py:450-457 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_llama_tf5.py\u0060 and \u0060colossalai/shardformer/modeling/_qwen2_tf5.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_llama_tf5.py:640\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_llama_tf5.py"},"region":{"startLine":640}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf2ab04d52efab740c2fe97828878083e26fcb540e7f2832c6b56fdbc54fa8d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): colossalai/shardformer/modeling/_mixtral_tf4.py:675-684 | colossalai/shardformer/modeling/_mixtral_tf5.py:1069-1078 | colossalai/shardformer/modeling/deepseek.py:710-719 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_mixtral_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_mixtral_tf5.py\u0060 as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 581 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_mixtral_tf4.py:675\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_mixtral_tf4.py"},"region":{"startLine":675}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6a2192895feedd71580a0f3495a428b3db5b077affd827e6ed843004adba40e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): colossalai/shardformer/policies/_mixtral_tf4.py:55-65 | colossalai/shardformer/policies/_mixtral_tf5.py:61-71 | colossalai/shardformer/policies/deepseek.py:63-72 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_mixtral_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_mixtral_tf5.py\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 408 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_mixtral_tf4.py"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e06046ec9cabb6ab414470dc5da2df609a692cef04c882b868fe164eb206a15"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): colossalai/shardformer/policies/_vit_tf4.py:42-51 | colossalai/shardformer/policies/gptj.py:50-59 | colossalai/shardformer/policies/opt.py:83-92 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/gptj.py\u0060 and \u0060colossalai/shardformer/policies/opt.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_vit_tf4.py"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f34ca4e62ea97cdfce2f8911854b4a31fd0b3699f863634e9331dad4b63bdbf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): .github/scripts/ci/run_gpu_batch.py:64-73 | .github/scripts/e1/pr_gpu.py:42-51 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":".github/scripts/ci/run_gpu_batch.py"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"efc2b6ebfee0a4eafd732a9b535d70b9a34dbb7913032039315d07562851f90b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): applications/Colossal-LLaMA/train.py:352-361 | applications/ColossalChat/examples/training_scripts/lora_finetune.py:323-332 \u2014 before extracting anything, compare \u0060applications/Colossal-LLaMA/train.py\u0060 and \u0060applications/ColossalChat/examples/training_scripts/lora_finetune.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/train.py"},"region":{"startLine":352}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2689836eac241bd150ff48e881f99d93a0c0a9fafa2cde6fc064e39e6dffa30"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): applications/ColossalChat/coati/distributed/producer.py:61-70 | applications/ColossalChat/coati/distributed/zero_bubble/producer.py:61-70 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/distributed/producer.py\u0060 and \u0060applications/ColossalChat/coati/distributed/zero_bubble/producer.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 234 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/producer.py"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"396f8d05780d8a291174a33953275407062f17d7b0825d463881970e97c5cc5d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): applications/ColossalChat/coati/trainer/grpo.py:235-244 | applications/ColossalChat/coati/trainer/ppo.py:225-235 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/trainer/grpo.py\u0060 and \u0060applications/ColossalChat/coati/trainer/ppo.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 176 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/coati/trainer/grpo.py:235\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060applications/ColossalChat/coati/trainer/ppo.py:223\u0060 calls \u0060train\u0060 and \u0060applications/ColossalChat/coati/trainer/grpo.py:232\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/grpo.py"},"region":{"startLine":235}}}],"partialFingerprints":{"codehealthFindingId/v1":"00044504f487787160e95bb00bee6833862d379a3b662df3779e8ec70b472a76"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): applications/ColossalEval/colossal_eval/evaluate/dataset_evaluator/metrics.py:547-556 | applications/ColossalEval/colossal_eval/evaluate/dataset_evaluator/metrics.py:560-569 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/evaluate/dataset_evaluator/metrics.py"},"region":{"startLine":547}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c3e3d385556b1ce8f21263e85518c86cb243a63aedcab936322975b4b1d2ca8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): colossalai/_analyzer/_subclasses/flop_tensor.py:120-129 | colossalai/_analyzer/_subclasses/flop_tensor.py:137-146 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/_subclasses/flop_tensor.py"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ddedbeabff462b6d56c86f7f681b465ee773983c03ee2b23320b467bd0c2264"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): colossalai/auto_parallel/offload/region_manager.py:473-482 | colossalai/auto_parallel/offload/region_manager.py:491-500 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/offload/region_manager.py"},"region":{"startLine":473}}}],"partialFingerprints":{"codehealthFindingId/v1":"12fc858444c665d2803bbe1f1547b8f4d4dee8f83b3af8109ccd97c6a19b5397"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): colossalai/auto_parallel/offload/runtime.py:73-82 | colossalai/auto_parallel/offload/runtime.py:100-109 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/offload/runtime.py"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"213c651a552d9241fabe3f81a727c01eba38d37d2bcb599fc92278fe0008073a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): colossalai/auto_parallel/tensor_shard/node_handler/batch_norm_handler.py:30-39 | colossalai/auto_parallel/tensor_shard/node_handler/layer_norm_handler.py:28-37 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/batch_norm_handler.py"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1651be41a363d75a23d624921d99ddccfea1261d7df7bda0c5a157303d9d852"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): colossalai/booster/plugin/torch_fsdp_plugin.py:139-148 | colossalai/booster/plugin/torch_fsdp_plugin.py:303-312 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/plugin/torch_fsdp_plugin.py"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"19429bb48a32795cbed4451e52426c71b80c192a7118c1a6ea27d9eeb8129ffc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py:353-361 | colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py:629-638 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py:353\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":353}}}],"partialFingerprints":{"codehealthFindingId/v1":"67f915ce3749d9b97b4602cd265d142d0065035693aadd2217decdacd3673779"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): colossalai/checkpoint_io/moe_checkpoint.py:247-256 | colossalai/checkpoint_io/moe_checkpoint.py:527-535 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/checkpoint_io/moe_checkpoint.py:247\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/moe_checkpoint.py"},"region":{"startLine":247}}}],"partialFingerprints":{"codehealthFindingId/v1":"6501d2f87527036388b19a23a37b17139776e948485cf1cbbaf4f12b3a54fe15"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): colossalai/checkpoint_io/utils.py:1074-1083 | colossalai/interface/model.py:32-41 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/utils.py"},"region":{"startLine":1074}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab39e2b016eef28217d6c9928415911b0188bc68012afce4d552b0cd98435192"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): colossalai/fx/tracer/experimental.py:275-284 | colossalai/fx/tracer/tracer.py:346-355 \u2014 before extracting anything, compare \u0060colossalai/fx/tracer/experimental.py\u0060 and \u0060colossalai/fx/tracer/tracer.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 138 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/experimental.py"},"region":{"startLine":275}}}],"partialFingerprints":{"codehealthFindingId/v1":"5587b14a6ad6dce6f1c3d3782fea8740221b05f8e290c6af424b50c11be3b37a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): colossalai/kernel/triton/flash_decoding.py:91-99 | colossalai/kernel/triton/flash_decoding.py:208-217 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/kernel/triton/flash_decoding.py:208\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060colossalai/kernel/triton/flash_decoding.py:218\u0060 calls \u0060load\u0060 and \u0060colossalai/kernel/triton/flash_decoding.py:100\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/flash_decoding.py"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"a957dd31e602bcb29ba5c44a3a3678d5939a78bac726b29b86c4bdafb5050f55"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): colossalai/legacy/inference/dynamic_batching/ray_dist_init.py:24-33 | colossalai/legacy/inference/serving/ray_serve/Colossal_Inference_rayserve.py:33-42 \u2014 before extracting anything, compare \u0060colossalai/legacy/inference/dynamic_batching/ray_dist_init.py\u0060 and \u0060colossalai/legacy/inference/serving/ray_serve/Colossal_Inference_rayserve.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/dynamic_batching/ray_dist_init.py"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"92eb7f2e768edae7d4c205bd4f75d86cd841689127f3c0f8f44b7e8156c2a1cb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): colossalai/legacy/inference/quant/smoothquant/models/llama.py:607-615 | colossalai/legacy/inference/tensor_parallel/modeling/chatglm2.py:140-149 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/inference/tensor_parallel/modeling/chatglm2.py:140\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/quant/smoothquant/models/llama.py"},"region":{"startLine":607}}}],"partialFingerprints":{"codehealthFindingId/v1":"59368c050b836eb7a48ed134bea62ed0864bc6adb324bb4c4d11cdf568b0e2a7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): colossalai/legacy/moe/openmoe/model/modeling_openmoe.py:974-983 | colossalai/legacy/moe/openmoe/model/openmoe_policy.py:543-552 \u2014 before extracting anything, compare \u0060colossalai/legacy/moe/openmoe/model/modeling_openmoe.py\u0060 and \u0060colossalai/legacy/moe/openmoe/model/openmoe_policy.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/moe/openmoe/model/modeling_openmoe.py:974\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/openmoe/model/modeling_openmoe.py"},"region":{"startLine":974}}}],"partialFingerprints":{"codehealthFindingId/v1":"684d11b304718d965131f50a1e4451aca6897bea3a710bb0a7a23fcbb73e9ce6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201310 lines \u00D7 2): colossalai/legacy/moe/openmoe/train.py:133-142 | examples/language/opt/args.py:28-35 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/moe/openmoe/train.py:133\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/openmoe/train.py"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"ceb8e3c09f8d829c8bdb7db710706e6d091b427a7e4335463b281ff81e478594"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_1d/_operation.py:28-37 | colossalai/shardformer/layer/_operation.py:54-63 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_1d/_operation.py"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"075918798e26a7b022eaf59ae4840bc42e6c31018ea92677620cc9c04990a803"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_1d/layers.py:284-293 | colossalai/legacy/nn/layer/parallel_1d/layers.py:697-706 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_1d/layers.py"},"region":{"startLine":284}}}],"partialFingerprints":{"codehealthFindingId/v1":"90002f92a858506cb832b53ad322689ef8476edbfe402c0c23fd48d630ccdbea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_1d/layers.py:300-309 | colossalai/legacy/nn/layer/parallel_1d/layers.py:713-722 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/nn/layer/parallel_1d/layers.py:300\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_1d/layers.py"},"region":{"startLine":300}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ec5f0f39fbd35e75262fa7049c21c3f6d412e1fef9489148af2a5af7cf4bcbd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_1d/layers.py:421-430 | colossalai/legacy/nn/layer/parallel_1d/layers.py:554-563 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_1d/layers.py"},"region":{"startLine":421}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d744749df129fab2148189cd44ce8be192b666f64eda6a80734c77d5108cfa3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_2d/_operation.py:136-144 | colossalai/legacy/nn/layer/parallel_2p5d/_operation.py:88-97 \u2014 \u0060colossalai/legacy/nn/layer/parallel_2d/_operation.py\u0060 and \u0060colossalai/legacy/nn/layer/parallel_2p5d/_operation.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 16 separate duplicated blocks between them, totalling at least 185 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2d/_operation.py"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"33ef09cb056ff5f23ac4f42894d285efa2938f886fdd714fd7d324bfc7365d5c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_3d/layers.py:109-118 | colossalai/legacy/nn/layer/parallel_3d/layers.py:261-269 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/nn/layer/parallel_3d/layers.py:109\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_3d/layers.py"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"09a8221def1bf6bfb12599810553f09668be42ea18bc0b8ab6d62ba27a6e154f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_3d/layers.py:466-475 | colossalai/legacy/nn/layer/parallel_3d/layers.py:647-656 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_3d/layers.py"},"region":{"startLine":466}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc0eeded258076ae2dead1c997f068e887149e6482c208f65146ce98f16f62f1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): colossalai/legacy/nn/loss/loss_1d.py:31-40 | examples/language/gpt/titans/model/embed.py:263-272 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/loss/loss_1d.py"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0df515c72fd45bae1a704d460cff748e07adb5badf933f0c79d706f5c7101eb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): colossalai/legacy/pipeline/rpc/_pipeline_base.py:634-643 | colossalai/legacy/pipeline/rpc/_pipeline_base.py:738-747 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/pipeline/rpc/_pipeline_base.py"},"region":{"startLine":634}}}],"partialFingerprints":{"codehealthFindingId/v1":"df92d13585adf3cac041b32e64cc2087b429935ea2b874975f8a3e8c9e75775e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): colossalai/nn/optimizer/distributed_adafactor.py:179-188 | colossalai/nn/optimizer/distributed_came.py:172-181 \u2014 before extracting anything, compare \u0060colossalai/nn/optimizer/distributed_adafactor.py\u0060 and \u0060colossalai/nn/optimizer/distributed_came.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 201 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/distributed_adafactor.py"},"region":{"startLine":179}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2d2114b7a8617d583094db466d04526c23de7a4167af9749a16df9ce2e0be3b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): colossalai/pipeline/schedule/generate.py:161-170 | colossalai/pipeline/schedule/generate.py:398-406 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/pipeline/schedule/generate.py"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"03978e7bbd8dc0a899ca423acb2a5f4115a17051386e8462597585086bd71cdf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): colossalai/pipeline/schedule/interleaved_pp.py:407-415 | colossalai/pipeline/schedule/interleaved_pp.py:469-478 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/pipeline/schedule/interleaved_pp.py"},"region":{"startLine":407}}}],"partialFingerprints":{"codehealthFindingId/v1":"5edc488c2ee454b1a90491467611afcfcddfcb9cf039fa3e1a04cabb7f8d6a98"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): colossalai/pipeline/schedule/zero_bubble_pp.py:840-849 | colossalai/pipeline/schedule/zero_bubble_pp.py:886-895 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/pipeline/schedule/zero_bubble_pp.py"},"region":{"startLine":840}}}],"partialFingerprints":{"codehealthFindingId/v1":"c443912b976e62be75c956c13b51a862266338898171b2515b6b78602c17c3fd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): colossalai/shardformer/layer/linear.py:547-556 | colossalai/shardformer/layer/qkv_fused_linear.py:1164-1173 \u2014 before extracting anything, compare \u0060colossalai/shardformer/layer/linear.py\u0060 and \u0060colossalai/shardformer/layer/qkv_fused_linear.py\u0060 as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 261 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/layer/linear.py:547\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/linear.py"},"region":{"startLine":547}}}],"partialFingerprints":{"codehealthFindingId/v1":"00c0f89cb45764f0723be8893988b0e0d8c99286d81759d578ce66cb28749461"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): colossalai/shardformer/modeling/_bert_tf4.py:1284-1293 | colossalai/shardformer/modeling/_bert_tf5.py:1273-1282 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 45 separate duplicated blocks between them, totalling at least 882 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":1284}}}],"partialFingerprints":{"codehealthFindingId/v1":"53e2f04cc294acaee57dc2b09d47665ea44501bfe26d6b150b96daf923f91c81"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): colossalai/shardformer/modeling/_mixtral_tf4.py:117-126 | colossalai/shardformer/modeling/_mixtral_tf5.py:465-474 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_mixtral_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_mixtral_tf5.py\u0060 as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 581 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_mixtral_tf4.py"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"40e6f847ce416a786143f179e7acaba84e45058bc92d958fe01cedb2136ca20f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): colossalai/shardformer/modeling/_mixtral_tf4.py:539-548 | colossalai/shardformer/modeling/_mixtral_tf5.py:917-926 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_mixtral_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_mixtral_tf5.py\u0060 as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 581 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_mixtral_tf4.py:539\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_mixtral_tf4.py"},"region":{"startLine":539}}}],"partialFingerprints":{"codehealthFindingId/v1":"55ab0bc914637b87670fbd259cbd269ac7edfc2895b21df89a4f8fc0315ebb06"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): colossalai/shardformer/modeling/_vit_tf4.py:143-152 | colossalai/shardformer/modeling/_vit_tf5.py:64-73 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_vit_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_vit_tf5.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 183 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_vit_tf4.py:143\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_vit_tf4.py"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"570497644887f76b786e502be6b77c509aadd4d8a47ab81e4b5df51d333c4ea0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): colossalai/shardformer/modeling/_vit_tf4.py:231-240 | colossalai/shardformer/modeling/_vit_tf5.py:156-165 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_vit_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_vit_tf5.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 183 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_vit_tf4.py:231\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_vit_tf4.py"},"region":{"startLine":231}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb8172d0b8a259e6cd4e97f59cd5211a4d840ebeb9d1ebc8f62431d3048861e2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): colossalai/shardformer/modeling/_whisper_tf4.py:710-719 | colossalai/shardformer/modeling/opt.py:639-648 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_whisper_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/opt.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 105 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_whisper_tf4.py"},"region":{"startLine":710}}}],"partialFingerprints":{"codehealthFindingId/v1":"73ed52d7ef6e40af625167222b5dd29d9d4a3c5bc89eafb491f389bad09f1324"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): colossalai/shardformer/modeling/bloom.py:752-761 | colossalai/shardformer/modeling/bloom.py:874-883 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/bloom.py"},"region":{"startLine":752}}}],"partialFingerprints":{"codehealthFindingId/v1":"56de808e5fe0a6fc7e4428bbb3be3e6343767a2f21634d064ef384cc6a76cc58"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): colossalai/shardformer/policies/bloom.py:576-585 | colossalai/shardformer/policies/falcon.py:551-560 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/bloom.py\u0060 and \u0060colossalai/shardformer/policies/falcon.py\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/bloom.py"},"region":{"startLine":576}}}],"partialFingerprints":{"codehealthFindingId/v1":"a438d9cbaa5c73ab39ca4514c066186ccb13a60408b4554ef7290eb5bc05ff38"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): colossalai/shardformer/policies/t5.py:527-536 | colossalai/shardformer/policies/t5.py:539-548 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/t5.py"},"region":{"startLine":527}}}],"partialFingerprints":{"codehealthFindingId/v1":"98b211f3c292ee25dad651386149b6e7178535764e07505617e5eafcdf6be574"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 14): colossalai/legacy/moe/openmoe/model/openmoe_policy.py:119-127 | colossalai/shardformer/policies/_deepseek_v3_tf4.py:132-139 | colossalai/shardformer/policies/_deepseek_v3_tf5.py:139-146 | colossalai/shardformer/policies/_llama_tf4.py:358-366 | colossalai/shardformer/policies/_llama_tf5.py:356-364 | colossalai/shardformer/policies/_mixtral_tf4.py:338-345 | colossalai/shardformer/policies/_mixtral_tf5.py:365-372 | colossalai/shardformer/policies/_qwen2_tf4.py:370-378 | colossalai/shardformer/policies/_qwen2_tf5.py:369-377 | colossalai/shardformer/policies/_qwen3_tf4.py:370-378 | colossalai/shardformer/policies/_qwen3_tf5.py:390-398 | colossalai/shardformer/policies/command.py:337-345 | colossalai/shardformer/policies/deepseek.py:344-352 | colossalai/shardformer/policies/mistral.py:319-326 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 14 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 14 times. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/openmoe/model/openmoe_policy.py"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"828561a626d18291af5843a400664b62a5bd09368486ec61a1bc05dd6ee73b4d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 9): colossalai/legacy/moe/openmoe/model/openmoe_policy.py:262-270 | colossalai/shardformer/modeling/_mixtral_tf4.py:240-249 | colossalai/shardformer/modeling/_mixtral_tf5.py:584-593 | colossalai/shardformer/modeling/_qwen2_tf4.py:71-79 | colossalai/shardformer/modeling/_qwen2_tf5.py:70-78 | colossalai/shardformer/modeling/_qwen3_tf4.py:71-79 | colossalai/shardformer/modeling/_qwen3_tf5.py:71-79 | colossalai/shardformer/modeling/deepseek.py:337-346 | colossalai/shardformer/modeling/mistral.py:50-58 \u2014 before extracting anything, compare \u0060colossalai/legacy/moe/openmoe/model/openmoe_policy.py\u0060 and \u0060colossalai/shardformer/modeling/_mixtral_tf4.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 130 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/openmoe/model/openmoe_policy.py"},"region":{"startLine":262}}}],"partialFingerprints":{"codehealthFindingId/v1":"522922e1e884f67378fccd5adfb88ce94ee309ce7e3eba834a1546e023c66ece"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (2\u20139 lines \u00D7 9): colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py:100-108 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/embedding_generator.py:72-80 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/getitem_generator.py:51-59 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/layer_norm_generator.py:89-97 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/reshape_generator.py:55-63 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/softmax_generator.py:55-63 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/sum_generator.py:52-60 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/tensor_constructor_generator.py:32-33 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/unary_elementwise_generator.py:43-51 \u2014 before extracting anything, compare \u0060colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py\u0060 and \u0060colossalai/auto_parallel/tensor_shard/node_handler/strategy/embedding_generator.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 143 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060colossalai/auto_parallel/tensor_shard/node_handler/strategy/getitem_generator.py:62\u0060 calls \u0060TensorStrategyGenerator\u0060 and \u0060colossalai/auto_parallel/tensor_shard/node_handler/strategy/softmax_generator.py:65\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"04c1e851ab0492313acef8f78eead1882e64f2dce3f1cbc5d537b0fb9ee1729d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 7): colossalai/legacy/nn/layer/parallel_3d/layers.py:108-116 | colossalai/legacy/nn/layer/parallel_3d/layers.py:260-268 | colossalai/legacy/nn/layer/parallel_3d/layers.py:436-444 | colossalai/legacy/nn/layer/parallel_3d/layers.py:592-600 | colossalai/legacy/nn/layer/parallel_3d/layers.py:792-800 | colossalai/legacy/nn/layer/parallel_3d/layers.py:939-947 | colossalai/legacy/nn/layer/parallel_3d/layers.py:1077-1085 \u2014 all 7 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/nn/layer/parallel_3d/layers.py:108\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/legacy/nn/layer/parallel_3d/layers.py:104\u0060 calls \u0060pop\u0060, \u0060transpose\u0060 and \u0060colossalai/legacy/nn/layer/parallel_3d/layers.py:937\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_3d/layers.py"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"de5c612823d17b68f707df605a3cb113bdcf2590dc29eafbd076258e5766d2bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 6): colossalai/legacy/inference/tensor_parallel/modeling/bloom.py:86-94 | colossalai/legacy/inference/tensor_parallel/modeling/bloom.py:287-297 | colossalai/shardformer/modeling/bloom.py:129-137 | colossalai/shardformer/modeling/bloom.py:346-354 | colossalai/shardformer/modeling/bloom.py:438-446 | colossalai/shardformer/modeling/bloom.py:564-572 \u2014 there are 6 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/tensor_parallel/modeling/bloom.py"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"484fd93f92c11b4e95b6aea4c16e82c4771081f7f2fe1cfcfcbfea49ffd589ed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 6): colossalai/legacy/nn/layer/parallel_2d/_operation.py:243-251 | colossalai/legacy/nn/layer/parallel_2d/_operation.py:392-400 | colossalai/legacy/nn/layer/parallel_2d/_operation.py:549-557 | colossalai/legacy/nn/layer/parallel_2p5d/_operation.py:198-206 | colossalai/legacy/nn/layer/parallel_2p5d/_operation.py:355-363 | colossalai/legacy/nn/layer/parallel_2p5d/_operation.py:520-528 \u2014 \u0060colossalai/legacy/nn/layer/parallel_2d/_operation.py\u0060 and \u0060colossalai/legacy/nn/layer/parallel_2p5d/_operation.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 16 separate duplicated blocks between them, totalling at least 185 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2d/_operation.py"},"region":{"startLine":243}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef2d9f188556dffb2bfebfb7ebc00687793bfe162484e5f2139986bd796d9848"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 5): colossalai/kernel/triton/context_attn_unpad.py:626-634 | colossalai/kernel/triton/context_attn_unpad.py:666-674 | colossalai/kernel/triton/context_attn_unpad.py:702-710 | colossalai/kernel/triton/flash_decoding.py:444-452 | colossalai/kernel/triton/no_pad_rotary_embedding.py:637-645 \u2014 there are 5 copies across 3 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/kernel/triton/context_attn_unpad.py:624\u0060 calls \u0060stride\u0060 and \u0060colossalai/kernel/triton/no_pad_rotary_embedding.py:635\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/context_attn_unpad.py"},"region":{"startLine":626}}}],"partialFingerprints":{"codehealthFindingId/v1":"47648c66f695b61986c128ad52c22507ce33d8497790b8d17b72f6adfd8ede95"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 5): colossalai/nn/optimizer/distributed_adafactor.py:337-344 | colossalai/nn/optimizer/distributed_adafactor.py:351-359 | colossalai/nn/optimizer/distributed_came.py:372-379 | colossalai/nn/optimizer/distributed_came.py:395-402 | colossalai/nn/optimizer/distributed_came.py:419-427 \u2014 before extracting anything, compare \u0060colossalai/nn/optimizer/distributed_adafactor.py\u0060 and \u0060colossalai/nn/optimizer/distributed_came.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 201 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/nn/optimizer/distributed_adafactor.py:337\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060colossalai/nn/optimizer/distributed_came.py:406\u0060 calls \u0060zeros\u0060 and \u0060colossalai/nn/optimizer/distributed_adafactor.py:345\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/distributed_adafactor.py"},"region":{"startLine":337}}}],"partialFingerprints":{"codehealthFindingId/v1":"968cf3ea5b16453465d23698ca6f48e3246e97d75ddaad37dd9578116f1d0f2b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 5): colossalai/shardformer/modeling/_whisper_tf4.py:186-194 | colossalai/shardformer/modeling/_whisper_tf4.py:709-717 | colossalai/shardformer/modeling/gpt2.py:161-169 | colossalai/shardformer/modeling/opt.py:99-107 | colossalai/shardformer/modeling/opt.py:638-646 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_whisper_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/opt.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 105 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/shardformer/modeling/opt.py:97\u0060 calls \u0060is_first_stage\u0060 and \u0060colossalai/shardformer/modeling/_whisper_tf4.py:183\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_whisper_tf4.py"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"002be70cc85aeb7e21adc63d9afdaf15979bd40ea74a22de62a9816cf4a06739"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 5): colossalai/shardformer/policies/_qwen2_tf4.py:464-472 | colossalai/shardformer/policies/_qwen2_tf5.py:463-471 | colossalai/shardformer/policies/_qwen3_tf4.py:450-458 | colossalai/shardformer/policies/_qwen3_tf5.py:474-482 | colossalai/shardformer/policies/command.py:426-434 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_qwen2_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_qwen2_tf5.py\u0060 as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 399 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_qwen2_tf4.py"},"region":{"startLine":464}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bfa71617bcba7a0b4f157d3572efbcd6e68cce07206a890f600e79e18509bc6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 5): colossalai/shardformer/policies/bloom.py:406-414 | colossalai/shardformer/policies/deepseek.py:436-444 | colossalai/shardformer/policies/falcon.py:353-361 | colossalai/shardformer/policies/mistral.py:410-418 | colossalai/shardformer/policies/t5.py:726-734 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/bloom.py\u0060 and \u0060colossalai/shardformer/policies/falcon.py\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/bloom.py"},"region":{"startLine":406}}}],"partialFingerprints":{"codehealthFindingId/v1":"05684c983ff13c368e199f0f9d59b726fcb2081b647d766e1e24f95e6d1bc3fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4): applications/ColossalChat/examples/data_preparation_scripts/prepare_dataset.py:83-91 | applications/ColossalMoE/train.py:61-73 | colossalai/legacy/moe/openmoe/train.py:94-106 | examples/images/vit/args.py:61-71 \u2014 before extracting anything, compare \u0060applications/ColossalChat/examples/data_preparation_scripts/prepare_dataset.py\u0060 and \u0060examples/images/vit/args.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 59 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/examples/data_preparation_scripts/prepare_dataset.py:83\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/examples/data_preparation_scripts/prepare_dataset.py"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"4812cc59efad23d75d7ea0f7857d17bfc06e3785f92994db00d348ce0e0030ba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4): colossalai/legacy/inference/quant/smoothquant/models/llama.py:479-487 | colossalai/shardformer/modeling/_llama_tf4.py:584-592 | colossalai/shardformer/modeling/_qwen2_tf4.py:577-585 | colossalai/shardformer/modeling/_qwen3_tf4.py:569-577 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/quant/smoothquant/models/llama.py"},"region":{"startLine":479}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b0e2ff1863bc54c2b44ddf5821a379e0576c136407f0b7b2ab47bd6398e7a77"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4): colossalai/legacy/nn/layer/parallel_1d/layers.py:297-305 | colossalai/legacy/nn/layer/parallel_1d/layers.py:710-718 | colossalai/shardformer/layer/linear.py:544-552 | colossalai/shardformer/layer/qkv_fused_linear.py:1161-1169 \u2014 there are 4 copies across 3 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/nn/layer/parallel_1d/layers.py:297\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_1d/layers.py"},"region":{"startLine":297}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf3ed617bf135d87e90d3824c8c8d4a9ed34cfd6d764d96c3d044c64d78d43c6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4): colossalai/shardformer/modeling/_qwen2_tf4.py:695-704 | colossalai/shardformer/modeling/_qwen2_tf5.py:504-512 | colossalai/shardformer/modeling/_qwen3_tf4.py:687-696 | colossalai/shardformer/modeling/_qwen3_tf5.py:505-513 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_qwen2_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_qwen2_tf5.py\u0060 as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 242 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen2_tf4.py"},"region":{"startLine":695}}}],"partialFingerprints":{"codehealthFindingId/v1":"d432183e9f334fe19ae59236402e248ab30b05011c9226d841df75f097e7c1ea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4): colossalai/shardformer/policies/_qwen2_tf4.py:544-552 | colossalai/shardformer/policies/_qwen2_tf5.py:543-551 | colossalai/shardformer/policies/_qwen3_tf4.py:529-537 | colossalai/shardformer/policies/_qwen3_tf5.py:553-561 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_qwen2_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_qwen2_tf5.py\u0060 as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 399 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_qwen2_tf4.py"},"region":{"startLine":544}}}],"partialFingerprints":{"codehealthFindingId/v1":"af954e3479cf6a6ee5edc516c7476b1db594c00436d58a81097ac6796738c96f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): applications/Colossal-LLaMA/colossal_llama/model/init_model.py:19-27 | applications/Colossal-LLaMA/dataset/prepare_pretrain_dataset.py:27-37 | applications/Colossal-LLaMA/dataset/prepare_sft_dataset.py:24-34 \u2014 before extracting anything, compare \u0060applications/Colossal-LLaMA/dataset/prepare_pretrain_dataset.py\u0060 and \u0060applications/Colossal-LLaMA/dataset/prepare_sft_dataset.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 116 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/colossal_llama/model/init_model.py"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f126c7a912f52f7cad2ead59b84c11d2f137136a44199a3e39caedf1e8db6fc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): applications/Colossal-LLaMA/colossal_llama/utils/ckpt_io.py:60-68 | applications/ColossalChat/coati/utils/ckpt_io.py:61-69 | applications/ColossalMoE/utils.py:52-60 \u2014 before extracting anything, compare \u0060applications/Colossal-LLaMA/colossal_llama/utils/ckpt_io.py\u0060 and \u0060applications/ColossalChat/coati/utils/ckpt_io.py\u0060 as WHOLE FILES: 89% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/colossal_llama/utils/ckpt_io.py"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"40d09f582e9317a934497afaf59cf7025863e08b68df8f2be1c42044e62aa01b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): applications/ColossalChat/coati/dataset/tokenization_utils.py:57-65 | applications/ColossalChat/coati/dataset/tokenization_utils.py:158-166 | applications/ColossalChat/coati/dataset/tokenization_utils.py:246-254 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/dataset/tokenization_utils.py"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ca422f0f8175f95cd92339e62b42fea9af737ae317ef4f8a938b2a0f696e6aa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): applications/ColossalEval/colossal_eval/dataset/ceval.py:108-116 | applications/ColossalEval/colossal_eval/dataset/cmmlu.py:119-127 | applications/ColossalEval/colossal_eval/dataset/mmlu.py:49-57 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060applications/ColossalEval/colossal_eval/dataset/cmmlu.py:128\u0060 calls \u0060next\u0060 and \u0060applications/ColossalEval/colossal_eval/dataset/mmlu.py:58\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/dataset/ceval.py"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b4725944bde4526e6d49bd6874741570bb41fd2e376eadbd0c9aec99ec75239"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): colossalai/_analyzer/fx/tracer/tracer.py:343-351 | colossalai/fx/tracer/experimental.py:370-378 | colossalai/fx/tracer/tracer.py:157-165 \u2014 before extracting anything, compare \u0060colossalai/_analyzer/fx/tracer/tracer.py\u0060 and \u0060colossalai/fx/tracer/experimental.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/_analyzer/fx/tracer/tracer.py:343\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/fx/tracer/tracer.py"},"region":{"startLine":343}}}],"partialFingerprints":{"codehealthFindingId/v1":"28f3b5781c7d9fd30e52d4ebcdbdf30df00bca0ef4f641d8a9abf654ba0def0b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): colossalai/fx/tracer/experimental.py:273-281 | colossalai/fx/tracer/experimental.py:481-489 | colossalai/fx/tracer/tracer.py:344-352 \u2014 before extracting anything, compare \u0060colossalai/fx/tracer/experimental.py\u0060 and \u0060colossalai/fx/tracer/tracer.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 138 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/experimental.py"},"region":{"startLine":273}}}],"partialFingerprints":{"codehealthFindingId/v1":"19e935ea81a965889af0c43b863e7f41c181faa7fa64eba8230321aeba44a34e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 3): colossalai/legacy/inference/hybridengine/modeling/llama.py:277-285 | colossalai/legacy/inference/tensor_parallel/modeling/chatglm2.py:162-169 | colossalai/legacy/inference/tensor_parallel/modeling/llama.py:191-199 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/inference/hybridengine/modeling/llama.py:277\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/hybridengine/modeling/llama.py"},"region":{"startLine":277}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcba2edc2e679e4558ebdf170502f9e79fa268045c123e57c429e182891792f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20139 lines \u00D7 3): colossalai/shardformer/layer/attn.py:804-812 | colossalai/shardformer/layer/attn.py:858-864 | colossalai/shardformer/layer/attn.py:874-880 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/layer/attn.py:804\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/attn.py"},"region":{"startLine":804}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce4b39d4831be60ed71f4057ba8fa809bcb8ab3b79e0e441fb40674a63828e65"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): colossalai/shardformer/policies/bloom.py:472-480 | colossalai/shardformer/policies/falcon.py:420-428 | colossalai/shardformer/policies/mistral.py:472-480 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/bloom.py\u0060 and \u0060colossalai/shardformer/policies/falcon.py\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/bloom.py"},"region":{"startLine":472}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4a215858b514744acefed73e34a8cbdf885048225e2022d82e30bb9e9fd44e1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): extensions/pybind/flash_attention/flash_attention_dao_cuda.py:51-59 | extensions/pybind/flash_attention/flash_attention_npu.py:43-51 | extensions/pybind/flash_attention/flash_attention_sdpa_cuda.py:38-46 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060extensions/pybind/flash_attention/flash_attention_dao_cuda.py:51\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"extensions/pybind/flash_attention/flash_attention_dao_cuda.py"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"72b2f45578bd0ba2173f63df678b800c02ae8283171bc816f7f4010ea031922f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): applications/ColossalChat/coati/distributed/grpo_consumer.py:537-545 | applications/ColossalChat/coati/distributed/zero_bubble/grpo_consumer.py:458-466 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/distributed/grpo_consumer.py\u0060 and \u0060applications/ColossalChat/coati/distributed/zero_bubble/grpo_consumer.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 407 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060applications/ColossalChat/coati/distributed/zero_bubble/grpo_consumer.py:468\u0060 calls \u0060step\u0060 and \u0060applications/ColossalChat/coati/distributed/grpo_consumer.py:547\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/grpo_consumer.py"},"region":{"startLine":537}}}],"partialFingerprints":{"codehealthFindingId/v1":"cea9f159911759165f90d52462d01e532c02f20e79732dcbb3d36b840c2e8921"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): applications/ColossalChat/coati/distributed/producer.py:242-250 | applications/ColossalChat/coati/distributed/zero_bubble/producer.py:213-221 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/distributed/producer.py\u0060 and \u0060applications/ColossalChat/coati/distributed/zero_bubble/producer.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 234 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060applications/ColossalChat/coati/distributed/zero_bubble/producer.py:222\u0060 calls \u0060log\u0060 and \u0060applications/ColossalChat/coati/distributed/producer.py:251\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/producer.py"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"7988d3d00ac76118c3910950e308eaa77d88f9923f61ccbb83202bc7d27d3fbe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): applications/ColossalChat/coati/distributed/producer.py:407-415 | applications/ColossalChat/coati/distributed/zero_bubble/producer.py:431-439 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/distributed/producer.py\u0060 and \u0060applications/ColossalChat/coati/distributed/zero_bubble/producer.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 234 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: \u0060BACKEND_MAP\u0060 names \u0060.inference_backend\u0060 in one and \u0060coati.distributed.inference_backend\u0060 in another \u2014 different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/producer.py"},"region":{"startLine":407}}}],"partialFingerprints":{"codehealthFindingId/v1":"e152dfb95f4ce39e281c4e2fbbb1c3be05c4b242aa44797d2c21744e1b22491e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): applications/ColossalChat/coati/trainer/dpo.py:325-333 | applications/ColossalChat/coati/trainer/dpo.py:602-610 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/dpo.py"},"region":{"startLine":325}}}],"partialFingerprints":{"codehealthFindingId/v1":"91aaf2b755f58803634b0faf655c92b4092fe7f560c6c942c77a69a6d391a6ba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): applications/ColossalChat/coati/trainer/orpo.py:173-181 | applications/ColossalChat/coati/trainer/orpo.py:309-317 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/orpo.py"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"fcb13f1c13fd65e5702b03ea8074c3a79af55242dc09e78388fa998096f5fa74"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): colossalai/_analyzer/fx/tracer/tracer.py:114-122 | colossalai/fx/tracer/experimental.py:211-219 \u2014 before extracting anything, compare \u0060colossalai/_analyzer/fx/tracer/tracer.py\u0060 and \u0060colossalai/fx/tracer/experimental.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/fx/tracer/tracer.py"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"de1205de2fdf2b24093aeed4ccc2720d86dfea828f3b07eedffa219eb07251df"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): colossalai/_analyzer/fx/tracer/tracer.py:136-144 | colossalai/fx/tracer/experimental.py:233-241 \u2014 before extracting anything, compare \u0060colossalai/_analyzer/fx/tracer/tracer.py\u0060 and \u0060colossalai/fx/tracer/experimental.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/fx/tracer/tracer.py"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c2028852f65e312e6f3322c7a2c192fb1b7cd6b085e8048552cdaffed3ef155"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): colossalai/auto_parallel/offload/runtime.py:177-185 | colossalai/auto_parallel/offload/runtime.py:224-232 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/offload/runtime.py"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd421e51456314a2fb499bfdbea1682ca6f9ce299f5b2a1f0ffe1b83abb5e269"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): colossalai/cli/check/check_installation.py:66-74 | colossalai/cli/check/check_installation.py:77-85 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/cli/check/check_installation.py:65\u0060 calls \u0060echo\u0060 and \u0060colossalai/cli/check/check_installation.py:76\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/cli/check/check_installation.py"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"52d33bb800cfdb0f0aafeaa786d1dcb70ae012fbe32294d59cd749de0dd5545b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): colossalai/fx/tracer/experimental.py:577-585 | colossalai/fx/tracer/tracer.py:298-306 \u2014 before extracting anything, compare \u0060colossalai/fx/tracer/experimental.py\u0060 and \u0060colossalai/fx/tracer/tracer.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 138 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/experimental.py"},"region":{"startLine":577}}}],"partialFingerprints":{"codehealthFindingId/v1":"50fdb993f95a713a8d19ff7dfe7b671b241d306e12c6b1411707aba2a9d67d1b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): colossalai/inference/core/request_handler.py:152-160 | colossalai/inference/core/request_handler.py:411-419 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/core/request_handler.py"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b517a2902e83fa8b4c9469f0021ff0a5c4b34d7bb5346a07e776f018dadcda3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): colossalai/inference/modeling/layers/attention.py:171-179 | colossalai/inference/modeling/layers/attention.py:230-237 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/modeling/layers/attention.py"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb17807616762d019ae8af69b21807e2bd430419fcc1d936ad37ea7615565b08"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): colossalai/kernel/triton/context_attn_unpad.py:573-581 | colossalai/kernel/triton/kvcache_copy.py:229-238 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/context_attn_unpad.py"},"region":{"startLine":573}}}],"partialFingerprints":{"codehealthFindingId/v1":"87c4dc219a66111c49e80985ea74effc180f4fd7a27f62c787eb237326a3f70a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): colossalai/kernel/triton/flash_decoding.py:460-468 | colossalai/kernel/triton/no_pad_rotary_embedding.py:612-620 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/flash_decoding.py"},"region":{"startLine":460}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8b1b96a26ca167091da2609d717d4fe1a0336c95619142041d950c251a01f9a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): colossalai/legacy/inference/dynamic_batching/infer_batch.py:137-145 | colossalai/legacy/inference/dynamic_batching/infer_batch.py:176-184 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/dynamic_batching/infer_batch.py"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"581a9feba37d159b68da1ab723d16d9f2a5673d05385cfe42c7fb7544379968d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): colossalai/legacy/inference/hybridengine/polices/llama.py:50-58 | colossalai/legacy/inference/tensor_parallel/policies/llama.py:42-50 \u2014 before extracting anything, compare \u0060colossalai/legacy/inference/hybridengine/polices/llama.py\u0060 and \u0060colossalai/legacy/inference/tensor_parallel/policies/llama.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/inference/hybridengine/polices/llama.py:50\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/hybridengine/polices/llama.py"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"714df0c3164aa2fb1c1ef2f71fbf23025f4b07c1cdf0144a579bf7e3d0655d97"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): colossalai/legacy/inference/quant/smoothquant/models/llama.py:472-480 | colossalai/legacy/moe/openmoe/model/modeling_openmoe.py:400-408 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/inference/quant/smoothquant/models/llama.py:472\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/quant/smoothquant/models/llama.py"},"region":{"startLine":472}}}],"partialFingerprints":{"codehealthFindingId/v1":"34ab271ef7b356f2aff91802039a3c5655cce74d69ee2e1bb53e22b4fd98d7a0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): colossalai/legacy/moe/layer/experts.py:94-102 | colossalai/legacy/moe/layer/routers.py:94-102 \u2014 before extracting anything, compare \u0060colossalai/legacy/moe/layer/experts.py\u0060 and \u0060colossalai/legacy/moe/layer/routers.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 90 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/layer/experts.py"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"aafd6c6c637ee95b5bcbe34bfeba6d60fcfba469842fb9ba12413eb329802382"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): colossalai/legacy/pipeline/rpc/_pipeline_base.py:429-437 | colossalai/legacy/pipeline/rpc/_pipeline_base.py:481-490 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/pipeline/rpc/_pipeline_base.py:429\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/pipeline/rpc/_pipeline_base.py"},"region":{"startLine":429}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3b53294f666535c6331cb1bcce4ab3c13e1ab0c14320f6562269705af1dd4cb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): colossalai/legacy/trainer/hooks/_metric_hook.py:346-354 | colossalai/legacy/trainer/hooks/_metric_hook.py:358-366 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/trainer/hooks/_metric_hook.py"},"region":{"startLine":346}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a03c033180490bb450e5ba9188f0bb2a5b82d885a5a282c063a0a26c221182f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): colossalai/nn/lr_scheduler/delayed.py:122-130 | colossalai/nn/lr_scheduler/delayed.py:171-179 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/lr_scheduler/delayed.py"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef492df9a572e74abf51d0eb272006c68371a0242fa898051c5682d6b77b0412"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): colossalai/shardformer/modeling/_mixtral_tf4.py:314-322 | colossalai/shardformer/modeling/_mixtral_tf5.py:662-670 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_mixtral_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_mixtral_tf5.py\u0060 as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 581 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_mixtral_tf4.py"},"region":{"startLine":314}}}],"partialFingerprints":{"codehealthFindingId/v1":"e89282ae828588099cf20f4b10604621270fb69fba10daefbe5dbc832d627ae6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): colossalai/shardformer/modeling/blip2.py:107-115 | colossalai/shardformer/modeling/blip2.py:123-131 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/blip2.py:107\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060self\u0060 to \u0060Blip2QFormerSelfOutput\u0060 in one and \u0060Blip2QFormerOutput\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/blip2.py"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"4151ca9f39cbd16a3e073a30077e0dcf8cb7fccaf780c782ba851306e50b8b87"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): colossalai/shardformer/policies/bloom.py:319-327 | colossalai/shardformer/policies/falcon.py:257-265 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/bloom.py\u0060 and \u0060colossalai/shardformer/policies/falcon.py\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/bloom.py"},"region":{"startLine":319}}}],"partialFingerprints":{"codehealthFindingId/v1":"95980ef084e34b46b8e7d79d8bcb7a3fef85d10177d5974324ef59ebc3b8ed46"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): colossalai/shardformer/policies/falcon.py:384-392 | colossalai/shardformer/policies/falcon.py:515-524 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/policies/falcon.py:384\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/falcon.py"},"region":{"startLine":384}}}],"partialFingerprints":{"codehealthFindingId/v1":"ace9eba5cbd0f6b72954c5e7abc5b21e2bf25cb70245abbb8f2319d27c1a8ac0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): colossalai/shardformer/policies/gpt2.py:612-620 | colossalai/shardformer/policies/t5.py:837-845 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/gpt2.py"},"region":{"startLine":612}}}],"partialFingerprints":{"codehealthFindingId/v1":"806d9422904400cfbebcb69c1cdb4cc9fafa672c0cd7f0e85d654dc7f8fa6919"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): colossalai/shardformer/policies/gptj.py:397-405 | colossalai/shardformer/policies/opt.py:417-425 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/gptj.py\u0060 and \u0060colossalai/shardformer/policies/opt.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/gptj.py"},"region":{"startLine":397}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa2e9f7c8120de4891e81088d2818d6a4a9c6214d08298e6d2cf060a42b66b1e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): colossalai/zero/gemini/gemini_ddp.py:500-508 | colossalai/zero/gemini/gemini_optimizer.py:562-570 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/gemini/gemini_ddp.py"},"region":{"startLine":500}}}],"partialFingerprints":{"codehealthFindingId/v1":"05b24ec1b549129d617b807985c2511f66849066d6aaf96cd37c9bf9888e65ab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 10): colossalai/legacy/inference/hybridengine/modeling/llama.py:217-224 | colossalai/legacy/moe/openmoe/model/openmoe_policy.py:263-270 | colossalai/shardformer/modeling/_mixtral_tf4.py:242-249 | colossalai/shardformer/modeling/_mixtral_tf5.py:586-593 | colossalai/shardformer/modeling/_qwen2_tf4.py:72-79 | colossalai/shardformer/modeling/_qwen2_tf5.py:71-78 | colossalai/shardformer/modeling/_qwen3_tf4.py:72-79 | colossalai/shardformer/modeling/_qwen3_tf5.py:72-79 | colossalai/shardformer/modeling/deepseek.py:339-346 | colossalai/shardformer/modeling/mistral.py:51-58 \u2014 before extracting anything, compare \u0060colossalai/legacy/moe/openmoe/model/openmoe_policy.py\u0060 and \u0060colossalai/shardformer/modeling/_mixtral_tf4.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 130 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/hybridengine/modeling/llama.py"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"22875ea673d435397a2d555e2e0ae7ca1989656dc8299ebe9c363097b963e4f4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 9): colossalai/shardformer/policies/_qwen2_tf4.py:462-469 | colossalai/shardformer/policies/_qwen2_tf5.py:461-468 | colossalai/shardformer/policies/_qwen3_tf4.py:448-455 | colossalai/shardformer/policies/_qwen3_tf5.py:472-479 | colossalai/shardformer/policies/bloom.py:404-411 | colossalai/shardformer/policies/command.py:424-431 | colossalai/shardformer/policies/deepseek.py:434-441 | colossalai/shardformer/policies/falcon.py:351-358 | colossalai/shardformer/policies/mistral.py:408-415 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_qwen2_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_qwen2_tf5.py\u0060 as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 399 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_qwen2_tf4.py"},"region":{"startLine":462}}}],"partialFingerprints":{"codehealthFindingId/v1":"10e45146942c77cebf9c1b048067b71140e0fcbdacf588dbf8509feee94ea5f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 7): colossalai/shardformer/policies/_qwen2_tf4.py:542-549 | colossalai/shardformer/policies/_qwen2_tf5.py:541-548 | colossalai/shardformer/policies/_qwen3_tf4.py:527-534 | colossalai/shardformer/policies/_qwen3_tf5.py:551-558 | colossalai/shardformer/policies/bloom.py:470-477 | colossalai/shardformer/policies/falcon.py:418-425 | colossalai/shardformer/policies/mistral.py:470-477 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_qwen2_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_qwen2_tf5.py\u0060 as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 399 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_qwen2_tf4.py"},"region":{"startLine":542}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd8d30606ecd298996e3edccdcced90748cf1d9344a91c0948c601a80128306c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 6): colossalai/fx/profiler/experimental/profiler_module/convolution.py:97-104 | colossalai/fx/profiler/experimental/profiler_module/convolution.py:125-132 | colossalai/fx/profiler/experimental/profiler_module/convolution.py:159-166 | colossalai/fx/tracer/meta_patch/patched_module/convolution.py:73-80 | colossalai/fx/tracer/meta_patch/patched_module/convolution.py:93-100 | colossalai/fx/tracer/meta_patch/patched_module/convolution.py:121-128 \u2014 before extracting anything, compare \u0060colossalai/fx/profiler/experimental/profiler_module/convolution.py\u0060 and \u0060colossalai/fx/tracer/meta_patch/patched_module/convolution.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060self\u0060 to \u0060torch.nn.ConvTranspose1d\u0060 in one and \u0060torch.nn.ConvTranspose2d\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/profiler/experimental/profiler_module/convolution.py"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"c96bce2d91d4dfc2def34559fcfb122625c8412a0702041bd0461c81b629d4f0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 6): colossalai/legacy/nn/layer/parallel_2d/_operation.py:257-263 | colossalai/legacy/nn/layer/parallel_2d/_operation.py:406-413 | colossalai/legacy/nn/layer/parallel_2d/_operation.py:563-569 | colossalai/legacy/nn/layer/parallel_2p5d/_operation.py:212-218 | colossalai/legacy/nn/layer/parallel_2p5d/_operation.py:369-376 | colossalai/legacy/nn/layer/parallel_2p5d/_operation.py:534-540 \u2014 \u0060colossalai/legacy/nn/layer/parallel_2d/_operation.py\u0060 and \u0060colossalai/legacy/nn/layer/parallel_2p5d/_operation.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 16 separate duplicated blocks between them, totalling at least 185 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/nn/layer/parallel_2d/_operation.py:257\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2d/_operation.py"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"71bb43d007d771c576004c8e9defc6167840a06959e582bf051b0f1156e2f7ef"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 6): colossalai/shardformer/modeling/_qwen2_tf4.py:624-631 | colossalai/shardformer/modeling/_qwen3_tf4.py:616-623 | colossalai/shardformer/modeling/deepseek.py:721-728 | colossalai/shardformer/modeling/gptj.py:663-669 | colossalai/shardformer/modeling/gptj.py:839-845 | colossalai/shardformer/modeling/opt.py:628-635 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_qwen2_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_qwen3_tf4.py\u0060 as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1214 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_qwen2_tf4.py:624\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen2_tf4.py"},"region":{"startLine":624}}}],"partialFingerprints":{"codehealthFindingId/v1":"bca934171e0dfacc1b0992660eb71e448ad9e6ccf52543d8a7fe7cb9baba9090"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 5): colossalai/shardformer/policies/bloom.py:575-582 | colossalai/shardformer/policies/falcon.py:550-557 | colossalai/shardformer/policies/gpt2.py:564-571 | colossalai/shardformer/policies/gptj.py:478-485 | colossalai/shardformer/policies/opt.py:494-501 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/bloom.py\u0060 and \u0060colossalai/shardformer/policies/falcon.py\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/bloom.py"},"region":{"startLine":575}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6bff81a58093efff613f5222cd6f47f713cf68c53a3f4a29eb828831db76596"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): colossalai/legacy/inference/quant/smoothquant/models/llama.py:475-482 | colossalai/legacy/moe/openmoe/model/modeling_openmoe.py:403-410 | colossalai/shardformer/modeling/_qwen2_tf4.py:573-580 | colossalai/shardformer/modeling/_qwen3_tf4.py:565-572 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/inference/quant/smoothquant/models/llama.py:475\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060colossalai/legacy/moe/openmoe/model/modeling_openmoe.py:412\u0060 calls \u0060clone\u0060, \u0060detach\u0060 and \u0060colossalai/legacy/inference/quant/smoothquant/models/llama.py:483\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/quant/smoothquant/models/llama.py"},"region":{"startLine":475}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fb20370c58288ca0b72f79381a58b5dca78a08ff7fc813a646f2cfced73d59e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): colossalai/legacy/inference/quant/smoothquant/models/llama.py:624-631 | colossalai/legacy/moe/openmoe/model/modeling_openmoe.py:744-751 | colossalai/shardformer/modeling/_mixtral_tf4.py:726-733 | colossalai/shardformer/modeling/_mixtral_tf5.py:1125-1132 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/quant/smoothquant/models/llama.py"},"region":{"startLine":624}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2e20bed9e3d324230489f889a12fc399bee55b70f8b7242f2513cccb6681630"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): colossalai/shardformer/modeling/_mixtral_tf4.py:677-684 | colossalai/shardformer/modeling/_mixtral_tf5.py:1071-1078 | colossalai/shardformer/modeling/deepseek.py:712-719 | colossalai/shardformer/modeling/mistral.py:381-388 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_mixtral_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_mixtral_tf5.py\u0060 as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 581 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_mixtral_tf4.py"},"region":{"startLine":677}}}],"partialFingerprints":{"codehealthFindingId/v1":"d05caf098d70ef575bce4b3bca115d83bfef72f90325cca251b485e97436a45f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): colossalai/shardformer/modeling/_qwen2_tf4.py:766-773 | colossalai/shardformer/modeling/_qwen3_tf4.py:758-765 | colossalai/shardformer/modeling/command.py:577-584 | colossalai/shardformer/modeling/mistral.py:562-569 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_qwen2_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_qwen3_tf4.py\u0060 as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1214 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen2_tf4.py"},"region":{"startLine":766}}}],"partialFingerprints":{"codehealthFindingId/v1":"259575e1ee9c35ed41256898fff8c4441fbcb74899db23630e16ff8791651b65"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): applications/Colossal-LLaMA/dataset/prepare_pretrain_dataset.py:55-62 | applications/Colossal-LLaMA/dataset/prepare_sft_dataset.py:53-60 | applications/ColossalChat/examples/data_preparation_scripts/prepare_dataset.py:112-119 \u2014 before extracting anything, compare \u0060applications/Colossal-LLaMA/dataset/prepare_pretrain_dataset.py\u0060 and \u0060applications/Colossal-LLaMA/dataset/prepare_sft_dataset.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 116 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/dataset/prepare_pretrain_dataset.py"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d598f78f552447bb2abe140a0f6c27640df57cb4db1912b73b59889256d85e5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): applications/ColossalEval/colossal_eval/models/chatglm.py:20-27 | applications/ColossalEval/colossal_eval/models/chatglm.py:157-164 | applications/ColossalEval/colossal_eval/models/huggingface.py:203-210 \u2014 before extracting anything, compare \u0060applications/ColossalEval/colossal_eval/models/chatglm.py\u0060 and \u0060applications/ColossalEval/colossal_eval/models/huggingface.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/models/chatglm.py"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"186b99bd0e8604b40de43f3b0d7d3ed4dde32518d82e0ed11146c798c6095f63"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py:712-719 | colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py:1007-1022 | colossalai/checkpoint_io/moe_checkpoint.py:596-603 \u2014 before extracting anything, compare \u0060colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py\u0060 and \u0060colossalai/checkpoint_io/moe_checkpoint.py\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 249 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":712}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdb455b76188f542d1bace3cf9ba9c00012559dba62331600991a1c98bd92c3e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): colossalai/legacy/nn/layer/parallel_1d/layers.py:977-985 | colossalai/legacy/nn/layer/parallel_2d/layers.py:849-856 | colossalai/legacy/nn/layer/parallel_2p5d/layers.py:861-869 \u2014 \u0060colossalai/legacy/nn/layer/parallel_1d/layers.py\u0060 and \u0060colossalai/legacy/nn/layer/parallel_2d/layers.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 6 separate duplicated blocks between them, totalling at least 56 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_1d/layers.py"},"region":{"startLine":977}}}],"partialFingerprints":{"codehealthFindingId/v1":"f25ab664828f012908bdf638a8986750f45bf51989b8a5b0ef2e0e154dd4488e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 3): colossalai/legacy/zero/sharded_model/sharded_model_v2.py:520-526 | colossalai/shardformer/layer/parallel_module.py:108-115 | colossalai/shardformer/layer/parallel_module.py:283-290 \u2014 before extracting anything, compare \u0060colossalai/legacy/zero/sharded_model/sharded_model_v2.py\u0060 and \u0060colossalai/shardformer/layer/parallel_module.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 96 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/zero/sharded_model/sharded_model_v2.py"},"region":{"startLine":520}}}],"partialFingerprints":{"codehealthFindingId/v1":"39a55e89b5c668ca00f24e654f81c890d209e6040c8bab3e5691f69eb924c5cc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20138 lines \u00D7 3): colossalai/nn/optimizer/distributed_adafactor.py:267-272 | colossalai/nn/optimizer/distributed_came.py:261-268 | colossalai/nn/optimizer/distributed_came.py:314-321 \u2014 before extracting anything, compare \u0060colossalai/nn/optimizer/distributed_adafactor.py\u0060 and \u0060colossalai/nn/optimizer/distributed_came.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 201 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/distributed_adafactor.py"},"region":{"startLine":267}}}],"partialFingerprints":{"codehealthFindingId/v1":"03994de8bfcf78a8d402c10cbc2f6a5086028e47452f4aecb5babd30e7a4b8d9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): colossalai/nn/optimizer/distributed_lamb.py:49-56 | colossalai/nn/optimizer/lamb.py:32-39 | examples/images/diffusion/ldm/util.py:104-111 \u2014 before extracting anything, compare \u0060colossalai/nn/optimizer/distributed_lamb.py\u0060 and \u0060colossalai/nn/optimizer/lamb.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/distributed_lamb.py"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d0b2b8287fe6640b4bea436430d471063bd09997023e4711865b4138b047e9b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): colossalai/shardformer/layer/attn.py:723-730 | colossalai/shardformer/layer/attn.py:744-751 | colossalai/shardformer/layer/attn.py:1019-1026 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/attn.py"},"region":{"startLine":723}}}],"partialFingerprints":{"codehealthFindingId/v1":"33fb1c5ba30210b4306cad25427ba2365cce24bfa96bcf0a8eb6843fcfcb9803"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): applications/Colossal-LLaMA/colossal_llama/utils/ckpt_io.py:85-92 | applications/ColossalMoE/utils.py:77-84 \u2014 before extracting anything, compare \u0060applications/Colossal-LLaMA/colossal_llama/utils/ckpt_io.py\u0060 and \u0060applications/ColossalMoE/utils.py\u0060 as WHOLE FILES: 95% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/colossal_llama/utils/ckpt_io.py"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"648394a0b7fab2ad282fb1b9692e25a562dc674b23207de7d53f0ed8433327e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5\u20138 lines \u00D7 2): applications/ColossalChat/coati/models/lora.py:303-307 | applications/ColossalChat/coati/models/lora.py:310-317 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/coati/models/lora.py:310\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/models/lora.py"},"region":{"startLine":303}}}],"partialFingerprints":{"codehealthFindingId/v1":"1582cf4083f17071b910e74816318f5e917ba09c88ddd44fd1d12b08a024bce8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): colossalai/_analyzer/_subclasses/flop_tensor.py:387-394 | colossalai/fx/profiler/opcount.py:190-197 \u2014 before extracting anything, compare \u0060colossalai/_analyzer/_subclasses/flop_tensor.py\u0060 and \u0060colossalai/fx/profiler/opcount.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 153 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/_subclasses/flop_tensor.py"},"region":{"startLine":387}}}],"partialFingerprints":{"codehealthFindingId/v1":"05c1d80d1541c21777adc94b879025a904bf8ccad1774d3052181f48cce7b4d3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): colossalai/auto_parallel/meta_profiler/meta_registry/norm.py:91-99 | colossalai/auto_parallel/meta_profiler/meta_registry/norm.py:149-156 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/auto_parallel/meta_profiler/meta_registry/norm.py:91\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/meta_profiler/meta_registry/norm.py"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"a10a224efffcc3d378b61d24038eb5ad2dc350bad3177efeaf6131a3ab969154"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): colossalai/auto_parallel/tensor_shard/node_handler/permute_handler.py:29-36 | colossalai/auto_parallel/tensor_shard/node_handler/transpose_handler.py:29-36 \u2014 before extracting anything, compare \u0060colossalai/auto_parallel/tensor_shard/node_handler/permute_handler.py\u0060 and \u0060colossalai/auto_parallel/tensor_shard/node_handler/transpose_handler.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/permute_handler.py"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"62c4d97820abd7d03c6c407cacad4a632e5ac4c8d79c638c98ab66a7691ea26a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): colossalai/fx/tracer/meta_patch/patched_function/convolution.py:146-153 | colossalai/fx/tracer/meta_patch/patched_function/convolution.py:175-182 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/fx/tracer/meta_patch/patched_function/convolution.py:146\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/meta_patch/patched_function/convolution.py"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"451218ddb0bb883786f8108f477afa1a060244d78930002d11403ea2b4248c4a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): colossalai/inference/kv_cache/kvcache_manager.py:62-69 | colossalai/inference/kv_cache/kvcache_manager.py:534-541 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/kv_cache/kvcache_manager.py"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4def73047ae1e593cb904e9ea80e0e7ee9888d7c75731961792546f92ff182f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): colossalai/inference/modeling/layers/distrifusion.py:134-142 | colossalai/inference/modeling/layers/distrifusion.py:193-200 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/inference/modeling/layers/distrifusion.py:134\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/modeling/layers/distrifusion.py"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"074ee4025db9ae00b514355a7bebf7ba224171d4d1f4ea8310d22192617d8ccb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 2): colossalai/kernel/triton/no_pad_rotary_embedding.py:73-80 | colossalai/kernel/triton/no_pad_rotary_embedding.py:110-116 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/kernel/triton/no_pad_rotary_embedding.py:73\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/no_pad_rotary_embedding.py"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"34d629737e25fd4ef928ac81281458522efce86d775ac1bc636e69c26dee2c49"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): colossalai/legacy/inference/quant/smoothquant/models/base_model.py:287-294 | colossalai/legacy/inference/quant/smoothquant/models/base_model.py:379-386 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/quant/smoothquant/models/base_model.py"},"region":{"startLine":287}}}],"partialFingerprints":{"codehealthFindingId/v1":"53c0d37ac79f173df3d8a7bdb0aa76fc7f1efc070693ca5dfac19c03c26cec04"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): colossalai/legacy/inference/quant/smoothquant/models/llama.py:442-449 | colossalai/legacy/moe/openmoe/model/modeling_openmoe.py:350-357 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/quant/smoothquant/models/llama.py"},"region":{"startLine":442}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b1440ee5a74466dd284b560310fcac51e36675f221714806b087edeb31150ee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_3d/layers.py:311-318 | colossalai/legacy/nn/layer/parallel_3d/layers.py:643-650 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/nn/layer/parallel_3d/layers.py:311\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_3d/layers.py"},"region":{"startLine":311}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e382eac87ef7d57c05bf7973d6edee850e33684afe0d0e2b7036376e50ef501"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5\u20138 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_3d/layers.py:728-735 | colossalai/legacy/nn/layer/vanilla/layers.py:181-185 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/nn/layer/parallel_3d/layers.py:728\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: \u0060Parameter\u0060 names \u0060torch.nn\u0060 in one and \u0060torch.nn.parameter\u0060 in another \u2014 different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_3d/layers.py"},"region":{"startLine":728}}}],"partialFingerprints":{"codehealthFindingId/v1":"42ec7c3b05b2ea63ef1e30eed9615e133d62e2e040819d4a5278183ca85058f6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): colossalai/nn/optimizer/adafactor.py:60-67 | colossalai/nn/optimizer/distributed_adafactor.py:107-114 \u2014 before extracting anything, compare \u0060colossalai/nn/optimizer/adafactor.py\u0060 and \u0060colossalai/nn/optimizer/distributed_adafactor.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/adafactor.py"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"156c55bae1aee3a718074b1ec6814e512ea1131a06e957a364a505dcd8693dcb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): colossalai/nn/optimizer/distributed_adafactor.py:332-339 | colossalai/nn/optimizer/distributed_came.py:364-371 \u2014 before extracting anything, compare \u0060colossalai/nn/optimizer/distributed_adafactor.py\u0060 and \u0060colossalai/nn/optimizer/distributed_came.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 201 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060colossalai/nn/optimizer/distributed_came.py:372\u0060 calls \u0060zeros\u0060 and \u0060colossalai/nn/optimizer/distributed_adafactor.py:340\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/distributed_adafactor.py"},"region":{"startLine":332}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef9f2e32ed8197429ebb61a3580e5cab71e348608c56ff28c2052fb451687007"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 2): colossalai/nn/optimizer/distributed_adafactor.py:371-378 | colossalai/nn/optimizer/distributed_came.py:427-433 \u2014 before extracting anything, compare \u0060colossalai/nn/optimizer/distributed_adafactor.py\u0060 and \u0060colossalai/nn/optimizer/distributed_came.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 201 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/distributed_adafactor.py"},"region":{"startLine":371}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8d9be8d87559d1e61352868f1602c66842d8deae417d4ca5feebad73c4f2671"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): colossalai/quantization/fp8.py:148-155 | colossalai/quantization/fp8.py:436-443 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/quantization/fp8.py"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5c92a96ed65fd4f0f2139a06e853040de457883a7f78e968f8ff624752ed5f9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): colossalai/shardformer/layer/linear.py:569-576 | colossalai/shardformer/layer/qkv_fused_linear.py:606-614 \u2014 before extracting anything, compare \u0060colossalai/shardformer/layer/linear.py\u0060 and \u0060colossalai/shardformer/layer/qkv_fused_linear.py\u0060 as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 261 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/linear.py"},"region":{"startLine":569}}}],"partialFingerprints":{"codehealthFindingId/v1":"e39327c4484bea141457855881848738850378dfc0f05dafda3c3938e724aa12"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): colossalai/shardformer/modeling/_mixtral_tf4.py:652-660 | colossalai/shardformer/modeling/deepseek.py:687-694 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_mixtral_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/deepseek.py\u0060 as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 427 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_mixtral_tf4.py:652\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_mixtral_tf4.py"},"region":{"startLine":652}}}],"partialFingerprints":{"codehealthFindingId/v1":"806977ead13c7a6c08a1ecd8cd5ac7d8c014981264d804b4647933e21dd81199"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 18): colossalai/shardformer/policies/_qwen2_tf4.py:461-467 | colossalai/shardformer/policies/_qwen2_tf4.py:541-547 | colossalai/shardformer/policies/_qwen2_tf5.py:460-466 | colossalai/shardformer/policies/_qwen2_tf5.py:540-546 | colossalai/shardformer/policies/_qwen3_tf4.py:447-453 | colossalai/shardformer/policies/_qwen3_tf4.py:526-532 | colossalai/shardformer/policies/_qwen3_tf5.py:471-477 | colossalai/shardformer/policies/_qwen3_tf5.py:550-556 | colossalai/shardformer/policies/bloom.py:403-409 | colossalai/shardformer/policies/bloom.py:469-475 | colossalai/shardformer/policies/bloom.py:539-545 | colossalai/shardformer/policies/command.py:423-429 | colossalai/shardformer/policies/deepseek.py:433-439 | colossalai/shardformer/policies/falcon.py:350-356 | colossalai/shardformer/policies/falcon.py:417-423 | colossalai/shardformer/policies/falcon.py:488-494 | colossalai/shardformer/policies/mistral.py:407-413 | colossalai/shardformer/policies/mistral.py:469-475 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_qwen2_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_qwen2_tf5.py\u0060 as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 399 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_qwen2_tf4.py"},"region":{"startLine":461}}}],"partialFingerprints":{"codehealthFindingId/v1":"657aaa7a4f1fc57aebd38d27f1a166393a843615378653509bcf828bf243e56c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 14): colossalai/shardformer/policies/_deepseek_v3_tf4.py:121-127 | colossalai/shardformer/policies/_deepseek_v3_tf5.py:128-134 | colossalai/shardformer/policies/_llama_tf4.py:349-355 | colossalai/shardformer/policies/_llama_tf5.py:347-353 | colossalai/shardformer/policies/_mixtral_tf4.py:327-333 | colossalai/shardformer/policies/_mixtral_tf5.py:354-360 | colossalai/shardformer/policies/_qwen2_tf4.py:360-366 | colossalai/shardformer/policies/_qwen2_tf5.py:359-365 | colossalai/shardformer/policies/_qwen3_tf4.py:360-366 | colossalai/shardformer/policies/_qwen3_tf5.py:380-386 | colossalai/shardformer/policies/chatglm2.py:298-304 | colossalai/shardformer/policies/command.py:327-333 | colossalai/shardformer/policies/deepseek.py:335-341 | colossalai/shardformer/policies/mistral.py:310-316 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_deepseek_v3_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_deepseek_v3_tf5.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_deepseek_v3_tf4.py"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc5fcb56bd3e5ba517fe267cd637216aaa0ed3244a19ab891acce245f71df1df"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 13): colossalai/shardformer/modeling/_bert_tf4.py:727-733 | colossalai/shardformer/modeling/_bert_tf5.py:740-746 | colossalai/shardformer/modeling/_llama_tf4.py:465-471 | colossalai/shardformer/modeling/_llama_tf5.py:507-513 | colossalai/shardformer/modeling/_qwen2_tf4.py:455-461 | colossalai/shardformer/modeling/bloom.py:511-517 | colossalai/shardformer/modeling/falcon.py:540-546 | colossalai/shardformer/modeling/gpt2.py:787-793 | colossalai/shardformer/modeling/gptj.py:451-457 | colossalai/shardformer/modeling/mistral.py:351-357 | colossalai/shardformer/modeling/opt.py:433-439 | examples/community/roberta/pretraining/model/bert.py:1575-1581 | examples/community/roberta/pretraining/model/deberta_v2.py:1335-1341 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 45 separate duplicated blocks between them, totalling at least 882 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":727}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e92ff7c2d27aec0b2980c3dcfcc32675a2daee8d22a3ebda33dbdfce8b191f0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 6): colossalai/auto_parallel/tensor_shard/node_handler/permute_handler.py:28-34 | colossalai/auto_parallel/tensor_shard/node_handler/softmax_handler.py:29-35 | colossalai/auto_parallel/tensor_shard/node_handler/split_handler.py:28-34 | colossalai/auto_parallel/tensor_shard/node_handler/sum_handler.py:28-34 | colossalai/auto_parallel/tensor_shard/node_handler/transpose_handler.py:28-34 | colossalai/auto_parallel/tensor_shard/node_handler/view_handler.py:32-38 \u2014 before extracting anything, compare \u0060colossalai/auto_parallel/tensor_shard/node_handler/permute_handler.py\u0060 and \u0060colossalai/auto_parallel/tensor_shard/node_handler/transpose_handler.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/permute_handler.py"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"755cd4259b8cfb8dfdcc03576b3b5a3cd41be2a445ec08467b1b5869139e9c18"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 6): colossalai/legacy/moe/openmoe/model/openmoe_policy.py:251-257 | colossalai/shardformer/modeling/_qwen2_tf4.py:60-66 | colossalai/shardformer/modeling/_qwen2_tf5.py:59-65 | colossalai/shardformer/modeling/_qwen3_tf4.py:60-66 | colossalai/shardformer/modeling/_qwen3_tf5.py:60-66 | colossalai/shardformer/modeling/opt.py:87-93 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 6 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 6 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/openmoe/model/openmoe_policy.py"},"region":{"startLine":251}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d7a02b1e54bf808ea230bbce0808f7244f11b3f70320ab477e7b20c93a8bfbf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20137 lines \u00D7 6): colossalai/legacy/nn/layer/parallel_2d/_operation.py:280-285 | colossalai/legacy/nn/layer/parallel_2d/_operation.py:427-432 | colossalai/legacy/nn/layer/parallel_2d/_operation.py:584-589 | colossalai/legacy/nn/layer/parallel_2p5d/_operation.py:237-242 | colossalai/legacy/nn/layer/parallel_2p5d/_operation.py:392-398 | colossalai/legacy/nn/layer/parallel_2p5d/_operation.py:557-562 \u2014 \u0060colossalai/legacy/nn/layer/parallel_2d/_operation.py\u0060 and \u0060colossalai/legacy/nn/layer/parallel_2p5d/_operation.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 16 separate duplicated blocks between them, totalling at least 185 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/nn/layer/parallel_2p5d/_operation.py:392\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/legacy/nn/layer/parallel_2d/_operation.py:278\u0060 calls \u0060copy_\u0060, \u0060broadcast\u0060 and \u0060colossalai/legacy/nn/layer/parallel_2p5d/_operation.py:391\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2d/_operation.py"},"region":{"startLine":280}}}],"partialFingerprints":{"codehealthFindingId/v1":"1789a4749c4c87f936fb2a753e6a95dca46544960556b72b2e037b19c904faf4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 5): colossalai/shardformer/policies/gpt2.py:432-438 | colossalai/shardformer/policies/gpt2.py:509-515 | colossalai/shardformer/policies/gptj.py:395-401 | colossalai/shardformer/policies/opt.py:415-421 | colossalai/shardformer/policies/t5.py:724-730 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/gpt2.py\u0060 and \u0060colossalai/shardformer/policies/gptj.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/gpt2.py"},"region":{"startLine":432}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0b5df9c7f46414922994016522cc430263dda7cba37239e17ded27f49347fe3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py:598-604 | colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py:676-682 | colossalai/checkpoint_io/moe_checkpoint.py:498-504 | colossalai/checkpoint_io/moe_checkpoint.py:560-566 \u2014 before extracting anything, compare \u0060colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py\u0060 and \u0060colossalai/checkpoint_io/moe_checkpoint.py\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 249 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":598}}}],"partialFingerprints":{"codehealthFindingId/v1":"a719e56f4467dc9d6c2af24b5d9d5486f17ca62ea196370e8c44550c06556862"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): colossalai/legacy/nn/layer/parallel_1d/layers.py:975-982 | colossalai/legacy/nn/layer/parallel_2d/layers.py:848-854 | colossalai/legacy/nn/layer/parallel_2p5d/layers.py:859-866 | colossalai/shardformer/layer/embedding.py:388-394 \u2014 \u0060colossalai/legacy/nn/layer/parallel_1d/layers.py\u0060 and \u0060colossalai/legacy/nn/layer/parallel_2d/layers.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 6 separate duplicated blocks between them, totalling at least 56 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/legacy/nn/layer/parallel_2d/layers.py:844\u0060 calls \u0060get_local_rank\u0060 and \u0060colossalai/legacy/nn/layer/parallel_1d/layers.py:970\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_1d/layers.py"},"region":{"startLine":975}}}],"partialFingerprints":{"codehealthFindingId/v1":"a80e2dbe069e3dd84f784bab2370131f358122c80789d74eabd846c40f7d14ee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): colossalai/legacy/nn/layer/parallel_2d/_operation.py:435-441 | colossalai/legacy/nn/layer/parallel_2d/_operation.py:592-598 | colossalai/legacy/nn/layer/parallel_2p5d/_operation.py:400-408 | colossalai/legacy/nn/layer/parallel_2p5d/_operation.py:565-571 \u2014 \u0060colossalai/legacy/nn/layer/parallel_2d/_operation.py\u0060 and \u0060colossalai/legacy/nn/layer/parallel_2p5d/_operation.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 16 separate duplicated blocks between them, totalling at least 185 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/nn/layer/parallel_2p5d/_operation.py:400\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2d/_operation.py"},"region":{"startLine":435}}}],"partialFingerprints":{"codehealthFindingId/v1":"670f5c703439b77e19b392154d18272e62fa568cc90d3c7b304507df7fc0d2a7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): colossalai/shardformer/modeling/_mixtral_tf4.py:724-730 | colossalai/shardformer/modeling/_mixtral_tf5.py:1123-1129 | colossalai/shardformer/modeling/_qwen2_tf4.py:653-659 | colossalai/shardformer/modeling/_qwen3_tf4.py:645-651 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_mixtral_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_mixtral_tf5.py\u0060 as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 581 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_mixtral_tf4.py"},"region":{"startLine":724}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cbb2d022977c93a3b26231c688d4891df671ec9c43cb885fa1fa75dd775a56f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): colossalai/shardformer/policies/_deepseek_v3_tf4.py:158-164 | colossalai/shardformer/policies/_deepseek_v3_tf5.py:165-171 | colossalai/shardformer/policies/_mixtral_tf4.py:425-431 | colossalai/shardformer/policies/_mixtral_tf5.py:452-458 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_deepseek_v3_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_deepseek_v3_tf5.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_deepseek_v3_tf4.py"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"180a3578a09c5934b5a9c0b0ae2098c41246f2be8bef2786fd8348a1fc75a1c6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): colossalai/shardformer/policies/bloom.py:542-548 | colossalai/shardformer/policies/falcon.py:491-497 | colossalai/shardformer/policies/gpt2.py:614-620 | colossalai/shardformer/policies/t5.py:839-845 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/bloom.py\u0060 and \u0060colossalai/shardformer/policies/falcon.py\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/bloom.py"},"region":{"startLine":542}}}],"partialFingerprints":{"codehealthFindingId/v1":"95931d1aa1b14e824fefd82ca9d63e5560fb1fd6a0e359db0ea0ea419ca5ed24"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): applications/Colossal-LLaMA/dataset/prepare_pretrain_dataset.py:112-118 | applications/Colossal-LLaMA/dataset/prepare_sft_dataset.py:126-132 | applications/ColossalChat/examples/data_preparation_scripts/prepare_dataset.py:245-251 \u2014 before extracting anything, compare \u0060applications/Colossal-LLaMA/dataset/prepare_pretrain_dataset.py\u0060 and \u0060applications/Colossal-LLaMA/dataset/prepare_sft_dataset.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 116 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060applications/Colossal-LLaMA/dataset/prepare_pretrain_dataset.py:111\u0060 calls \u0060time\u0060 and \u0060applications/Colossal-LLaMA/dataset/prepare_sft_dataset.py:124\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/dataset/prepare_pretrain_dataset.py"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e2c00f1dcd66f43da4fed1d4ad2c54590232330e3bb30977007ab754ef13570"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): applications/Colossal-LLaMA/train.py:369-375 | applications/ColossalChat/examples/training_scripts/lora_finetune.py:302-308 | applications/ColossalChat/examples/training_scripts/lora_finetune.py:340-346 \u2014 before extracting anything, compare \u0060applications/Colossal-LLaMA/train.py\u0060 and \u0060applications/ColossalChat/examples/training_scripts/lora_finetune.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/train.py"},"region":{"startLine":369}}}],"partialFingerprints":{"codehealthFindingId/v1":"40b4edae901823b7d8706e1490a1450e1ccd395d7290d303492d931ef3b322c5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): colossalai/legacy/inference/tensor_parallel/modeling/bloom.py:318-325 | colossalai/shardformer/modeling/falcon.py:410-416 | colossalai/shardformer/modeling/falcon.py:784-790 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/tensor_parallel/modeling/bloom.py"},"region":{"startLine":318}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c73e4586f767dfae8c3d5021be8f2333a92c18554b3f893a3cd7b00482cff03"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): colossalai/shardformer/layer/_operation.py:110-116 | colossalai/shardformer/layer/_operation.py:200-206 | colossalai/shardformer/layer/_operation.py:922-928 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/_operation.py"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae99b39b04a23541b436f9abeba1a1d80db28697a5f63fe9e14f2c521d225776"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): colossalai/shardformer/modeling/_bert_tf4.py:107-113 | colossalai/shardformer/modeling/_bert_tf5.py:109-115 | examples/community/roberta/pretraining/model/bert.py:974-980 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 45 separate duplicated blocks between them, totalling at least 882 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060examples/community/roberta/pretraining/model/bert.py:972\u0060 calls \u0060ones\u0060 and \u0060colossalai/shardformer/modeling/_bert_tf4.py:106\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac94a43c5d92b4a95c21bc7ab008d7d1a1865a904b6201547197ac7c6e1c23c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): colossalai/shardformer/modeling/_deepseek_v3_tf5.py:116-122 | colossalai/shardformer/modeling/_mixtral_tf4.py:122-128 | colossalai/shardformer/modeling/_mixtral_tf5.py:470-476 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_deepseek_v3_tf5.py\u0060 and \u0060colossalai/shardformer/modeling/_mixtral_tf5.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_deepseek_v3_tf5.py"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c3620423ef218b737e291d5e868e1486df6df8fd13f06df297ade7b29cfdc5d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): colossalai/shardformer/modeling/_llama_tf4.py:574-580 | colossalai/shardformer/modeling/_qwen2_tf4.py:570-576 | colossalai/shardformer/modeling/_qwen3_tf4.py:562-568 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_llama_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_qwen2_tf4.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 241 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_llama_tf4.py"},"region":{"startLine":574}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed5cf69373e110b8b8fc10501bf68372fe0d5d42a4c77985fed94af083ac8cbe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): colossalai/shardformer/modeling/_qwen2_tf4.py:491-497 | colossalai/shardformer/modeling/_qwen3_tf4.py:477-483 | colossalai/shardformer/modeling/deepseek.py:599-605 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_qwen2_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_qwen3_tf4.py\u0060 as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1214 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_qwen2_tf4.py:491\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen2_tf4.py"},"region":{"startLine":491}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8ca4f7c3e4bbc3b72c0c1b56974d31dbfdf515078367b637b912e2d0421101e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): colossalai/shardformer/policies/bloom.py:318-324 | colossalai/shardformer/policies/falcon.py:256-262 | colossalai/shardformer/policies/gptj.py:280-286 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/bloom.py\u0060 and \u0060colossalai/shardformer/policies/falcon.py\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/bloom.py"},"region":{"startLine":318}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc52667350fdc3ca901a736f0bef359f4b36ab6bf22a2f053313cd820f48648e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): colossalai/shardformer/policies/bloom.py:574-580 | colossalai/shardformer/policies/falcon.py:549-555 | colossalai/shardformer/policies/t5.py:834-842 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/bloom.py\u0060 and \u0060colossalai/shardformer/policies/falcon.py\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/bloom.py"},"region":{"startLine":574}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1573d1bc2a8320ed1a3506450898682b1c0a5a3160db915498ae8362f715f46"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): applications/Colossal-LLaMA/colossal_llama/utils/utils.py:12-18 | applications/ColossalChat/coati/trainer/utils.py:122-128 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/colossal_llama/utils/utils.py"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"d60e38d3331b303bc6b1959a6150d32410fc1a9eb1b056ec6759077c072a4daf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): applications/Colossal-LLaMA/train.py:285-291 | applications/ColossalChat/examples/training_scripts/lora_finetune.py:274-280 \u2014 before extracting anything, compare \u0060applications/Colossal-LLaMA/train.py\u0060 and \u0060applications/ColossalChat/examples/training_scripts/lora_finetune.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/Colossal-LLaMA/train.py:285\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/train.py"},"region":{"startLine":285}}}],"partialFingerprints":{"codehealthFindingId/v1":"c433f8c316094a48061bbdb6f0b7da715377bfb08748983a77e2377337d60db5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): applications/ColossalChat/coati/dataset/tokenization_utils.py:273-279 | applications/ColossalChat/coati/dataset/tokenization_utils.py:281-287 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/dataset/tokenization_utils.py"},"region":{"startLine":273}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e56d6512cddd9b31178567988ed4470e39ac3f70216e2bfbd53e4dbf8a8002c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): applications/ColossalChat/coati/distributed/grpo_consumer.py:547-553 | applications/ColossalChat/coati/distributed/zero_bubble/grpo_consumer.py:470-476 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/distributed/grpo_consumer.py\u0060 and \u0060applications/ColossalChat/coati/distributed/zero_bubble/grpo_consumer.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 407 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060applications/ColossalChat/coati/distributed/zero_bubble/grpo_consumer.py:468\u0060 calls \u0060step\u0060 and \u0060applications/ColossalChat/coati/distributed/grpo_consumer.py:545\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/grpo_consumer.py"},"region":{"startLine":547}}}],"partialFingerprints":{"codehealthFindingId/v1":"83cf038b83d7c38d6403239dccaeb2be8dd5255643e8bac735cc081f946ce533"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20137 lines \u00D7 2): applications/ColossalEval/colossal_eval/dataset/ceval.py:94-100 | applications/ColossalEval/colossal_eval/dataset/mmlu.py:35-40 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/dataset/ceval.py"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e0a0dd712094b2c26c8473e3f5d4a8ed787a82cde4b14e3dac52f61d49e9eba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): colossalai/_analyzer/fx/tracer/tracer.py:272-278 | colossalai/fx/tracer/experimental.py:435-441 \u2014 before extracting anything, compare \u0060colossalai/_analyzer/fx/tracer/tracer.py\u0060 and \u0060colossalai/fx/tracer/experimental.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/fx/tracer/tracer.py"},"region":{"startLine":272}}}],"partialFingerprints":{"codehealthFindingId/v1":"68fbaff4442b1feffc00504fef1595b394fe5ed39751063b4b28e7834779c0f8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): colossalai/auto_parallel/meta_profiler/meta_registry/norm.py:100-106 | colossalai/auto_parallel/meta_profiler/meta_registry/norm.py:159-165 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/auto_parallel/meta_profiler/meta_registry/norm.py:100\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/meta_profiler/meta_registry/norm.py"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"86c7e4980462dfa1fdb0c9d279f69f765d46fb362968d8b49e4b5ffcb8bf0130"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): colossalai/auto_parallel/offload/region_manager.py:334-340 | colossalai/auto_parallel/offload/region_manager.py:366-372 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/offload/region_manager.py"},"region":{"startLine":334}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd0c0c3f96fe0bd0652b5b26d59d6e3b82cce2e965803915fcb3904c32ef7216"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): colossalai/booster/plugin/gemini_plugin.py:84-90 | colossalai/booster/plugin/torch_fsdp_plugin.py:102-108 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/plugin/gemini_plugin.py"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"a782d2a6952aa38ac239de33e1dcfcf409579062e98f664be229bede011f8664"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): colossalai/fx/codegen/activation_checkpoint_codegen.py:325-331 | colossalai/fx/codegen/activation_checkpoint_codegen.py:387-393 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/codegen/activation_checkpoint_codegen.py"},"region":{"startLine":325}}}],"partialFingerprints":{"codehealthFindingId/v1":"7eba1ecc893eff74b78288e5d098d9e92549695ee22109ce9777c3a5d367b1db"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): colossalai/fx/profiler/experimental/profiler_module/convolution.py:76-82 | colossalai/fx/tracer/meta_patch/patched_module/convolution.py:58-64 \u2014 before extracting anything, compare \u0060colossalai/fx/profiler/experimental/profiler_module/convolution.py\u0060 and \u0060colossalai/fx/tracer/meta_patch/patched_module/convolution.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/fx/profiler/experimental/profiler_module/convolution.py:76\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/profiler/experimental/profiler_module/convolution.py"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"c25e1a4dae0499a9040ccf2475d080f1e548332e0dc2e36362234f57f13244b9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): colossalai/fx/tracer/meta_patch/patched_function/convolution.py:91-97 | colossalai/fx/tracer/meta_patch/patched_function/convolution.py:163-170 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/fx/tracer/meta_patch/patched_function/convolution.py:163\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/meta_patch/patched_function/convolution.py"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f61799c4db74e00b85cfc9d0e75ae594764f787b16b103fa6d961f93db8dd9b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): colossalai/fx/tracer/meta_patch/patched_module/pooling.py:184-190 | colossalai/fx/tracer/meta_patch/patched_module/pooling.py:196-202 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/meta_patch/patched_module/pooling.py"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa26513264d78c78b873b9060d170b2e80ea7735981fd23399339942b4ce5f1b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): colossalai/legacy/inference/hybridengine/modeling/llama.py:49-55 | colossalai/legacy/inference/tensor_parallel/modeling/llama.py:44-50 \u2014 before extracting anything, compare \u0060colossalai/legacy/inference/hybridengine/modeling/llama.py\u0060 and \u0060colossalai/legacy/inference/tensor_parallel/modeling/llama.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 250 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/hybridengine/modeling/llama.py"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"33f4b39a521eb487644bb6f268b56dab35194584b26487cf8309683b8d9908ec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_1d/_operation.py:41-47 | colossalai/shardformer/layer/_operation.py:67-73 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_1d/_operation.py"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"43d7a6bf175d2b9fd84f7fcbc0aea1c02236e66e8c81b8c73423557792469581"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_2d/layers.py:262-268 | colossalai/legacy/nn/layer/parallel_2p5d/layers.py:275-281 \u2014 \u0060colossalai/legacy/nn/layer/parallel_2d/layers.py\u0060 and \u0060colossalai/legacy/nn/layer/parallel_2p5d/layers.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 18 separate duplicated blocks between them, totalling at least 219 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2d/layers.py"},"region":{"startLine":262}}}],"partialFingerprints":{"codehealthFindingId/v1":"de3bbd1675feea15a58c67d19a6f826dcc38e13b2755569860dfa4176a006e73"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_2p5d/layers.py:174-180 | colossalai/legacy/nn/layer/parallel_3d/layers.py:319-325 \u2014 \u0060colossalai/legacy/nn/layer/parallel_2p5d/layers.py\u0060 and \u0060colossalai/legacy/nn/layer/parallel_3d/layers.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 7 separate duplicated blocks between them, totalling at least 87 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/nn/layer/parallel_2p5d/layers.py:174\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2p5d/layers.py"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"3907bbadfbf34a6f067a1004eaa56cf1e95d077d858a8a86960d93d8a67ce319"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_2p5d/layers.py:904-910 | colossalai/legacy/nn/layer/parallel_2p5d/layers.py:1069-1078 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2p5d/layers.py"},"region":{"startLine":904}}}],"partialFingerprints":{"codehealthFindingId/v1":"004f73c6664e8636d15c251948f2701703dc78610a632bbfd4cd0104e5ee5903"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_3d/_operation.py:47-53 | colossalai/legacy/nn/layer/parallel_3d/_operation.py:225-231 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/nn/layer/parallel_3d/_operation.py:47\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_3d/_operation.py"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"471b77c4e7fe0de6b996d823202cc4b9c8e3973d4347526b1695325f00b9a1cf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5\u20137 lines \u00D7 3): colossalai/nn/optimizer/adafactor.py:180-184 | colossalai/nn/optimizer/distributed_adafactor.py:169-174 | colossalai/nn/optimizer/distributed_came.py:162-168 \u2014 before extracting anything, compare \u0060colossalai/nn/optimizer/adafactor.py\u0060 and \u0060colossalai/nn/optimizer/distributed_adafactor.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/adafactor.py"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"7212d7767b4bd78853085546327ed018b9f9fbcd3895c32e13df060580509a33"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): colossalai/nn/optimizer/distributed_adafactor.py:378-384 | colossalai/nn/optimizer/distributed_came.py:436-442 \u2014 before extracting anything, compare \u0060colossalai/nn/optimizer/distributed_adafactor.py\u0060 and \u0060colossalai/nn/optimizer/distributed_came.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 201 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/distributed_adafactor.py"},"region":{"startLine":378}}}],"partialFingerprints":{"codehealthFindingId/v1":"231a8d0113f8b9538926b35bbd23fbc052a3abd4a4f7b000bc5bc37dde73d4b7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (3\u20137 lines \u00D7 3): colossalai/shardformer/layer/_operation.py:518-524 | colossalai/shardformer/layer/_operation.py:750-752 | colossalai/shardformer/layer/_operation.py:844-850 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/layer/_operation.py:518\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/shardformer/layer/_operation.py:517\u0060 calls \u0060contiguous\u0060, \u0060chunk\u0060, \u0060get_world_size\u0060 and \u0060colossalai/shardformer/layer/_operation.py:750\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/_operation.py"},"region":{"startLine":518}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd220d0648344303c36e52a0d8c6ed1251bf08c9b1e55ce373577d58f82617fd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): colossalai/shardformer/modeling/_mixtral_tf4.py:146-152 | colossalai/shardformer/modeling/deepseek.py:177-183 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_mixtral_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/deepseek.py\u0060 as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 427 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_mixtral_tf4.py:146\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_mixtral_tf4.py"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"33c6e9116b581064c23d59637e16d62a5f28e8964f5612329dc533aa46d0e6d1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): colossalai/tensor/shape_consistency.py:357-363 | colossalai/tensor/shape_consistency.py:364-370 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/tensor/shape_consistency.py"},"region":{"startLine":357}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad8e752ff51321531d48ece359a9563be78fe16f89fbf24df574ba5913f431ff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): colossalai/zero/low_level/low_level_optim.py:792-798 | colossalai/zero/low_level/low_level_optim.py:884-890 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/low_level/low_level_optim.py"},"region":{"startLine":792}}}],"partialFingerprints":{"codehealthFindingId/v1":"68ce315dcad261a2d21579e9c5c0e71d87e6caf49f66686899a445a6642bd065"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 8): colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py:89-94 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/embedding_generator.py:61-66 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/getitem_generator.py:40-45 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/layer_norm_generator.py:78-83 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/reshape_generator.py:44-49 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/softmax_generator.py:44-49 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/sum_generator.py:41-46 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/unary_elementwise_generator.py:32-37 \u2014 before extracting anything, compare \u0060colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py\u0060 and \u0060colossalai/auto_parallel/tensor_shard/node_handler/strategy/embedding_generator.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 143 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py:86\u0060 calls \u0060_compute_size_in_bytes\u0060 and \u0060colossalai/auto_parallel/tensor_shard/node_handler/strategy/embedding_generator.py:59\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"90da421fc65d0b14e772d0a4163bf97299a4759e5ce1154b6fd302b871862cc1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 8): colossalai/legacy/inference/quant/smoothquant/models/llama.py:571-577 | colossalai/legacy/inference/tensor_parallel/modeling/bloom.py:96-101 | colossalai/legacy/moe/openmoe/model/modeling_openmoe.py:717-723 | colossalai/legacy/moe/openmoe/model/openmoe_policy.py:253-259 | colossalai/shardformer/modeling/_deepseek_v3_tf4.py:161-167 | colossalai/shardformer/modeling/_qwen2_tf4.py:62-68 | colossalai/shardformer/modeling/_qwen3_tf4.py:62-68 | colossalai/shardformer/modeling/bloom.py:139-144 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 8 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 8 times. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060colossalai/legacy/moe/openmoe/model/openmoe_policy.py:262\u0060 calls \u0060is_first_stage\u0060 and \u0060colossalai/legacy/inference/quant/smoothquant/models/llama.py:580\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/quant/smoothquant/models/llama.py"},"region":{"startLine":571}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7de12bc8471bdc7c392ce566b6241894d271ed9acd1c845e82887adc009accd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 7): colossalai/shardformer/modeling/_bert_tf4.py:451-456 | colossalai/shardformer/modeling/_bert_tf4.py:533-538 | colossalai/shardformer/modeling/_bert_tf5.py:464-469 | colossalai/shardformer/modeling/_bert_tf5.py:546-551 | examples/community/roberta/pretraining/model/bert.py:1248-1253 | examples/community/roberta/pretraining/model/bert.py:1361-1366 | examples/community/roberta/pretraining/model/deberta_v2.py:1170-1175 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 45 separate duplicated blocks between them, totalling at least 882 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/shardformer/modeling/_bert_tf4.py:449\u0060 calls \u0060contiguous\u0060 and \u0060colossalai/shardformer/modeling/_bert_tf4.py:532\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":451}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b10e4c4c6f0998e77855d5011561e29b6fa882629bca74bc92a4a05d0e90bdb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 7): colossalai/shardformer/modeling/_qwen2_tf4.py:625-631 | colossalai/shardformer/modeling/_qwen3_tf4.py:617-623 | colossalai/shardformer/modeling/_whisper_tf4.py:178-183 | colossalai/shardformer/modeling/deepseek.py:722-728 | colossalai/shardformer/modeling/gptj.py:664-669 | colossalai/shardformer/modeling/gptj.py:840-845 | colossalai/shardformer/modeling/opt.py:629-635 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_qwen2_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_qwen3_tf4.py\u0060 as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 1214 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen2_tf4.py"},"region":{"startLine":625}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6a247423e2d69b1215e2579718583c0d84636e6352551c92034804aabf7d005"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 7): colossalai/shardformer/modeling/_qwen2_tf4.py:770-775 | colossalai/shardformer/modeling/_qwen2_tf5.py:543-548 | colossalai/shardformer/modeling/_qwen3_tf4.py:762-767 | colossalai/shardformer/modeling/_qwen3_tf5.py:544-549 | colossalai/shardformer/modeling/command.py:581-586 | colossalai/shardformer/modeling/mistral.py:566-571 | colossalai/shardformer/modeling/opt.py:853-858 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_qwen2_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_qwen2_tf5.py\u0060 as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 242 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen2_tf4.py"},"region":{"startLine":770}}}],"partialFingerprints":{"codehealthFindingId/v1":"e26a151c5da1d930cc46abb697022e1dea616079fb475d74f51a04688e30e768"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 6): colossalai/legacy/inference/quant/smoothquant/models/llama.py:624-629 | colossalai/legacy/moe/openmoe/model/modeling_openmoe.py:744-749 | colossalai/shardformer/modeling/_mixtral_tf4.py:726-731 | colossalai/shardformer/modeling/_mixtral_tf5.py:1125-1130 | colossalai/shardformer/modeling/_qwen2_tf4.py:655-660 | colossalai/shardformer/modeling/_qwen3_tf4.py:647-652 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 6 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 6 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/quant/smoothquant/models/llama.py"},"region":{"startLine":624}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0b5a63adbc5eb0e53aa041a55e09fc95e80e953383017a9ac9b068c6b8e699d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 5): colossalai/legacy/moe/openmoe/model/openmoe_policy.py:253-259 | colossalai/shardformer/modeling/_qwen2_tf4.py:62-68 | colossalai/shardformer/modeling/_qwen3_tf4.py:62-68 | colossalai/shardformer/modeling/_whisper_tf4.py:904-909 | colossalai/shardformer/modeling/opt.py:89-94 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/openmoe/model/openmoe_policy.py"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"14402968c2f8405a0dc9bbc64ccef16abc1ace16a45993f22235da055328192b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): colossalai/booster/plugin/gemini_plugin.py:85-90 | colossalai/booster/plugin/torch_fsdp_plugin.py:103-108 | colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py:836-841 | colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py:858-863 \u2014 there are 4 copies across 3 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/plugin/gemini_plugin.py"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"e96a8ea728bdf16ed517b9539ead3597456ca014455eabd413405a32a8f2fd4b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py:389-394 | colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py:666-671 | colossalai/checkpoint_io/moe_checkpoint.py:271-276 | colossalai/checkpoint_io/moe_checkpoint.py:550-555 \u2014 before extracting anything, compare \u0060colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py\u0060 and \u0060colossalai/checkpoint_io/moe_checkpoint.py\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 249 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: \u0060CheckpointIndexFile\u0060 names \u0060.index_file\u0060 in one and \u0060colossalai.checkpoint_io\u0060 in another \u2014 different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":389}}}],"partialFingerprints":{"codehealthFindingId/v1":"688003cd719695ba48280c86a07520050bddc8921a546ee0acf8a92e1fe162f9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): colossalai/fx/profiler/experimental/profiler_module/convolution.py:46-51 | colossalai/fx/profiler/experimental/profiler_module/convolution.py:75-80 | colossalai/fx/tracer/meta_patch/patched_module/convolution.py:34-39 | colossalai/fx/tracer/meta_patch/patched_module/convolution.py:57-62 \u2014 before extracting anything, compare \u0060colossalai/fx/profiler/experimental/profiler_module/convolution.py\u0060 and \u0060colossalai/fx/tracer/meta_patch/patched_module/convolution.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/fx/profiler/experimental/profiler_module/convolution.py:46\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060self\u0060 to \u0060torch.nn.Conv2d\u0060 in one and \u0060torch.nn.Conv3d\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/profiler/experimental/profiler_module/convolution.py"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f4cdccc3f79ef70ea1d13bdd447f09f56385df28e006c63f8b555b50d08d676"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): colossalai/nn/optimizer/distributed_came.py:155-160 | colossalai/nn/optimizer/distributed_came.py:188-193 | colossalai/nn/optimizer/distributed_came.py:237-242 | colossalai/nn/optimizer/distributed_came.py:290-295 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/distributed_came.py"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c2d3e1dfd8e8d1e4b01e15613b5c9cb2872c4e368b217544192a6a7497223bb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): colossalai/shardformer/modeling/_bert_tf4.py:870-875 | colossalai/shardformer/modeling/_bert_tf5.py:883-888 | examples/community/roberta/pretraining/model/bert.py:1651-1656 | examples/community/roberta/pretraining/model/deberta_v2.py:1595-1600 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 45 separate duplicated blocks between them, totalling at least 882 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":870}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f093f68b80775c196391c1e59ba830704049e4690b72e29b1ccf5c87f8068be"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): colossalai/shardformer/modeling/_bert_tf4.py:1020-1025 | colossalai/shardformer/modeling/_bert_tf4.py:1032-1037 | colossalai/shardformer/modeling/_bert_tf5.py:1033-1038 | colossalai/shardformer/modeling/_bert_tf5.py:1045-1050 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 45 separate duplicated blocks between them, totalling at least 882 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060self\u0060 to \u0060BertSelfOutput\u0060 in one and \u0060BertOutput\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":1020}}}],"partialFingerprints":{"codehealthFindingId/v1":"34053556b224ac8db86fcc81172bbb42bb2f2879a9e830516d8d7bb7b9aac2c7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): colossalai/shardformer/modeling/_deepseek_v3_tf5.py:123-129 | colossalai/shardformer/modeling/_mixtral_tf4.py:129-135 | colossalai/shardformer/modeling/_mixtral_tf5.py:477-483 | colossalai/shardformer/modeling/deepseek.py:163-168 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_deepseek_v3_tf5.py\u0060 and \u0060colossalai/shardformer/modeling/_mixtral_tf5.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_deepseek_v3_tf5.py:123\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_deepseek_v3_tf5.py"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c1ffd3c637f9f70e3c636aca404af814fd2171c4ea88ec773d7fce477b0c33b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py:193-198 | colossalai/checkpoint_io/utils.py:418-423 | colossalai/zero/gemini/gemini_ddp.py:980-985 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":193}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ff9e14f15ffac0dff06134c052e0b36576f3747cf91129c0075fdac74c31466"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): colossalai/fx/tracer/meta_patch/patched_function/convolution.py:122-127 | colossalai/fx/tracer/meta_patch/patched_function/convolution.py:147-152 | colossalai/fx/tracer/meta_patch/patched_function/convolution.py:176-181 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/fx/tracer/meta_patch/patched_function/convolution.py:122\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/meta_patch/patched_function/convolution.py"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad424ab9ca2a3fd29419ecd84eee5b9825ab95f01dffb0211e3d9dac6fd10f40"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): colossalai/legacy/nn/layer/parallel_2d/layers.py:543-548 | colossalai/legacy/nn/layer/parallel_2p5d/layers.py:556-561 | colossalai/legacy/nn/layer/parallel_3d/layers.py:826-831 \u2014 \u0060colossalai/legacy/nn/layer/parallel_2d/layers.py\u0060 and \u0060colossalai/legacy/nn/layer/parallel_2p5d/layers.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 18 separate duplicated blocks between them, totalling at least 219 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/nn/layer/parallel_2d/layers.py:543\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2d/layers.py"},"region":{"startLine":543}}}],"partialFingerprints":{"codehealthFindingId/v1":"e07d3b9b7727c1d75f5f69b3ce0062e57ffd3acf0c372c03e84ca9b775317bee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): colossalai/nn/optimizer/distributed_adafactor.py:162-167 | colossalai/nn/optimizer/distributed_adafactor.py:195-200 | colossalai/nn/optimizer/distributed_adafactor.py:243-248 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/distributed_adafactor.py"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"6be8364947f01dd4b5b5f5213218b476e29a5562aafbded39c06fe892f284911"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): colossalai/shardformer/layer/_operation.py:283-288 | colossalai/shardformer/layer/_operation.py:370-375 | colossalai/shardformer/layer/_operation.py:588-593 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/_operation.py"},"region":{"startLine":283}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb10b93dded0cc35db2c34e490e34a67135ae265feb7d7adfc9e0cf222ba3287"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): colossalai/shardformer/layer/linear.py:268-273 | colossalai/shardformer/layer/qkv_fused_linear.py:292-297 | colossalai/shardformer/layer/qkv_fused_linear.py:887-892 \u2014 before extracting anything, compare \u0060colossalai/shardformer/layer/linear.py\u0060 and \u0060colossalai/shardformer/layer/qkv_fused_linear.py\u0060 as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 261 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/linear.py"},"region":{"startLine":268}}}],"partialFingerprints":{"codehealthFindingId/v1":"07295fecddcd424dc7dd27f38b2253c0324ddb7458fec228c9f5ba4ec0ecac4d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): colossalai/shardformer/modeling/_whisper_tf4.py:683-688 | colossalai/shardformer/modeling/_whisper_tf4.py:904-909 | colossalai/shardformer/modeling/opt.py:89-94 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_whisper_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/opt.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 105 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_whisper_tf4.py"},"region":{"startLine":683}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8b409da8c9b4668a4e45ae033c5c703fc598f8919b8f74085d732d616173508"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): applications/ColossalChat/coati/distributed/grpo_consumer.py:157-162 | applications/ColossalChat/coati/distributed/zero_bubble/grpo_consumer.py:155-160 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/distributed/grpo_consumer.py\u0060 and \u0060applications/ColossalChat/coati/distributed/zero_bubble/grpo_consumer.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 407 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/coati/distributed/grpo_consumer.py:157\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/grpo_consumer.py"},"region":{"startLine":157}}}],"partialFingerprints":{"codehealthFindingId/v1":"b518eb77565dc0ec63ca8c4f0b2fe69fbb4096a705215e432335768748178ef3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): applications/ColossalChat/coati/models/loss.py:264-269 | applications/ColossalChat/coati/models/loss.py:272-277 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/models/loss.py"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"c15a37b86f31942a1d61e167b410895cd96a52b78693390eda96fd259d4eec2e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): applications/ColossalChat/coati/quant/llama_gptq/quant.py:181-186 | applications/ColossalChat/coati/quant/llama_gptq/quant.py:188-193 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/quant/llama_gptq/quant.py"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"acca787242033b6f5f3db24999dda4b4e480d7901bb58375748bab120478e79a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): applications/ColossalChat/coati/quant/llama_gptq/quant.py:217-222 | applications/ColossalChat/coati/quant/llama_gptq/quant.py:224-229 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/quant/llama_gptq/quant.py"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"756c4b42d215942febc7268e880c7e82264e776002ee98ffa75bb6165606ee93"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): applications/ColossalChat/coati/utils/ckpt_io.py:47-52 | applications/ColossalMoE/utils.py:44-49 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/utils/ckpt_io.py\u0060 and \u0060applications/ColossalMoE/utils.py\u0060 as WHOLE FILES: 93% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/utils/ckpt_io.py"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"58d665b6b3eb1a0834392472ddfef526002106dff1a87b72df5725c70e741ed8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): colossalai/autochunk/select_chunk.py:53-58 | colossalai/autochunk/select_chunk.py:152-157 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/autochunk/select_chunk.py"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e0fee83611cd26b17c63dc122a2f4b9cd5fc61a34285b225346ef92b6d28342"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): colossalai/autochunk/trace_indice.py:351-356 | colossalai/autochunk/trace_indice.py:373-378 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/autochunk/trace_indice.py"},"region":{"startLine":351}}}],"partialFingerprints":{"codehealthFindingId/v1":"66c0c5f9243bc23eb1dde9d3eff5cec285ccad96c77a93020a7c840e01f36cb1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py:842-847 | colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py:864-869 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":842}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e460baeb03ad3a37b780ace4a537af3e6a2fa20acc26c9b545857e4d1c3e81a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py:1178-1183 | colossalai/checkpoint_io/moe_checkpoint.py:778-783 \u2014 before extracting anything, compare \u0060colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py\u0060 and \u0060colossalai/checkpoint_io/moe_checkpoint.py\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 249 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":1178}}}],"partialFingerprints":{"codehealthFindingId/v1":"40f8e8272aeb94ed2e926b48a1409e63e8ff0179c4beb75c70d10b0dcff7fc5a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5\u20136 lines \u00D7 2): colossalai/cli/check/check_installation.py:61-65 | colossalai/cli/check/check_installation.py:73-78 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/cli/check/check_installation.py:73\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/cli/check/check_installation.py"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1b9d9f6fcdf58f94fd6087c7d06ac926b3b6cc1d4d56c0f4155d5ee1e85427b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): colossalai/fx/profiler/experimental/profiler_module/convolution.py:21-26 | colossalai/fx/tracer/meta_patch/patched_module/convolution.py:15-20 \u2014 before extracting anything, compare \u0060colossalai/fx/profiler/experimental/profiler_module/convolution.py\u0060 and \u0060colossalai/fx/tracer/meta_patch/patched_module/convolution.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/fx/profiler/experimental/profiler_module/convolution.py:21\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/profiler/experimental/profiler_module/convolution.py"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"531cc567f6b41defa94e2b08b75e0d12c836bcdb5dfdaf6a54f1ab3905d1569a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): colossalai/inference/modeling/layers/distrifusion.py:145-150 | colossalai/inference/modeling/layers/distrifusion.py:203-208 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/modeling/layers/distrifusion.py"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f017daa77c32a5833e51ef6cfaa1a2386bbea01e4286bf0a12146b3a3432dfb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): colossalai/kernel/triton/fused_rotary_embedding.py:31-36 | colossalai/kernel/triton/rotary_cache_copy.py:22-27 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/kernel/triton/fused_rotary_embedding.py:31\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/fused_rotary_embedding.py"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0bc8394e7e9b2e6cc8ef0ac31401a78613fbb643acbf35e68d9bd4cbb618310"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): colossalai/legacy/communication/p2p.py:176-181 | colossalai/legacy/communication/p2p.py:183-190 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/communication/p2p.py:176\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/communication/p2p.py"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"7527195a2f303e2e16191ecd6fa405a298593adee27210a748364f9b6fdcf5d1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_2d/layers.py:429-434 | colossalai/legacy/nn/layer/parallel_2p5d/layers.py:442-447 \u2014 \u0060colossalai/legacy/nn/layer/parallel_2d/layers.py\u0060 and \u0060colossalai/legacy/nn/layer/parallel_2p5d/layers.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 18 separate duplicated blocks between them, totalling at least 219 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/nn/layer/parallel_2d/layers.py:429\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2d/layers.py"},"region":{"startLine":429}}}],"partialFingerprints":{"codehealthFindingId/v1":"c65fdbdc4e8856380314fbc784ad140a4548b8537307f1129f505414bf6304b9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_3d/layers.py:709-714 | colossalai/legacy/nn/layer/vanilla/layers.py:167-172 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/nn/layer/parallel_3d/layers.py:709\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_3d/layers.py"},"region":{"startLine":709}}}],"partialFingerprints":{"codehealthFindingId/v1":"d34030e45f0d05b5c4d08ef03873e729cb9d36b20477338baa9c9b508b6db0cc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_3d/layers.py:838-843 | colossalai/legacy/nn/layer/vanilla/layers.py:204-209 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_3d/layers.py"},"region":{"startLine":838}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bb49fdfc39836ee16ee5e4ac033f3d7cf9093b8c12720b78f1b351df5fef4f6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): colossalai/legacy/nn/parallel/layers/cache_embedding/parallel_cached_embedding_tablewise.py:139-144 | colossalai/legacy/nn/parallel/layers/cache_embedding/parallel_cached_embedding_tablewise_split_cache.py:128-133 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/nn/parallel/layers/cache_embedding/parallel_cached_embedding_tablewise.py:139\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/parallel/layers/cache_embedding/parallel_cached_embedding_tablewise.py"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"11f937bb4f156a8c203b53cd8c99fbdfea6cc7c666e8059a0103ced023d55100"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): colossalai/nn/optimizer/came.py:126-133 | colossalai/nn/optimizer/distributed_came.py:505-510 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/came.py"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"1551febe841960d77f94a505c306597b785719d5e0b259bd6b52a255006eb830"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): colossalai/nn/optimizer/galore.py:82-87 | colossalai/nn/optimizer/galore.py:93-99 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/galore.py"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"426e261bdfc0da32662ee012a6e2ae05fad29383421af2cf134b4760263b0c32"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): colossalai/pipeline/schedule/zero_bubble_pp.py:563-568 | colossalai/pipeline/schedule/zero_bubble_pp.py:624-629 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/pipeline/schedule/zero_bubble_pp.py"},"region":{"startLine":563}}}],"partialFingerprints":{"codehealthFindingId/v1":"22537cf87c9878475b1e42f9511148a077b8532212e70f51c5fffeaa4d9e2f4e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): colossalai/shardformer/layer/attn.py:1087-1092 | colossalai/shardformer/layer/attn.py:1139-1144 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/attn.py"},"region":{"startLine":1087}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0a261bda41bf89c21cce52c8f6be3db21fcb9ecab51382ed0b29bf9bd5467af"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): colossalai/shardformer/layer/linear.py:260-266 | colossalai/shardformer/layer/qkv_fused_linear.py:494-499 \u2014 before extracting anything, compare \u0060colossalai/shardformer/layer/linear.py\u0060 and \u0060colossalai/shardformer/layer/qkv_fused_linear.py\u0060 as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 261 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/layer/linear.py:260\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060colossalai/shardformer/layer/qkv_fused_linear.py:503\u0060 calls \u0060chunk_weight\u0060 and \u0060colossalai/shardformer/layer/linear.py:268\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/linear.py"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"2800fd30bf83bc3bcf50842d2b336b95aede1fe1327ed0ae0c0a8fdf179a0bc2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): colossalai/shardformer/layer/loss.py:63-68 | colossalai/shardformer/layer/loss.py:169-177 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/loss.py"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"91056ed54cba9964ec5e623079b59a6b124ff2e4498e306f220247c362b42f4f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 8): colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py:95-99 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/embedding_generator.py:67-71 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/getitem_generator.py:46-50 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/layer_norm_generator.py:84-88 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/reshape_generator.py:50-54 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/softmax_generator.py:50-54 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/sum_generator.py:47-51 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/unary_elementwise_generator.py:38-42 \u2014 before extracting anything, compare \u0060colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py\u0060 and \u0060colossalai/auto_parallel/tensor_shard/node_handler/strategy/embedding_generator.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 143 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"690889bbee4f28ba7faa9a19eb47cfbbe6da4ba7948b6578c4ad3492db308c1b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 7): colossalai/legacy/moe/openmoe/model/openmoe_policy.py:253-257 | colossalai/shardformer/modeling/_qwen2_tf4.py:62-66 | colossalai/shardformer/modeling/_qwen2_tf5.py:61-65 | colossalai/shardformer/modeling/_qwen3_tf4.py:62-66 | colossalai/shardformer/modeling/_qwen3_tf5.py:62-66 | colossalai/shardformer/modeling/_whisper_tf4.py:902-908 | colossalai/shardformer/modeling/opt.py:89-93 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 7 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 7 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/openmoe/model/openmoe_policy.py"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"b081d7021bcfc57857e63f7217709570542b9a788c2ccc21143a95885a7b0106"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 6): colossalai/fx/profiler/experimental/profiler_module/convolution.py:21-25 | colossalai/fx/profiler/experimental/profiler_module/convolution.py:46-50 | colossalai/fx/profiler/experimental/profiler_module/convolution.py:75-79 | colossalai/fx/tracer/meta_patch/patched_module/convolution.py:15-19 | colossalai/fx/tracer/meta_patch/patched_module/convolution.py:34-38 | colossalai/fx/tracer/meta_patch/patched_module/convolution.py:57-61 \u2014 before extracting anything, compare \u0060colossalai/fx/profiler/experimental/profiler_module/convolution.py\u0060 and \u0060colossalai/fx/tracer/meta_patch/patched_module/convolution.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/fx/profiler/experimental/profiler_module/convolution.py:21\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060self\u0060 to \u0060torch.nn.Conv1d\u0060 in one and \u0060torch.nn.Conv2d\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/profiler/experimental/profiler_module/convolution.py"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"a989ffe1a2588ba5a696bb5fc8667bb292e84b2fec92daae12fe0f53ad6616d3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 5): applications/ColossalChat/coati/trainer/dpo.py:337-341 | applications/ColossalChat/coati/trainer/dpo.py:612-616 | applications/ColossalChat/coati/trainer/orpo.py:177-181 | applications/ColossalChat/coati/trainer/orpo.py:313-317 | applications/ColossalChat/coati/trainer/rm.py:144-148 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/trainer/dpo.py\u0060 and \u0060applications/ColossalChat/coati/trainer/orpo.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 133 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/dpo.py"},"region":{"startLine":337}}}],"partialFingerprints":{"codehealthFindingId/v1":"72e076a9990baa457bb73e2b0a99a33762aaa3a29d8cc5f0857e7d9ea726c812"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (3\u20135 lines \u00D7 5): colossalai/fx/profiler/experimental/profiler_module/convolution.py:18-20 | colossalai/fx/profiler/experimental/profiler_module/convolution.py:41-45 | colossalai/fx/profiler/experimental/profiler_module/convolution.py:67-71 | colossalai/fx/tracer/meta_patch/patched_module/convolution.py:29-33 | colossalai/fx/tracer/meta_patch/patched_module/convolution.py:49-53 \u2014 before extracting anything, compare \u0060colossalai/fx/profiler/experimental/profiler_module/convolution.py\u0060 and \u0060colossalai/fx/tracer/meta_patch/patched_module/convolution.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/fx/profiler/experimental/profiler_module/convolution.py:18\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060self\u0060 to \u0060torch.nn.Conv1d\u0060 in one and \u0060torch.nn.Conv2d\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/profiler/experimental/profiler_module/convolution.py"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"47c3fdb2409fdbc5bf7aa8a117ea5250866260ffc0cfb1e2b6ee05b8d2185676"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): colossalai/legacy/nn/layer/parallel_2d/_operation.py:287-291 | colossalai/legacy/nn/layer/parallel_2d/_operation.py:432-436 | colossalai/legacy/nn/layer/parallel_2p5d/_operation.py:244-250 | colossalai/legacy/nn/layer/parallel_2p5d/_operation.py:397-403 \u2014 \u0060colossalai/legacy/nn/layer/parallel_2d/_operation.py\u0060 and \u0060colossalai/legacy/nn/layer/parallel_2p5d/_operation.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 16 separate duplicated blocks between them, totalling at least 185 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2d/_operation.py"},"region":{"startLine":287}}}],"partialFingerprints":{"codehealthFindingId/v1":"1763b0529d80d4499225f312041c3af52561d1c941fd39417f46758c975e9a66"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): colossalai/nn/optimizer/distributed_adafactor.py:179-184 | colossalai/nn/optimizer/distributed_adafactor.py:204-208 | colossalai/nn/optimizer/distributed_came.py:172-177 | colossalai/nn/optimizer/distributed_came.py:197-201 \u2014 before extracting anything, compare \u0060colossalai/nn/optimizer/distributed_adafactor.py\u0060 and \u0060colossalai/nn/optimizer/distributed_came.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 201 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/distributed_adafactor.py"},"region":{"startLine":179}}}],"partialFingerprints":{"codehealthFindingId/v1":"74eb6d13ad7621ae52fbae00c280bae21c0cef25f4cc3afcb7e8fb4643ccba78"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): colossalai/nn/optimizer/distributed_came.py:165-169 | colossalai/nn/optimizer/distributed_came.py:205-209 | colossalai/nn/optimizer/distributed_came.py:251-257 | colossalai/nn/optimizer/distributed_came.py:304-310 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/nn/optimizer/distributed_came.py:165\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/nn/optimizer/distributed_came.py:250\u0060 calls \u0060_split\u0060, \u0060view\u0060 and \u0060colossalai/nn/optimizer/distributed_came.py:164\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/distributed_came.py"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"91e5d0061425f27bc8eac8b8d3610ff3318edc56850c9d5f45607e12d484932b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): colossalai/shardformer/modeling/_mixtral_tf4.py:681-685 | colossalai/shardformer/modeling/_mixtral_tf5.py:1075-1079 | colossalai/shardformer/modeling/deepseek.py:716-720 | colossalai/shardformer/modeling/opt.py:621-625 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/_mixtral_tf4.py\u0060 and \u0060colossalai/shardformer/modeling/_mixtral_tf5.py\u0060 as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 581 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_mixtral_tf4.py"},"region":{"startLine":681}}}],"partialFingerprints":{"codehealthFindingId/v1":"1afc56e31ab16c72bf6362d7fa0126b215bc81685e96e6b84b227449263e5fe8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): applications/ColossalChat/coati/trainer/dpo.py:639-643 | applications/ColossalChat/coati/trainer/sft.py:216-220 | applications/ColossalChat/coati/trainer/sft.py:244-248 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/dpo.py"},"region":{"startLine":639}}}],"partialFingerprints":{"codehealthFindingId/v1":"63755a0855421fc86042d07e642a83ce792335b10d15c4d3b43878c90cf63a6f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): colossalai/legacy/nn/layer/parallel_2d/layers.py:429-433 | colossalai/legacy/nn/layer/parallel_2p5d/layers.py:442-446 | colossalai/legacy/nn/layer/vanilla/layers.py:169-173 \u2014 \u0060colossalai/legacy/nn/layer/parallel_2d/layers.py\u0060 and \u0060colossalai/legacy/nn/layer/parallel_2p5d/layers.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 18 separate duplicated blocks between them, totalling at least 219 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/nn/layer/parallel_2d/layers.py:429\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/legacy/nn/layer/parallel_2d/layers.py:427\u0060 calls \u0060assert_summa_initialization\u0060, \u0060get_summa_dim_from_env\u0060 and \u0060colossalai/legacy/nn/layer/vanilla/layers.py:168\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2d/layers.py"},"region":{"startLine":429}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cd04857bc22c225021d061b768f6a1d0ce3cf0364eb5683ec03570108f295dc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): colossalai/legacy/nn/loss/loss_1d.py:40-44 | examples/language/gpt/titans/model/embed.py:272-276 | examples/tutorial/sequence_parallel/loss_func/cross_entropy.py:25-29 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060examples/language/gpt/titans/model/embed.py:278\u0060 calls \u0060all_reduce\u0060, \u0060get_group\u0060 and \u0060examples/tutorial/sequence_parallel/loss_func/cross_entropy.py:32\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/loss/loss_1d.py"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"4824ec26531de34de4d2b75cf2a44aeb1e19b4707a923926dbcc37c96d3a7e09"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): colossalai/nn/optimizer/distributed_adafactor.py:172-176 | colossalai/nn/optimizer/distributed_adafactor.py:212-216 | colossalai/nn/optimizer/distributed_adafactor.py:257-263 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/nn/optimizer/distributed_adafactor.py:172\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/nn/optimizer/distributed_adafactor.py:256\u0060 calls \u0060_split\u0060, \u0060view\u0060 and \u0060colossalai/nn/optimizer/distributed_adafactor.py:171\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/distributed_adafactor.py"},"region":{"startLine":172}}}],"partialFingerprints":{"codehealthFindingId/v1":"0baee93a2241441ae030c549eef12632b833f2c381d2dd0f399222ee3054877a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): colossalai/nn/optimizer/distributed_adafactor.py:279-283 | colossalai/nn/optimizer/distributed_came.py:273-277 | colossalai/nn/optimizer/distributed_came.py:326-330 \u2014 before extracting anything, compare \u0060colossalai/nn/optimizer/distributed_adafactor.py\u0060 and \u0060colossalai/nn/optimizer/distributed_came.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 201 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/distributed_adafactor.py"},"region":{"startLine":279}}}],"partialFingerprints":{"codehealthFindingId/v1":"679f7e9b9ef707e716a5eeef9791c7b5e7d657cd7bc57139a68e19bcbd9be3e6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): colossalai/shardformer/layer/_operation.py:511-515 | colossalai/shardformer/layer/_operation.py:744-748 | colossalai/shardformer/layer/_operation.py:838-842 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/_operation.py"},"region":{"startLine":511}}}],"partialFingerprints":{"codehealthFindingId/v1":"761e0ed8926493c2aaf8a46c1c19a73e28dee74151f19370b29db2433e21dc6d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): applications/ColossalChat/coati/experience_maker/naive.py:167-171 | applications/ColossalChat/examples/community/peft/easy_models.py:38-42 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/experience_maker/naive.py"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8fb7c8fdf4cf07b534b65a34652d3c77ffc781d2b825ca2f3313ba438d2285e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): applications/ColossalChat/coati/trainer/dpo.py:358-362 | applications/ColossalChat/coati/trainer/kto.py:223-227 | applications/ColossalChat/coati/trainer/rm.py:157-162 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/trainer/dpo.py\u0060 and \u0060applications/ColossalChat/coati/trainer/kto.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/coati/trainer/dpo.py:358\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/dpo.py"},"region":{"startLine":358}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b8ef5f8490905da58c4ff6b195e94453f6bece756904873e7cc1f7e6940bba2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): applications/ColossalChat/coati/trainer/grpo.py:284-288 | applications/ColossalChat/coati/trainer/ppo.py:284-288 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/trainer/grpo.py\u0060 and \u0060applications/ColossalChat/coati/trainer/ppo.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 176 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/grpo.py"},"region":{"startLine":284}}}],"partialFingerprints":{"codehealthFindingId/v1":"732c36fc311252cdb64504d0b9a01c88b16ddddcba50db447e10f882ecc188cd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): applications/ColossalChat/coati/trainer/kto.py:351-355 | applications/ColossalChat/coati/trainer/orpo.py:326-330 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/trainer/kto.py\u0060 and \u0060applications/ColossalChat/coati/trainer/orpo.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 138 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/kto.py"},"region":{"startLine":351}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1d6bde31b955a25acebf490fe064fcbc89aedd044171337fd434e90c219fc83"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): colossalai/auto_parallel/checkpoint/ckpt_solver_base.py:188-192 | colossalai/auto_parallel/offload/region_manager.py:441-445 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/checkpoint/ckpt_solver_base.py"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f34f1e9341bb0268fcf998f6f516345d5ae084dc2c8d2b73cb7d7207be149d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): colossalai/booster/plugin/gemini_plugin.py:91-95 | colossalai/booster/plugin/torch_fsdp_plugin.py:109-113 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/plugin/gemini_plugin.py"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec0e86890a945ed633ba007db073adb95508c5dda250b9a6c83a3c9a9e487e0e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): colossalai/checkpoint_io/moe_checkpoint.py:333-337 | colossalai/checkpoint_io/moe_checkpoint.py:344-348 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/moe_checkpoint.py"},"region":{"startLine":333}}}],"partialFingerprints":{"codehealthFindingId/v1":"751b97b977543f60809e028690d6e3081951f83dc21da8b18bab52305b0dce4e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): colossalai/fx/tracer/meta_patch/patched_function/convolution.py:78-82 | colossalai/fx/tracer/meta_patch/patched_function/convolution.py:100-104 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/fx/tracer/meta_patch/patched_function/convolution.py:78\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/meta_patch/patched_function/convolution.py"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a2d3e364a0b958750361c4081587334d997d5e3e823812a7f09279e6af1b57a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): colossalai/fx/tracer/meta_patch/patched_function/convolution.py:143-147 | colossalai/fx/tracer/meta_patch/patched_function/convolution.py:169-173 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/fx/tracer/meta_patch/patched_function/convolution.py:143\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/meta_patch/patched_function/convolution.py"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6b8fdba26f26d06e05450e63d31d1a7b593c96998f7fb3c236fb95f567d12b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): colossalai/fx/tracer/meta_patch/patched_module/pooling.py:49-53 | colossalai/fx/tracer/meta_patch/patched_module/pooling.py:77-81 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/fx/tracer/meta_patch/patched_module/pooling.py:49\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/meta_patch/patched_module/pooling.py"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee7b16c9718c3e376c064a68fd11b36b3e5d5a2e1e3eebf5645823c5b88524a9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): colossalai/fx/tracer/meta_patch/patched_module/pooling.py:130-134 | colossalai/fx/tracer/meta_patch/patched_module/pooling.py:159-163 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/fx/tracer/meta_patch/patched_module/pooling.py:130\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/meta_patch/patched_module/pooling.py"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"482ba029a388ab89e13180045af18cbdd6d779ea260deb6e964acdfa79fea44b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): colossalai/inference/batch_bucket.py:502-506 | colossalai/inference/batch_bucket.py:518-522 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/inference/batch_bucket.py:502\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/batch_bucket.py"},"region":{"startLine":502}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1b3b9c6efbabf43fa4d4588bbd09ff1bef333694026f3301b5f7e74b4733976"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): colossalai/inference/modeling/models/glide_llama.py:38-42 | colossalai/legacy/inference/quant/smoothquant/models/llama.py:408-413 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/modeling/models/glide_llama.py"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6a06c7f25725f5b600f35c571bf804a1e7614a6055031ec39e29d6709bcd40e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): colossalai/inference/modeling/models/nopadding_llama.py:333-337 | colossalai/inference/modeling/models/nopadding_llama.py:599-603 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060colossalai/inference/modeling/models/nopadding_llama.py:605\u0060 calls \u0060hasattr\u0060 and \u0060colossalai/inference/modeling/models/nopadding_llama.py:338\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/modeling/models/nopadding_llama.py"},"region":{"startLine":333}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a8c2d414a0fe5af0cd7f0e90f4aaf18903994401da958fd31e8aa73c45611be"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): colossalai/legacy/inference/dynamic_batching/ray_dist_init.py:57-61 | colossalai/legacy/inference/serving/ray_serve/Colossal_Inference_rayserve.py:57-61 \u2014 before extracting anything, compare \u0060colossalai/legacy/inference/dynamic_batching/ray_dist_init.py\u0060 and \u0060colossalai/legacy/inference/serving/ray_serve/Colossal_Inference_rayserve.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/dynamic_batching/ray_dist_init.py"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"8edf5459d814498b6a5c37991c3189ea1c8d9f3962a2d88941efd5929aeb3f2b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): colossalai/legacy/inference/quant/smoothquant/models/llama.py:451-455 | colossalai/legacy/moe/openmoe/model/modeling_openmoe.py:359-363 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060colossalai/legacy/inference/quant/smoothquant/models/llama.py:456\u0060 calls \u0060rotary_emb\u0060, \u0060q_apply_rotary\u0060, \u0060k_apply_rotary\u0060 and \u0060colossalai/legacy/moe/openmoe/model/modeling_openmoe.py:366\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/quant/smoothquant/models/llama.py"},"region":{"startLine":451}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd6bf3d8302a1b41c291775e1fbe43a4a0fc86be6a58bfa8487366da581e1ba2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): colossalai/legacy/inference/quant/smoothquant/models/llama.py:739-743 | colossalai/legacy/inference/quant/smoothquant/models/llama.py:745-749 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/quant/smoothquant/models/llama.py"},"region":{"startLine":739}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fdbb090ce3a504713404b5386bacd4e0813cb11a1f626990a052c95582f0dc0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): colossalai/legacy/nn/_ops/_utils.py:249-253 | colossalai/legacy/nn/_ops/_utils.py:258-262 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/_ops/_utils.py"},"region":{"startLine":249}}}],"partialFingerprints":{"codehealthFindingId/v1":"094f820abcfad4deb43c5513a4e73260c84c9b3c804f0a223801658f1b2af9fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_2d/_operation.py:130-134 | colossalai/legacy/nn/layer/parallel_2p5d/_operation.py:82-86 \u2014 \u0060colossalai/legacy/nn/layer/parallel_2d/_operation.py\u0060 and \u0060colossalai/legacy/nn/layer/parallel_2p5d/_operation.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 16 separate duplicated blocks between them, totalling at least 185 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2d/_operation.py"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"11ca84a4777624141a0e1b79f7a7e1e70cb0ad26a58315c6fe8a58b94c520d62"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_2d/layers.py:515-519 | colossalai/legacy/nn/layer/parallel_2p5d/layers.py:528-532 \u2014 \u0060colossalai/legacy/nn/layer/parallel_2d/layers.py\u0060 and \u0060colossalai/legacy/nn/layer/parallel_2p5d/layers.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 18 separate duplicated blocks between them, totalling at least 219 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/nn/layer/parallel_2d/layers.py:515\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2d/layers.py"},"region":{"startLine":515}}}],"partialFingerprints":{"codehealthFindingId/v1":"068033f340e33138ce83fce16b5c8136a38ad3732775f8b1e4adf41edb091fdb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): colossalai/legacy/nn/parallel/layers/cache_embedding/parallel_cached_embedding_tablewise.py:41-45 | colossalai/legacy/nn/parallel/layers/cache_embedding/parallel_cached_embedding_tablewise_split_cache.py:40-44 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/legacy/nn/parallel/layers/cache_embedding/parallel_cached_embedding_tablewise_split_cache.py:39\u0060 calls \u0060super\u0060, \u0060__init__\u0060 and \u0060colossalai/legacy/nn/parallel/layers/cache_embedding/parallel_cached_embedding_tablewise.py:40\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/parallel/layers/cache_embedding/parallel_cached_embedding_tablewise.py"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cdfa277401e4bee74057fd0abb330e55bde870fc3d2281923c44da250d21fb3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): colossalai/legacy/trainer/hooks/_log_hook.py:54-58 | colossalai/legacy/trainer/hooks/_log_hook.py:62-66 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/trainer/hooks/_log_hook.py"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a5a2484899399db9b158b033b7f98453cc571d20aac1c0a066c4078481c88d1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): colossalai/quantization/fp8.py:453-457 | colossalai/quantization/fp8.py:479-483 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/quantization/fp8.py:453\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/quantization/fp8.py"},"region":{"startLine":453}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd22ebacec037d2c4857a32b9cbbbd05a456ede01539a5e5269be4b878638b05"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): colossalai/quantization/fp8.py:697-701 | colossalai/quantization/fp8.py:728-732 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/quantization/fp8.py"},"region":{"startLine":697}}}],"partialFingerprints":{"codehealthFindingId/v1":"9142c41a43fa246143994f556de16238ce89ca0347b7a737bc0db9e40b0cc292"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): colossalai/shardformer/modeling/_whisper_tf4.py:350-354 | colossalai/shardformer/modeling/_whisper_tf4.py:445-449 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_whisper_tf4.py"},"region":{"startLine":350}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ad943a312d5400c4ab96641e00c66eaa9478e9c154433ec2fbab63f3097b072"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): colossalai/shardformer/modeling/chatglm2.py:344-348 | colossalai/shardformer/modeling/chatglm2.py:647-651 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/chatglm2.py"},"region":{"startLine":344}}}],"partialFingerprints":{"codehealthFindingId/v1":"84ee3668eee733957e696f2e751815c4ebdadaaf566d90f3024d4af5937570b9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): colossalai/shardformer/policies/_whisper_tf4.py:234-238 | colossalai/shardformer/policies/_whisper_tf5.py:235-239 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_whisper_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_whisper_tf5.py\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 483 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/policies/_whisper_tf4.py:234\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_whisper_tf4.py"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d05f37abf6242c6dfb854dad99abd35344060b375401893cf46c8154c759931"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_2d/layers.py:977-1003 | colossalai/legacy/nn/layer/parallel_2p5d/layers.py:992-1018 \u2014 \u0060colossalai/legacy/nn/layer/parallel_2d/layers.py\u0060 and \u0060colossalai/legacy/nn/layer/parallel_2p5d/layers.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 18 separate duplicated blocks between them, totalling at least 219 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2d/layers.py"},"region":{"startLine":977}}}],"partialFingerprints":{"codehealthFindingId/v1":"deb00ff9bc85377d1888db7f585aec717bedc8f0c15cfae0161073d59d1db590"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 4): applications/Colossal-LLaMA/setup.py:5-16 | applications/ColossalChat/setup.py:5-16 | applications/ColossalMoE/setup.py:5-16 | applications/ColossalQA/setup.py:5-16 \u2014 \u0060applications/Colossal-LLaMA/setup.py\u0060 and \u0060applications/ColossalChat/setup.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 2 separate duplicated blocks between them, totalling at least 24 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060applications/ColossalQA/setup.py:19\u0060 calls \u0060find_packages\u0060 and \u0060applications/Colossal-LLaMA/setup.py:19\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/setup.py"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d5aee35491558cbd4a95a730c7c6c58581c7955bacc2d529acf55beed1f47d9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 5): applications/Colossal-LLaMA/setup.py:5-16 | applications/ColossalChat/setup.py:5-16 | applications/ColossalEval/setup.py:5-11 | applications/ColossalMoE/setup.py:5-16 | applications/ColossalQA/setup.py:5-16 \u2014 \u0060applications/Colossal-LLaMA/setup.py\u0060 and \u0060applications/ColossalChat/setup.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 2 separate duplicated blocks between them, totalling at least 24 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060applications/ColossalQA/setup.py:19\u0060 calls \u0060find_packages\u0060 and \u0060applications/Colossal-LLaMA/setup.py:19\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/setup.py"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"f09462173acdb3f9e5d6d6f23c551ad086d7f3e11b74af3fe56d67cac7cd2d0d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): colossalai/auto_parallel/meta_profiler/registry.py:6-27 | colossalai/auto_parallel/tensor_shard/node_handler/registry.py:3-24 \u2014 before extracting anything, compare \u0060colossalai/auto_parallel/meta_profiler/registry.py\u0060 and \u0060colossalai/auto_parallel/tensor_shard/node_handler/registry.py\u0060 as WHOLE FILES: 95% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/meta_profiler/registry.py"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f44aff4e607ca5b023d50a698f657789043e73edc1213050eca7d9989b6a3b0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): colossalai/fx/profiler/experimental/registry.py:3-19 | colossalai/fx/tracer/registry.py:3-19 \u2014 before extracting anything, compare \u0060colossalai/fx/profiler/experimental/registry.py\u0060 and \u0060colossalai/fx/tracer/registry.py\u0060 as WHOLE FILES: 82% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/profiler/experimental/registry.py"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"b583f35242afdd8c5ba17c5032d81a24be9346250a69538fc98a2aa6ec0edc12"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): extensions/pybind/inference/inference_ops_cuda.py:6-30 | extensions/pybind/optimizer/fused_optimizer_cuda.py:6-27 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"extensions/pybind/inference/inference_ops_cuda.py"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"7cff1381506650237f01f0168fef8f951c71c1ed46741925a985b7d3ff016a4e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 6): applications/Colossal-LLaMA/colossal_llama/dataset/dummy_dataset.py:9-14 | colossalai/legacy/moe/openmoe/train.py:61-66 | examples/language/data_utils.py:109-114 | examples/language/deepseek/data_utils.py:109-114 | examples/language/llama/data_utils.py:109-114 | examples/language/mixtral/data_utils.py:109-114 \u2014 before extracting anything, compare \u0060applications/Colossal-LLaMA/colossal_llama/dataset/dummy_dataset.py\u0060 and \u0060examples/language/data_utils.py\u0060 as WHOLE FILES: 82% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/colossal_llama/dataset/dummy_dataset.py"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc0db576ad0e0ced1ed93a94de21ded91d6d8a05adbe85f8f06736c35cb6f43c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): applications/Colossal-LLaMA/colossal_llama/utils/ckpt_io.py:29-33 | applications/ColossalChat/coati/models/utils.py:124-128 | applications/ColossalChat/coati/utils/ckpt_io.py:29-33 | applications/ColossalMoE/utils.py:26-30 \u2014 before extracting anything, compare \u0060applications/Colossal-LLaMA/colossal_llama/utils/ckpt_io.py\u0060 and \u0060applications/ColossalChat/coati/utils/ckpt_io.py\u0060 as WHOLE FILES: 89% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/colossal_llama/utils/ckpt_io.py"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"81ddf3eebc1d4078c53739be6c6c58b029c34b3d87a80b21bce4099aed2f0bb8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): applications/ColossalChat/coati/distributed/launch.py:29-33 | applications/ColossalChat/coati/distributed/launch_zero_bubble.py:24-28 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/distributed/launch.py\u0060 and \u0060applications/ColossalChat/coati/distributed/launch_zero_bubble.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/launch.py"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"f32d66bb1ff3834c4fad612285b6cd6b03cffead712c1ed125ddbeb2066da2ac"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): applications/ColossalChat/coati/distributed/reward/reward_utils.py:59-76 | applications/ColossalChat/coati/utils/reward_score/utils.py:59-76 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/distributed/reward/reward_utils.py\u0060 and \u0060applications/ColossalChat/coati/utils/reward_score/utils.py\u0060 as WHOLE FILES: 100% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/utils/reward_score/utils.py"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"533d9bcb11e21a534a11fbfc76a023e31cf56964c3c3cd985e7c9ddc9f90d10e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): applications/ColossalChat/coati/distributed/utils.py:124-140 | applications/ColossalChat/coati/models/utils.py:73-89 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/utils.py"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"93fc01f183e4cfeabb2ce19ac859a6d2f3604f0755ea9417c01f371647ce6f15"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): applications/ColossalChat/coati/ray/callbacks/performance_evaluator.py:24-29 | applications/ColossalChat/coati/trainer/callbacks/performance_evaluator.py:34-39 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/ray/callbacks/performance_evaluator.py"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"002c724d4bc562e0c7c193d5d12efc3eaf3638357cbc6ff705f62215448069af"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): applications/ColossalChat/coati/trainer/grpo.py:34-50 | applications/ColossalChat/coati/trainer/ppo.py:34-51 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/trainer/grpo.py\u0060 and \u0060applications/ColossalChat/coati/trainer/ppo.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 176 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/grpo.py"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"855f8a908a65599f88a92f3e16c97d134d2cef4c4a6f3baff1035f0f11995e8a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): applications/ColossalChat/coati/trainer/grpo.py:196-208 | applications/ColossalChat/coati/trainer/ppo.py:187-199 \u2014 before extracting anything, compare \u0060applications/ColossalChat/coati/trainer/grpo.py\u0060 and \u0060applications/ColossalChat/coati/trainer/ppo.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 176 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/grpo.py"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ef9dec451da83a5dfe4fecd7a7d50c593eb50f9f9817ac9c2138a0489175b79"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): applications/ColossalEval/colossal_eval/dataset/safetybench_en.py:115-122 | applications/ColossalEval/colossal_eval/dataset/safetybench_zh.py:115-122 \u2014 before extracting anything, compare \u0060applications/ColossalEval/colossal_eval/dataset/safetybench_en.py\u0060 and \u0060applications/ColossalEval/colossal_eval/dataset/safetybench_zh.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/dataset/safetybench_en.py"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd82bc011e321ca58035b4cb1e38326af099c613de643998e0351cb8de167340"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): colossalai/_analyzer/_subclasses/flop_tensor.py:277-287 | colossalai/fx/profiler/opcount.py:67-77 \u2014 before extracting anything, compare \u0060colossalai/_analyzer/_subclasses/flop_tensor.py\u0060 and \u0060colossalai/fx/profiler/opcount.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 153 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/_subclasses/flop_tensor.py"},"region":{"startLine":277}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3f2a6858dcf19ba33986c28afd4d27249e52cb3e7ef8c57feff80c4fa0239a8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): colossalai/_analyzer/_subclasses/flop_tensor.py:291-301 | colossalai/fx/profiler/opcount.py:81-91 \u2014 before extracting anything, compare \u0060colossalai/_analyzer/_subclasses/flop_tensor.py\u0060 and \u0060colossalai/fx/profiler/opcount.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 153 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/_subclasses/flop_tensor.py"},"region":{"startLine":291}}}],"partialFingerprints":{"codehealthFindingId/v1":"10e53826847edbead2d1fe5551b5116933d0787e803b37b3e3285df414096b70"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): colossalai/_analyzer/_subclasses/flop_tensor.py:310-326 | colossalai/fx/profiler/opcount.py:113-129 \u2014 before extracting anything, compare \u0060colossalai/_analyzer/_subclasses/flop_tensor.py\u0060 and \u0060colossalai/fx/profiler/opcount.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 153 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/_subclasses/flop_tensor.py"},"region":{"startLine":310}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8238d2efda6d4e4057792b2bceddfbc69888175119ca55e6dbed9f957d7b33b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): colossalai/_analyzer/_subclasses/flop_tensor.py:330-337 | colossalai/fx/profiler/opcount.py:133-140 \u2014 before extracting anything, compare \u0060colossalai/_analyzer/_subclasses/flop_tensor.py\u0060 and \u0060colossalai/fx/profiler/opcount.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 153 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/_subclasses/flop_tensor.py"},"region":{"startLine":330}}}],"partialFingerprints":{"codehealthFindingId/v1":"35c412f25f21d681d880462f72659dc6328db23ea0584c03a7e2ebb11471fad9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): colossalai/_analyzer/fx/tracer/proxy.py:91-95 | colossalai/fx/tracer/experimental.py:164-168 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/fx/tracer/proxy.py"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e243e6a2d6c942808ab265a9f49516fe5e7ff823407ad22e396af6fa944e2be"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): colossalai/auto_parallel/tensor_shard/node_handler/addmm_handler.py:65-70 | colossalai/auto_parallel/tensor_shard/node_handler/linear_handler.py:230-235 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/addmm_handler.py"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cddb5392a6fa5426fe4ca4522d54126c09905a55720dbcf6c13ad1bd93528d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): colossalai/auto_parallel/tensor_shard/node_handler/getattr_handler.py:30-34 | colossalai/auto_parallel/tensor_shard/node_handler/placeholder_handler.py:36-40 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/getattr_handler.py"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"f024c77da31cff8bdf8cb3d298623038b658e5e3fc06cd9f99a80a6e68c3d1c9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): colossalai/auto_parallel/tensor_shard/node_handler/strategy/batch_norm_generator.py:33-44 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py:25-36 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/normal_pooling_generator.py:24-35 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/batch_norm_generator.py"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f0743ce031b243879c0a17ab730dabc612c1a33942d651c05a6d41d4121d8b0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): colossalai/auto_parallel/tensor_shard/node_handler/strategy/batch_norm_generator.py:164-184 | colossalai/auto_parallel/tensor_shard/node_handler/strategy/layer_norm_generator.py:163-180 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/batch_norm_generator.py"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"23d1c8bb6ae9eaf42c130e61fee5e6d9c386eb2fa3e9153ca21d510078501eaa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): colossalai/booster/plugin/hybrid_parallel_plugin.py:224-228 | colossalai/booster/plugin/low_level_zero_plugin.py:103-107 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/plugin/hybrid_parallel_plugin.py"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9d906a77681f115c06d7b4d1dffceed14ac713b15fd7b1e9a0278c77bc9081d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): colossalai/fx/tracer/bias_addition_patch/patched_bias_addition_function/addbmm.py:11-16 | colossalai/fx/tracer/bias_addition_patch/patched_bias_addition_function/addmm.py:11-16 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/bias_addition_patch/patched_bias_addition_function/addbmm.py"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"20adb9d5ca84a88c0897d7cea58c70aa13bbeb0301db73816498bee6fb950836"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): colossalai/fx/tracer/bias_addition_patch/patched_bias_addition_function/bias_addition_function.py:93-101 | colossalai/fx/tracer/bias_addition_patch/patched_bias_addition_module/bias_addition_module.py:73-81 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/bias_addition_patch/patched_bias_addition_function/bias_addition_function.py"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ec1d59de5c7bbb05ff3ba857642f8f8eff54e2b8ee299abd82ce069c0974c91"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): colossalai/fx/tracer/experimental.py:253-258 | colossalai/fx/tracer/tracer.py:477-482 \u2014 before extracting anything, compare \u0060colossalai/fx/tracer/experimental.py\u0060 and \u0060colossalai/fx/tracer/tracer.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 138 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/experimental.py"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"43a757ad019eef35b11055f9c5d48f18057c9bfd793ff0ba5a117722aadafa9e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): colossalai/legacy/moe/openmoe/model/modeling_openmoe.py:244-252 | colossalai/legacy/moe/utils.py:94-102 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/legacy/moe/openmoe/model/modeling_openmoe.py:244\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/openmoe/model/modeling_openmoe.py"},"region":{"startLine":244}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc94e988e65117d4d853351808a3012e263a8643e7c17a74cb22af18e1c6ad42"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 10): colossalai/legacy/moe/openmoe/model/openmoe_policy.py:208-221 | colossalai/shardformer/policies/_mixtral_tf4.py:434-447 | colossalai/shardformer/policies/_mixtral_tf5.py:461-474 | colossalai/shardformer/policies/_qwen2_tf4.py:475-488 | colossalai/shardformer/policies/_qwen2_tf5.py:474-487 | colossalai/shardformer/policies/_qwen3_tf4.py:461-474 | colossalai/shardformer/policies/_qwen3_tf5.py:485-498 | colossalai/shardformer/policies/command.py:437-450 | colossalai/shardformer/policies/deepseek.py:447-460 | colossalai/shardformer/policies/mistral.py:421-434 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 10 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 10 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/openmoe/model/openmoe_policy.py"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"96a00c136b621bf400a1221a86ca97cf80e7740767f869dd9159f1f1448fad53"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): colossalai/legacy/nn/layer/parallel_1d/layers.py:378-382 | colossalai/legacy/nn/layer/parallel_2d/layers.py:1098-1102 | colossalai/legacy/nn/layer/parallel_2p5d/layers.py:1114-1118 | colossalai/legacy/nn/layer/vanilla/layers.py:266-272 \u2014 \u0060colossalai/legacy/nn/layer/parallel_1d/layers.py\u0060 and \u0060colossalai/legacy/nn/layer/parallel_2d/layers.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 6 separate duplicated blocks between them, totalling at least 56 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_1d/layers.py"},"region":{"startLine":378}}}],"partialFingerprints":{"codehealthFindingId/v1":"94b1551f5452c4d42f7ad4f00625d01d55619886bcb97afcee25b7ab501c869a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): colossalai/legacy/nn/layer/parallel_1d/layers.py:939-945 | colossalai/legacy/nn/layer/parallel_2d/layers.py:788-794 | colossalai/legacy/nn/layer/parallel_3d/layers.py:1064-1070 | colossalai/shardformer/layer/embedding.py:369-375 \u2014 \u0060colossalai/legacy/nn/layer/parallel_1d/layers.py\u0060 and \u0060colossalai/legacy/nn/layer/parallel_2d/layers.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 6 separate duplicated blocks between them, totalling at least 56 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_1d/layers.py"},"region":{"startLine":939}}}],"partialFingerprints":{"codehealthFindingId/v1":"698040cba4d0e412942709cc4ed3c276b59971098df1643399498d934faae533"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_2d/layers.py:472-477 | colossalai/legacy/nn/layer/parallel_2p5d/layers.py:485-490 \u2014 \u0060colossalai/legacy/nn/layer/parallel_2d/layers.py\u0060 and \u0060colossalai/legacy/nn/layer/parallel_2p5d/layers.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 18 separate duplicated blocks between them, totalling at least 219 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2d/layers.py"},"region":{"startLine":472}}}],"partialFingerprints":{"codehealthFindingId/v1":"71053a71a2f4d557d76298517c9398ab00a0ae22e3988359c25f9b8e601bfbd3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_sequence/layers.py:253-259 | examples/tutorial/sequence_parallel/model/layers/linear.py:52-58 \u2014 before extracting anything, compare \u0060colossalai/legacy/nn/layer/parallel_sequence/layers.py\u0060 and \u0060examples/tutorial/sequence_parallel/model/layers/linear.py\u0060 as WHOLE FILES: 88% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_sequence/layers.py"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8b93c445078764936695a89ed04e8819931ed22bbc0e8da9834251dd1159c27"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): colossalai/legacy/nn/parallel/data_parallel.py:15-20 | colossalai/legacy/zero/sharded_model/_utils.py:17-22 | colossalai/utils/common.py:58-63 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/parallel/data_parallel.py"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"96e4533b436dd786758b40055138b540d2aae11de0192c232d5c2778da1b271b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 6): colossalai/shardformer/layer/linear.py:147-151 | colossalai/shardformer/layer/linear.py:325-329 | colossalai/shardformer/layer/qkv_fused_linear.py:362-366 | colossalai/shardformer/layer/qkv_fused_linear.py:753-757 | colossalai/shardformer/layer/qkv_fused_linear.py:949-953 | colossalai/shardformer/layer/qkv_fused_linear.py:1330-1334 \u2014 before extracting anything, compare \u0060colossalai/shardformer/layer/linear.py\u0060 and \u0060colossalai/shardformer/layer/qkv_fused_linear.py\u0060 as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 261 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/linear.py"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"84d7cf81f0fbe545dd5be4b8882c81dc5ab5b1544f75a893010dd49da5de248b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): colossalai/shardformer/policies/_bert_tf4.py:405-416 | colossalai/shardformer/policies/_bert_tf5.py:412-423 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 475 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_bert_tf4.py"},"region":{"startLine":405}}}],"partialFingerprints":{"codehealthFindingId/v1":"ead4a67e7ea8af3860502eaa6b07bad121e85d0cdf4b3aff2d1f426e159e73b1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): colossalai/shardformer/policies/_bert_tf4.py:497-506 | colossalai/shardformer/policies/_bert_tf5.py:504-513 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 475 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_bert_tf4.py"},"region":{"startLine":497}}}],"partialFingerprints":{"codehealthFindingId/v1":"d06603eb397acbf612382b2e5682d767d2a8e61c520872ba7d1aeed12b290433"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 8): colossalai/shardformer/policies/_bert_tf4.py:535-541 | colossalai/shardformer/policies/_bert_tf4.py:574-581 | colossalai/shardformer/policies/_bert_tf4.py:614-621 | colossalai/shardformer/policies/_bert_tf4.py:741-748 | colossalai/shardformer/policies/_bert_tf5.py:542-548 | colossalai/shardformer/policies/_bert_tf5.py:581-588 | colossalai/shardformer/policies/_bert_tf5.py:621-628 | colossalai/shardformer/policies/_bert_tf5.py:748-755 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 475 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_bert_tf4.py"},"region":{"startLine":535}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f3a0b69012b6947bef8c5d9b5e7458aadb1e05358ba632b434ef2b5d2757240"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): colossalai/shardformer/policies/_bert_tf4.py:544-554 | colossalai/shardformer/policies/_bert_tf5.py:551-561 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 475 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_bert_tf4.py"},"region":{"startLine":544}}}],"partialFingerprints":{"codehealthFindingId/v1":"209c6a603411e20741842df504d86df7001428c6dc9aa49721b5565c85c11c46"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): colossalai/shardformer/policies/_bert_tf4.py:584-594 | colossalai/shardformer/policies/_bert_tf4.py:624-634 | colossalai/shardformer/policies/_bert_tf5.py:591-601 | colossalai/shardformer/policies/_bert_tf5.py:631-641 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 475 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_bert_tf4.py"},"region":{"startLine":584}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa09d80140576e0b30e41106c0cc2b4f08e792e1be88d1f45db90e5bc5ccc52d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 6): colossalai/shardformer/policies/_bert_tf4.py:666-674 | colossalai/shardformer/policies/_bert_tf4.py:710-718 | colossalai/shardformer/policies/_bert_tf4.py:784-792 | colossalai/shardformer/policies/_bert_tf5.py:673-681 | colossalai/shardformer/policies/_bert_tf5.py:717-725 | colossalai/shardformer/policies/_bert_tf5.py:791-799 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 475 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_bert_tf4.py"},"region":{"startLine":666}}}],"partialFingerprints":{"codehealthFindingId/v1":"828f0088aea95bf46c34431494331d70e72c2c60ff219808e8e59bd67a85764f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): colossalai/shardformer/policies/_bert_tf4.py:728-738 | colossalai/shardformer/policies/_bert_tf5.py:735-745 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 475 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_bert_tf4.py"},"region":{"startLine":728}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cb9de0cc08adee711a1401858825df5d46618697c48557c894c2ce6848b54aa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): colossalai/shardformer/policies/_bert_tf4.py:801-811 | colossalai/shardformer/policies/_bert_tf5.py:808-818 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 475 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_bert_tf4.py"},"region":{"startLine":801}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e7867832d73aa890fe951dea1952588ef3754fbee1fbcef13c28e6860692267"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): colossalai/shardformer/policies/_bert_tf4.py:814-821 | colossalai/shardformer/policies/_bert_tf5.py:821-828 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_bert_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_bert_tf5.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 475 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_bert_tf4.py"},"region":{"startLine":814}}}],"partialFingerprints":{"codehealthFindingId/v1":"772f7b3c9e2896fc343aa97a49a2aed13f08b072c3880f6ca7785d806aca4829"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): colossalai/shardformer/policies/_llama_tf4.py:371-379 | colossalai/shardformer/policies/_llama_tf5.py:369-377 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_llama_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_llama_tf5.py\u0060 as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 404 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_llama_tf4.py"},"region":{"startLine":371}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b6877d0d02c0f7c2598398c7a8cc1ffcbb88283e733e006756b394a833937a4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): colossalai/shardformer/policies/_llama_tf4.py:443-450 | colossalai/shardformer/policies/_llama_tf5.py:441-448 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_llama_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_llama_tf5.py\u0060 as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 404 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_llama_tf4.py"},"region":{"startLine":443}}}],"partialFingerprints":{"codehealthFindingId/v1":"07a41c8221e09077a4522306460be7189777e378b323cee272cff486dd7b6225"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): colossalai/shardformer/policies/_llama_tf4.py:527-534 | colossalai/shardformer/policies/_llama_tf5.py:525-532 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_llama_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_llama_tf5.py\u0060 as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 404 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_llama_tf4.py"},"region":{"startLine":527}}}],"partialFingerprints":{"codehealthFindingId/v1":"1601ca1d9a28e86693410e5471391f8035efbabb856f2624fee868422641351e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): colossalai/shardformer/policies/_mixtral_tf4.py:353-361 | colossalai/shardformer/policies/_mixtral_tf5.py:380-388 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_mixtral_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_mixtral_tf5.py\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 408 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_mixtral_tf4.py"},"region":{"startLine":353}}}],"partialFingerprints":{"codehealthFindingId/v1":"e90d1f39bfe43179946ba386e9992b979f185b5e4bbd48fd0e6f3a05fb024e68"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 2): colossalai/shardformer/policies/_mixtral_tf4.py:452-479 | colossalai/shardformer/policies/_mixtral_tf5.py:479-506 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_mixtral_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_mixtral_tf5.py\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 408 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_mixtral_tf4.py"},"region":{"startLine":452}}}],"partialFingerprints":{"codehealthFindingId/v1":"a584baa1552729cd8da664159eb20c63877e8938e471fd6ed2098e540bfd55f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): colossalai/shardformer/policies/_mixtral_tf4.py:482-487 | colossalai/shardformer/policies/_mixtral_tf5.py:509-514 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_mixtral_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_mixtral_tf5.py\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 408 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_mixtral_tf4.py"},"region":{"startLine":482}}}],"partialFingerprints":{"codehealthFindingId/v1":"9de939b46696dc3a6141bb457692ca4508e14b702449862194b9e917fdf4211b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): colossalai/shardformer/policies/_qwen2_tf4.py:383-390 | colossalai/shardformer/policies/_qwen2_tf5.py:382-389 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_qwen2_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_qwen2_tf5.py\u0060 as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 399 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_qwen2_tf4.py"},"region":{"startLine":383}}}],"partialFingerprints":{"codehealthFindingId/v1":"b922e2add8ae247e11cda79d8d53635ba923f53608a610a7e0a24120f9916119"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): colossalai/shardformer/policies/_qwen3_tf4.py:383-389 | colossalai/shardformer/policies/_qwen3_tf5.py:403-409 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_qwen3_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_qwen3_tf5.py\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 345 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_qwen3_tf4.py"},"region":{"startLine":383}}}],"partialFingerprints":{"codehealthFindingId/v1":"cda2d9b109298fca942bc9857cda376c5b24c3e05073f3ae0aba8dae8e97093d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): colossalai/shardformer/policies/_vit_tf4.py:300-306 | colossalai/shardformer/policies/_vit_tf5.py:150-156 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_vit_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_vit_tf5.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 133 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_vit_tf4.py"},"region":{"startLine":300}}}],"partialFingerprints":{"codehealthFindingId/v1":"79a9af80e92428cce7726528299eef297e7bc3b109374f12cadbea385d7869f5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): colossalai/shardformer/policies/_whisper_tf4.py:578-591 | colossalai/shardformer/policies/_whisper_tf5.py:565-578 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_whisper_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_whisper_tf5.py\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 483 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_whisper_tf4.py"},"region":{"startLine":578}}}],"partialFingerprints":{"codehealthFindingId/v1":"34e24aaaacb411d04f42045fcbb87b00b5f4753a6a88543bb9badb6896d6056b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): colossalai/shardformer/policies/_whisper_tf4.py:728-739 | colossalai/shardformer/policies/_whisper_tf5.py:715-726 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_whisper_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_whisper_tf5.py\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 483 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_whisper_tf4.py"},"region":{"startLine":728}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae1ed0da5572c95ebd2838eef110d816fc018a5f1a1c6cabb428e62c9b08515e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): colossalai/shardformer/policies/_whisper_tf4.py:752-763 | colossalai/shardformer/policies/_whisper_tf5.py:739-750 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_whisper_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_whisper_tf5.py\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 483 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. Note first that the copies are not typed on the same thing: \u0060WhisperForConditionalGeneration\u0060 names \u0060transformers\u0060 in one and \u0060transformers.models.whisper.modeling_whisper\u0060 in another \u2014 different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_whisper_tf4.py"},"region":{"startLine":752}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe9a7703ec1af935a199d3386e7eadb83377610f73ef7ccec5ada51aa9da35ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): colossalai/shardformer/policies/_whisper_tf4.py:817-827 | colossalai/shardformer/policies/_whisper_tf5.py:804-814 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/_whisper_tf4.py\u0060 and \u0060colossalai/shardformer/policies/_whisper_tf5.py\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 483 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_whisper_tf4.py"},"region":{"startLine":817}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d9605ad10c41a0a29ebff13f99776374b29d37f125dc01569e5521075c8c557"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): colossalai/shardformer/policies/bloom.py:417-427 | colossalai/shardformer/policies/falcon.py:364-374 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/bloom.py\u0060 and \u0060colossalai/shardformer/policies/falcon.py\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/bloom.py"},"region":{"startLine":417}}}],"partialFingerprints":{"codehealthFindingId/v1":"692add10eceff3559e5b313398d6b564d0bcd9c9132c94c34e61c73dd2852ae1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): extensions/pybind/cpu_adam/cpu_adam_x86.py:46-55 | extensions/pybind/softmax/scaled_masked_softmax_cuda.py:19-28 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"extensions/pybind/cpu_adam/cpu_adam_x86.py"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec5c348c57fff9a633ce786cb545bb1df46bbc8e2827e77333c3d8eba5fcae6b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): applications/Colossal-LLaMA/colossal_llama/dataset/conversation.py:67-74 | applications/ColossalEval/colossal_eval/utils/conversation.py:106-113 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/colossal_llama/dataset/conversation.py"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a386fd785ed56b8459d28c3bb29c426b34d359b6b9703cc63216f1cae504d8b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): applications/ColossalChat/coati/distributed/utils.py:59-71 | applications/ColossalChat/coati/models/utils.py:42-54 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/utils.py"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f6c431719a61a881c5d4ad34823d7a58049da43f4dacbcdc1f661ec8ad4f0a2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): colossalai/accelerator/cuda_accelerator.py:43-50 | colossalai/accelerator/npu_accelerator.py:49-56 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/accelerator/cuda_accelerator.py"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"b90e2b07ee23a852ccc6fafcdfffdf4d5d4160287df7e3afbfaead5f6c9072b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): colossalai/legacy/inference/async_manager.py:136-151 | colossalai/legacy/inference/manager.py:281-296 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/async_manager.py"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc8953b11fd47a1a565edb89f16039963107f4d1431059a437c561e3f59b6fa3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): colossalai/legacy/inference/hybridengine/polices/llama.py:32-39 | colossalai/legacy/inference/tensor_parallel/policies/llama.py:24-31 \u2014 before extracting anything, compare \u0060colossalai/legacy/inference/hybridengine/polices/llama.py\u0060 and \u0060colossalai/legacy/inference/tensor_parallel/policies/llama.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/hybridengine/polices/llama.py"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5740cc3138f9ed920155dd9f67b4a0c254edab5be90aefbaafb2fb078abd92b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): colossalai/legacy/inference/hybridengine/polices/llama.py:137-142 | colossalai/legacy/moe/openmoe/model/openmoe_policy.py:200-205 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/legacy/inference/hybridengine/polices/llama.py:132\u0060 calls \u0060postprocess\u0060, \u0060init_to_get_rotary\u0060 and \u0060colossalai/legacy/moe/openmoe/model/openmoe_policy.py:197\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/hybridengine/polices/llama.py"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bc2ef27d866cbf578a524960c1ab88c431ba66053b0b1e7ad1d28d25f7e777e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_2d/_operation.py:960-966 | colossalai/legacy/nn/layer/parallel_2p5d/_operation.py:1090-1096 \u2014 \u0060colossalai/legacy/nn/layer/parallel_2d/_operation.py\u0060 and \u0060colossalai/legacy/nn/layer/parallel_2p5d/_operation.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 16 separate duplicated blocks between them, totalling at least 185 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2d/_operation.py"},"region":{"startLine":960}}}],"partialFingerprints":{"codehealthFindingId/v1":"10d6321339ae81abb86b4bed75dcfc78b004ad4181777a35d8be4fcddc18f990"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): colossalai/legacy/nn/layer/parallel_2p5d/_operation.py:1058-1075 | colossalai/legacy/nn/layer/parallel_3d/_operation.py:528-545 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2p5d/_operation.py"},"region":{"startLine":1058}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfa3ff0c7923ad8aa693b1b77a408111acc97411448be8b8dce29a4977b458c6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): colossalai/legacy/nn/loss/loss_2d.py:43-57 | colossalai/legacy/nn/loss/loss_2p5d.py:43-54 \u2014 before extracting anything, compare \u0060colossalai/legacy/nn/loss/loss_2d.py\u0060 and \u0060colossalai/legacy/nn/loss/loss_2p5d.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/loss/loss_2d.py"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"c29a49178e325a0cb81500c37e73dfa0cf3f865d9f017e96627cd73152345d4b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): colossalai/legacy/nn/metric/accuracy_2d.py:16-29 | colossalai/legacy/nn/metric/accuracy_2p5d.py:16-29 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/metric/accuracy_2d.py"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d3640ef7091d38e305e2ac2b27c097c66462638953af969cc9dae180c4bb8ae"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): colossalai/shardformer/policies/gpt2.py:363-373 | colossalai/shardformer/policies/gptj.py:326-336 | colossalai/shardformer/policies/gptj.py:429-439 | colossalai/shardformer/policies/gptj.py:465-475 \u2014 before extracting anything, compare \u0060colossalai/shardformer/policies/gpt2.py\u0060 and \u0060colossalai/shardformer/policies/gptj.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/gpt2.py"},"region":{"startLine":363}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0ee8608ce467c7f5196740520291654495848c72667596db2f2d75e3437729c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): applications/ColossalEval/colossal_eval/models/chatglm.py:138-142 | applications/ColossalEval/colossal_eval/models/huggingface.py:175-179 \u2014 before extracting anything, compare \u0060applications/ColossalEval/colossal_eval/models/chatglm.py\u0060 and \u0060applications/ColossalEval/colossal_eval/models/huggingface.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/models/chatglm.py"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"891fb657fd91e1d1e7bb0f81f2d84c0171e7ae592441e24e9b9a30d1a67bd617"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): colossalai/booster/plugin/gemini_plugin.py:131-135 | colossalai/booster/plugin/torch_fsdp_plugin.py:154-158 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/plugin/gemini_plugin.py"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbae324ef44bcaff4c40a5081c5f40b44a877203a3ff3c31b7ffe4d8145efb25"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): colossalai/inference/kv_cache/kvcache_manager.py:96-100 | colossalai/inference/kv_cache/kvcache_manager.py:582-586 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/inference/kv_cache/kvcache_manager.py:96\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060colossalai/inference/kv_cache/kvcache_manager.py:101\u0060 calls \u0060_init_device_caches\u0060 and \u0060colossalai/inference/kv_cache/kvcache_manager.py:587\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/kv_cache/kvcache_manager.py"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbe1a9ec4df906125bb13114b8330df7e8445f0a0152f927a9975d4a099cc0bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): colossalai/inference/kv_cache/kvcache_manager.py:119-124 | colossalai/inference/kv_cache/kvcache_manager.py:571-576 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/kv_cache/kvcache_manager.py"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ea1ed15fb24233d824015ff77c02712e390aa18584d90958e8be7c016aff858"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): colossalai/legacy/moe/layer/experts.py:157-161 | colossalai/legacy/moe/layer/routers.py:157-161 \u2014 before extracting anything, compare \u0060colossalai/legacy/moe/layer/experts.py\u0060 and \u0060colossalai/legacy/moe/layer/routers.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 90 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/layer/experts.py"},"region":{"startLine":157}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbcd67900ef3f3e7e0e032f71b54e5caf5dddef7c0df4935f2ed41c6b2c42b61"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): colossalai/legacy/nn/parallel/data_parallel.py:24-30 | colossalai/utils/common.py:67-73 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/parallel/data_parallel.py"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"7600c5d9f195373a7435292a7d9a383b775226b48eadd39bd49699bac41a0b16"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): colossalai/legacy/pipeline/rpc/utils.py:153-157 | examples/language/gpt/experiments/pipeline_parallel/train_gpt_pp.py:26-30 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/legacy/pipeline/rpc/utils.py:151\u0060 calls \u0060add_argument\u0060 and \u0060examples/language/gpt/experiments/pipeline_parallel/train_gpt_pp.py:25\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/pipeline/rpc/utils.py"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"8afa1a3352579b272dcff961ed627b5f917caa04a0470eab18c53b35deee54e2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): colossalai/shardformer/layer/parallel_module.py:63-68 | colossalai/shardformer/layer/parallel_module.py:238-243 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/parallel_module.py"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"29d79867ffc6449dd83045b783c020b89584556f5c9bc317555b0f16ffb7776e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): colossalai/shardformer/modeling/_whisper_tf5.py:197-201 | colossalai/shardformer/modeling/_whisper_tf5.py:238-242 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/modeling/_whisper_tf5.py:197\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_whisper_tf5.py"},"region":{"startLine":197}}}],"partialFingerprints":{"codehealthFindingId/v1":"7eb3a2f7e739bc4ec3cae1ffac7964c2ba622f57b3d5d0dd161651dfb897c727"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): colossalai/shardformer/modeling/bloom.py:1100-1104 | colossalai/shardformer/modeling/falcon.py:747-751 \u2014 before extracting anything, compare \u0060colossalai/shardformer/modeling/bloom.py\u0060 and \u0060colossalai/shardformer/modeling/falcon.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 594 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/bloom.py"},"region":{"startLine":1100}}}],"partialFingerprints":{"codehealthFindingId/v1":"81aba14b29affc5f75665f1de959cf72147673d60b26e35e02abefe424731e89"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): colossalai/utils/safetensors.py:174-178 | colossalai/utils/safetensors.py:197-201 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/utils/safetensors.py"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"e71cc8da30388fb6ccca9f221a93a3f132c64dd3d3e2b2dba98e0ff30a3dade9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): colossalai/utils/tensor_detector/tensor_detector.py:40-45 | colossalai/utils/tensor_detector/tensor_detector.py:96-101 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/utils/tensor_detector/tensor_detector.py"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"b45670d6e1a530e3ebe30d3ed6a4abea24ebf65d23bee58a788cdf7b88803100"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (4 members, 108 shared lines): examples/images/dreambooth/train_dreambooth.py:48-237 | examples/images/dreambooth/train_dreambooth_colossalai.py:54-261 | examples/images/dreambooth/train_dreambooth_colossalai_lora.py:57-263 | examples/images/dreambooth/train_dreambooth_inpaint.py:78-252 \u2014 These 4 members are variants of one another: a block of 108 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/dreambooth/train_dreambooth.py"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"9cd68a311f3edae9835300849838ddbdf594da4a9aad3049cf7f1c5cda4252c4"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (4 members, 44 shared lines): examples/images/dreambooth/train_dreambooth.py:347-702 | examples/images/dreambooth/train_dreambooth_colossalai.py:374-697 | examples/images/dreambooth/train_dreambooth_colossalai_lora.py:373-717 | examples/images/dreambooth/train_dreambooth_inpaint.py:366-738 \u2014 These 4 members are variants of one another: a block of 44 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/dreambooth/train_dreambooth.py"},"region":{"startLine":347}}}],"partialFingerprints":{"codehealthFindingId/v1":"60f750d3a4551754f6692b83b29d1c48b2c9d33623a33a614d0322bd0e621024"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (4 members, 13 shared lines): examples/images/dreambooth/train_dreambooth.py:292-316 | examples/images/dreambooth/train_dreambooth_colossalai.py:319-343 | examples/images/dreambooth/train_dreambooth_colossalai_lora.py:318-342 | examples/images/dreambooth/train_dreambooth_inpaint.py:307-335 \u2014 These 4 members are variants of one another: a block of 13 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/dreambooth/train_dreambooth.py"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ab2578dd20721124bcb6b7fc5444e5a462e3e7cc11718d6c9541599573660f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (3 members, 14 shared lines): examples/images/resnet/train.py:55-70 | examples/tutorial/new_api/cifar_resnet/train.py:55-70 | examples/tutorial/new_api/cifar_vit/train.py:75-90 \u2014 These 3 members are variants of one another: a block of 14 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/resnet/train.py"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"b01fd843ec8bf28922d4456bff8ed60a1774d0c42f56c7bc0687a5fd08e19fa5"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (135 shared lines): applications/ColossalEval/examples/dataset_evaluation/inference.py:88-264 | applications/ColossalEval/examples/gpt_evaluation/inference.py:84-247 \u2014 These two members are variants of one another: 135 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/examples/dataset_evaluation/inference.py"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"e737e6e29a6fa05fc2c6170c597f9509f10e03c37302f51b4d3f321a276f93bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (109 shared lines): examples/language/bert/finetune.py:175-332 | examples/language/gpt/hybridparallelism/finetune.py:174-324 \u2014 These two members are variants of one another: 109 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/language/bert/finetune.py"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"74c2af57ed0b16d5beafc2862a5d80328f09f898d7a291fd257bfdfc2be94752"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (79 shared lines): examples/images/resnet/train.py:104-203 | examples/tutorial/new_api/cifar_vit/train.py:124-223 \u2014 These two members are variants of one another: 79 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/resnet/train.py"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec2012b4d42d204867a647c38cbbadf110f1ac7b061340cd2828e90ce9c34ddf"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (27 corresponding lines): examples/community/roberta/pretraining/model/bert.py:1739-1776 | examples/community/roberta/pretraining/model/deberta_v2.py:1396-1429 \u2014 These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/community/roberta/pretraining/model/bert.py"},"region":{"startLine":1739}}}],"partialFingerprints":{"codehealthFindingId/v1":"dba92f9859163b9e92d99a9ec2a75280d365a2b6a29e697833806e56506ade6b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (29 corresponding lines): examples/community/roberta/pretraining/model/bert.py:1333-1373 | examples/community/roberta/pretraining/model/deberta_v2.py:1145-1182 \u2014 These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/community/roberta/pretraining/model/bert.py"},"region":{"startLine":1333}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d4edadb186f1382552240940a998771667ac7281253c7bfdcefe675c418aafc"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (8 members, 50\u002B identical tokens): applications/ColossalChat/examples/training_scripts/train_dpo.py:26-301 | applications/ColossalChat/examples/training_scripts/train_grpo.py:42-424 | applications/ColossalChat/examples/training_scripts/train_kto.py:26-322 | applications/ColossalChat/examples/training_scripts/train_orpo.py:26-284 | applications/ColossalChat/examples/training_scripts/train_ppo.py:51-497 | applications/ColossalChat/examples/training_scripts/train_rm.py:28-295 | applications/ColossalChat/examples/training_scripts/train_sft.py:27-301 | examples/language/gpt/hybridparallelism/benchmark.py:39-231 \u2014 These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/examples/training_scripts/train_dpo.py"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f929a91f535fa335088ba1d3795662ec5330fec97ed976d06bd5b1ba8232c32"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (8 members, 50\u002B identical tokens): colossalai/shardformer/examples/data.py:96-104 | colossalai/shardformer/examples/data.py:107-115 | examples/language/bert/data.py:92-98 | examples/language/bert/data.py:101-107 | examples/language/gpt/hybridparallelism/data.py:93-99 | examples/language/gpt/hybridparallelism/data.py:102-108 | examples/tutorial/new_api/glue_bert/data.py:91-97 | examples/tutorial/new_api/glue_bert/data.py:100-106 \u2014 These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/examples/data.py"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"842f7e2872a052d16c8d6184c41c372d088314e92aa74d9dfea55aae3e9a93ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): examples/language/deepseek/performance_evaluator.py:40-85 | examples/language/gpt/gemini/commons/performance_evaluator.py:40-85 | examples/language/llama/performance_evaluator.py:40-85 | examples/language/mixtral/performance_evaluator.py:40-85 | examples/language/performance_evaluator.py:40-85 \u2014 These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/language/deepseek/performance_evaluator.py"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"32d3aa61060aa4ff09c8ab9671e18536428bd2a583abdca40ad368381e78abef"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): examples/language/deepseek/performance_evaluator.py:127-140 | examples/language/gpt/gemini/commons/performance_evaluator.py:127-140 | examples/language/llama/performance_evaluator.py:127-140 | examples/language/mixtral/performance_evaluator.py:127-140 | examples/language/performance_evaluator.py:127-140 \u2014 These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/language/deepseek/performance_evaluator.py"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e71c64cff779a89e42777237ac5fcb3c8266993b66fb5b94876eab3de3e7d54"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): examples/language/deepseek/performance_evaluator.py:150-164 | examples/language/gpt/gemini/commons/performance_evaluator.py:150-164 | examples/language/llama/performance_evaluator.py:150-164 | examples/language/mixtral/performance_evaluator.py:150-164 | examples/language/performance_evaluator.py:150-164 \u2014 These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/language/deepseek/performance_evaluator.py"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4ab563e11bbbfcf231dede41d87dbb140f2afbc9d4e63550a01edf91c10d6c5"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): examples/language/deepseek/performance_evaluator.py:167-178 | examples/language/gpt/gemini/commons/performance_evaluator.py:167-178 | examples/language/llama/performance_evaluator.py:167-178 | examples/language/mixtral/performance_evaluator.py:167-178 | examples/language/performance_evaluator.py:167-178 \u2014 These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/language/deepseek/performance_evaluator.py"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"52df407cc3d7444422356959b36c747246f5b197e6cb25d9182122cabfa24559"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): colossalai/shardformer/examples/convergence_benchmark.py:132-164 | examples/language/bert/finetune.py:55-125 | examples/language/gpt/hybridparallelism/finetune.py:52-121 | examples/tutorial/new_api/glue_bert/finetune.py:44-78 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/examples/convergence_benchmark.py"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"df49a7bd397cca411b47835637961310f2e8d84ed319c60afd310ee2fdb6b88f"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): colossalai/shardformer/examples/data.py:55-66 | examples/language/bert/data.py:54-65 | examples/language/gpt/hybridparallelism/data.py:54-67 | examples/tutorial/new_api/glue_bert/data.py:54-65 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/examples/data.py"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c8fe3adec4b4fc492dc6e392b8c52600303c19f12900981a66c3cf0ea3c9c7a"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): colossalai/shardformer/examples/data.py:69-80 | examples/language/bert/data.py:68-79 | examples/language/gpt/hybridparallelism/data.py:70-81 | examples/tutorial/new_api/glue_bert/data.py:68-79 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/examples/data.py"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3062d1860d4a8a4d4ade4aae2545cb300f0b9fcaffa62361e9e7fb50dc8b93b"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): colossalai/shardformer/examples/data.py:119-132 | examples/language/bert/data.py:111-124 | examples/language/gpt/hybridparallelism/data.py:112-125 | examples/tutorial/new_api/glue_bert/data.py:110-123 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/examples/data.py"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"80671989951a8f50ea5b858805f30878f3b4668d2934b05b5209b5ed39656316"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): examples/images/dreambooth/train_dreambooth.py:256-286 | examples/images/dreambooth/train_dreambooth_colossalai.py:281-313 | examples/images/dreambooth/train_dreambooth_colossalai_lora.py:282-312 | examples/images/dreambooth/train_dreambooth_inpaint.py:271-301 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/dreambooth/train_dreambooth.py"},"region":{"startLine":256}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ac069097679aef15d48f699816cfa195fb888fe73895ab6b1112b58cd9ee087"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): examples/images/vit/vit_benchmark.py:46-147 | examples/images/vit/vit_train_demo.py:137-238 | examples/language/opt/opt_benchmark.py:49-134 | examples/language/opt/opt_train_demo.py:68-161 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/vit/vit_benchmark.py"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ca18257f070a78cfce2deed9fb15c3d0842a5d66f923a1a4aad056c24c03d4d"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): examples/language/deepseek/benchmark.py:79-299 | examples/language/gpt/hybridparallelism/benchmark.py:39-231 | examples/language/llama/benchmark.py:66-395 | examples/language/mixtral/benchmark.py:59-287 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/language/deepseek/benchmark.py"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e0fe2683145b68af29463f4da53bcb1d0dbc96eca64c240e6f85d033071bde3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (102 lines \u00D7 2): examples/images/dreambooth/train_dreambooth_colossalai.py:382-483 | examples/images/dreambooth/train_dreambooth_colossalai_lora.py:381-482 \u2014 before extracting anything, compare \u0060examples/images/dreambooth/train_dreambooth_colossalai.py\u0060 and \u0060examples/images/dreambooth/train_dreambooth_colossalai_lora.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 757 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/dreambooth/train_dreambooth_colossalai.py"},"region":{"startLine":382}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f28f0e1a5217766bfe3dbf62568915d00cb96329fc43ace83c502152272d47a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (74\u201375 lines \u00D7 2): applications/ColossalEval/examples/dataset_evaluation/inference.py:120-194 | applications/ColossalEval/examples/gpt_evaluation/inference.py:111-184 \u2014 \u0060applications/ColossalEval/examples/dataset_evaluation/inference.py\u0060 and \u0060applications/ColossalEval/examples/gpt_evaluation/inference.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 8 separate duplicated blocks between them, totalling at least 194 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalEval/examples/dataset_evaluation/inference.py:120\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/examples/dataset_evaluation/inference.py"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cadcf62523aae14e1df8b1ea508bbaafe9c9681d1b50c625d9371f73bebe929"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (60\u201361 lines \u00D7 2): examples/language/bert/finetune.py:62-122 | examples/language/gpt/hybridparallelism/finetune.py:59-118 \u2014 before extracting anything, compare \u0060examples/language/bert/finetune.py\u0060 and \u0060examples/language/gpt/hybridparallelism/finetune.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 242 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/language/bert/finetune.py"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"d73eaf3afa65ca2f818deacca3e622260e4ccf5442475533ffec0bd0427d5b6b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (59 lines \u00D7 2): examples/images/dreambooth/train_dreambooth_colossalai.py:56-114 | examples/images/dreambooth/train_dreambooth_colossalai_lora.py:59-117 \u2014 before extracting anything, compare \u0060examples/images/dreambooth/train_dreambooth_colossalai.py\u0060 and \u0060examples/images/dreambooth/train_dreambooth_colossalai_lora.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 757 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/images/dreambooth/train_dreambooth_colossalai.py:56\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/dreambooth/train_dreambooth_colossalai.py"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f87521bd6e507c83b59a655fe7733097d298c0ea132fd644e4d944735597153"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (59 lines \u00D7 2): examples/language/bert/finetune.py:274-332 | examples/language/gpt/hybridparallelism/finetune.py:266-324 \u2014 before extracting anything, compare \u0060examples/language/bert/finetune.py\u0060 and \u0060examples/language/gpt/hybridparallelism/finetune.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 242 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/language/bert/finetune.py"},"region":{"startLine":274}}}],"partialFingerprints":{"codehealthFindingId/v1":"07593bfeda1958b955c797d19d43a25dbce1964b1aff9592bd356705a6db8ff6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (58 lines \u00D7 2): examples/images/dreambooth/train_dreambooth.py:535-592 | examples/images/dreambooth/train_dreambooth_inpaint.py:565-622 \u2014 before extracting anything, compare \u0060examples/images/dreambooth/train_dreambooth.py\u0060 and \u0060examples/images/dreambooth/train_dreambooth_inpaint.py\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 499 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/images/dreambooth/train_dreambooth.py:535\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/dreambooth/train_dreambooth.py"},"region":{"startLine":535}}}],"partialFingerprints":{"codehealthFindingId/v1":"f349dc235ff81829990989f11371ec12f9df22a40443b4eb4e1b28a87fb8d9e7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (56 lines \u00D7 2): examples/tutorial/sequence_parallel/data/datasets/builder.py:121-176 | examples/tutorial/sequence_parallel/data/datasets/dataset_utils.py:406-461 \u2014 before extracting anything, compare \u0060examples/tutorial/sequence_parallel/data/datasets/builder.py\u0060 and \u0060examples/tutorial/sequence_parallel/data/datasets/dataset_utils.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 111 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/tutorial/sequence_parallel/data/datasets/builder.py"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f43ad47a22456a6a2d92f95fd38a303fd56032775fcdb46ce84758bc3666ae7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (53 lines \u00D7 2): examples/images/dreambooth/train_dreambooth_colossalai.py:546-598 | examples/images/dreambooth/train_dreambooth_colossalai_lora.py:566-618 \u2014 before extracting anything, compare \u0060examples/images/dreambooth/train_dreambooth_colossalai.py\u0060 and \u0060examples/images/dreambooth/train_dreambooth_colossalai_lora.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 757 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/images/dreambooth/train_dreambooth_colossalai.py:546\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/dreambooth/train_dreambooth_colossalai.py"},"region":{"startLine":546}}}],"partialFingerprints":{"codehealthFindingId/v1":"37b82b60ab47ca7ac951c4592ec54774b6ffbc13bf56551cdf316732fe2bb487"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (49\u201351 lines \u00D7 2): examples/images/dreambooth/train_dreambooth.py:457-507 | examples/images/dreambooth/train_dreambooth_inpaint.py:461-509 \u2014 before extracting anything, compare \u0060examples/images/dreambooth/train_dreambooth.py\u0060 and \u0060examples/images/dreambooth/train_dreambooth_inpaint.py\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 499 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/images/dreambooth/train_dreambooth.py:457\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/dreambooth/train_dreambooth.py"},"region":{"startLine":457}}}],"partialFingerprints":{"codehealthFindingId/v1":"7498d0ea819da28c87d91ece6f26573a9ca26b6a91b32cf007b8b041991057b6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (47 lines \u00D7 2): applications/ColossalChat/examples/training_scripts/train_grpo.py:106-152 | applications/ColossalChat/examples/training_scripts/train_ppo.py:128-174 \u2014 before extracting anything, compare \u0060applications/ColossalChat/examples/training_scripts/train_grpo.py\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_ppo.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 469 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060applications/ColossalChat/examples/training_scripts/train_ppo.py:127\u0060 calls \u0060gradient_checkpointing_enable\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_grpo.py:105\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/examples/training_scripts/train_grpo.py"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0b9c9498d0ff76aaa21685b7e8ffa492c6d26607e11233771a63fa7a5d70105"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (46 lines \u00D7 5): examples/language/deepseek/performance_evaluator.py:40-85 | examples/language/gpt/gemini/commons/performance_evaluator.py:40-85 | examples/language/llama/performance_evaluator.py:40-85 | examples/language/mixtral/performance_evaluator.py:40-85 | examples/language/performance_evaluator.py:40-85 \u2014 before extracting anything, compare \u0060examples/language/deepseek/performance_evaluator.py\u0060 and \u0060examples/language/gpt/gemini/commons/performance_evaluator.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 96 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/language/deepseek/performance_evaluator.py"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"5bc0afc64ed59b57987dd5704d38175da54dd8fb740fba7e4b002bb56e14276c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (45 lines \u00D7 3): examples/images/dreambooth/train_dreambooth.py:193-237 | examples/images/dreambooth/train_dreambooth_colossalai.py:217-261 | examples/images/dreambooth/train_dreambooth_colossalai_lora.py:219-263 \u2014 before extracting anything, compare \u0060examples/images/dreambooth/train_dreambooth.py\u0060 and \u0060examples/images/dreambooth/train_dreambooth_colossalai.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 401 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/images/dreambooth/train_dreambooth.py:193\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/dreambooth/train_dreambooth.py"},"region":{"startLine":193}}}],"partialFingerprints":{"codehealthFindingId/v1":"5580ffeb96c53240354416b190a0144b656f1240a850c290a516fd6397473e62"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (41\u201345 lines \u00D7 2): applications/ColossalChat/examples/training_scripts/train_grpo.py:304-344 | applications/ColossalChat/examples/training_scripts/train_ppo.py:349-393 \u2014 before extracting anything, compare \u0060applications/ColossalChat/examples/training_scripts/train_grpo.py\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_ppo.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 469 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/examples/training_scripts/train_ppo.py:349\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060applications/ColossalChat/examples/training_scripts/train_ppo.py:348\u0060 calls \u0060eval\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_grpo.py:303\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/examples/training_scripts/train_grpo.py"},"region":{"startLine":304}}}],"partialFingerprints":{"codehealthFindingId/v1":"008c49dee65e421a93e1192d4776ce9360a0cdb801c27f98cf48aa16b60af9f8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (41\u201342 lines \u00D7 4): examples/images/dreambooth/train_dreambooth.py:88-128 | examples/images/dreambooth/train_dreambooth_colossalai.py:101-142 | examples/images/dreambooth/train_dreambooth_colossalai_lora.py:104-145 | examples/images/dreambooth/train_dreambooth_inpaint.py:110-150 \u2014 before extracting anything, compare \u0060examples/images/dreambooth/train_dreambooth.py\u0060 and \u0060examples/images/dreambooth/train_dreambooth_colossalai.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 401 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/images/dreambooth/train_dreambooth.py:88\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/dreambooth/train_dreambooth.py"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd99651d1ec7af176452227b282c43a4aef7cad1ad723cf377c2337df3d6eca3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (42 lines \u00D7 2): examples/images/dreambooth/train_dreambooth_colossalai.py:144-185 | examples/images/dreambooth/train_dreambooth_colossalai_lora.py:147-188 \u2014 before extracting anything, compare \u0060examples/images/dreambooth/train_dreambooth_colossalai.py\u0060 and \u0060examples/images/dreambooth/train_dreambooth_colossalai_lora.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 757 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/images/dreambooth/train_dreambooth_colossalai.py:144\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/dreambooth/train_dreambooth_colossalai.py"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"755dd12afd64ed99c39b19dc7c5cc423b1a7e43abdc9ff79305a72982669e2eb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (41 lines \u00D7 4): examples/language/data_utils.py:51-91 | examples/language/deepseek/data_utils.py:51-91 | examples/language/llama/data_utils.py:51-91 | examples/language/mixtral/data_utils.py:51-91 \u2014 before extracting anything, compare \u0060examples/language/data_utils.py\u0060 and \u0060examples/language/deepseek/data_utils.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/language/data_utils.py:51\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/language/data_utils.py"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7b6e917609980c5a32f1a7f63b55900e4e5060efc1d1c00d0279847f00b1dfd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (40 lines \u00D7 2): examples/language/gpt/titans/model/embed.py:126-165 | examples/language/gpt/titans/model/embed.py:471-510 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/language/gpt/titans/model/embed.py"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"67ec0817eb927bb8b801d9be26005373bf31095fd8e313c7dd4f57c47d0de3e1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (38\u201339 lines \u00D7 3): examples/images/dreambooth/train_dreambooth.py:48-86 | examples/images/dreambooth/train_dreambooth_colossalai.py:54-91 | examples/images/dreambooth/train_dreambooth_colossalai_lora.py:57-94 \u2014 before extracting anything, compare \u0060examples/images/dreambooth/train_dreambooth.py\u0060 and \u0060examples/images/dreambooth/train_dreambooth_colossalai.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 401 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/images/dreambooth/train_dreambooth.py:48\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/dreambooth/train_dreambooth.py"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"30daf9596ab273ac013e5d22118a7a4585d7b37ee226daefb6a81e0feb3c3aeb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (32\u201339 lines \u00D7 2): applications/ColossalChat/examples/training_scripts/train_grpo.py:149-180 | applications/ColossalChat/examples/training_scripts/train_ppo.py:180-218 \u2014 before extracting anything, compare \u0060applications/ColossalChat/examples/training_scripts/train_grpo.py\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_ppo.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 469 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/examples/training_scripts/train_grpo.py:149\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/examples/training_scripts/train_grpo.py"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cb0989ac2d80c047ed59a27dd9e7bc15bf6c22f4bebaec64a02c98c07ca6790"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (34 lines \u00D7 3): examples/images/dreambooth/train_dreambooth.py:505-538 | examples/images/dreambooth/train_dreambooth_colossalai.py:527-560 | examples/images/dreambooth/train_dreambooth_colossalai_lora.py:547-580 \u2014 before extracting anything, compare \u0060examples/images/dreambooth/train_dreambooth.py\u0060 and \u0060examples/images/dreambooth/train_dreambooth_colossalai.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 401 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/images/dreambooth/train_dreambooth.py:505\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/dreambooth/train_dreambooth.py"},"region":{"startLine":505}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb9579ac1866e677aa247c58bd448a7b6f9232e1f7b5cc5bb21a0f4fd55256a8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (33\u201334 lines \u00D7 2): applications/ColossalChat/examples/training_scripts/train_grpo.py:242-275 | applications/ColossalChat/examples/training_scripts/train_ppo.py:279-311 \u2014 before extracting anything, compare \u0060applications/ColossalChat/examples/training_scripts/train_grpo.py\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_ppo.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 469 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/examples/training_scripts/train_grpo.py"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"4464634beea5f42f92bd21ba0f328d761e8f466a4a44cfa84eeb932125b883c5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (2\u201333 lines \u00D7 7): examples/images/dreambooth/train_dreambooth.py:149-181 | examples/images/dreambooth/train_dreambooth_colossalai.py:168-199 | examples/images/dreambooth/train_dreambooth_colossalai_lora.py:171-202 | examples/images/dreambooth/train_dreambooth_inpaint.py:170-202 | examples/language/deepseek/benchmark.py:98-99 | examples/language/llama/benchmark.py:85-86 | examples/language/mixtral/benchmark.py:78-79 \u2014 before extracting anything, compare \u0060examples/images/dreambooth/train_dreambooth.py\u0060 and \u0060examples/images/dreambooth/train_dreambooth_colossalai.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 401 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/images/dreambooth/train_dreambooth.py:149\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060examples/images/dreambooth/train_dreambooth_colossalai.py:167\u0060 calls \u0060add_argument\u0060 and \u0060examples/images/dreambooth/train_dreambooth.py:149\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/dreambooth/train_dreambooth.py"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a22a57b11368af18178dc71cabf0cdc58260db32272b175a6fa665e3b21067c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (33 lines \u00D7 3): applications/ColossalChat/examples/training_scripts/train_dpo.py:165-197 | applications/ColossalChat/examples/training_scripts/train_orpo.py:154-186 | applications/ColossalChat/examples/training_scripts/train_rm.py:164-196 \u2014 before extracting anything, compare \u0060applications/ColossalChat/examples/training_scripts/train_dpo.py\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_orpo.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 293 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/examples/training_scripts/train_dpo.py:165\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060applications/ColossalChat/examples/training_scripts/train_rm.py:199\u0060 calls \u0060ceil\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_dpo.py:200\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/examples/training_scripts/train_dpo.py"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"f87a3b0409a64ee9c7542b4b4ff7baa8d67f876a661b9c8606816f9adaf472ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (33 lines \u00D7 3): examples/images/resnet/train.py:115-147 | examples/tutorial/new_api/cifar_resnet/train.py:115-147 | examples/tutorial/new_api/cifar_vit/train.py:135-167 \u2014 before extracting anything, compare \u0060examples/images/resnet/train.py\u0060 and \u0060examples/tutorial/new_api/cifar_resnet/train.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 158 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/resnet/train.py"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"415f02176773cf6d88de0d0ee8f764d5b054507329ed2346c364e9108104a112"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (33 lines \u00D7 2): applications/ColossalChat/examples/inference/chatio.py:72-104 | applications/ColossalChat/examples/inference/chatio.py:131-163 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/examples/inference/chatio.py"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f8dcf8083e135aa0d70c871c3f763e4ee01c0c6aaa0008150b5996711757a14"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (33 lines \u00D7 2): examples/images/resnet/train.py:152-184 | examples/tutorial/new_api/cifar_resnet/train.py:152-184 \u2014 before extracting anything, compare \u0060examples/images/resnet/train.py\u0060 and \u0060examples/tutorial/new_api/cifar_resnet/train.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 158 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/resnet/train.py"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f6bbc54556ea7c54da417c5ba01342f4a63cdc19af55ea9f8fa474a1313b880"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (32 lines \u00D7 2): applications/ColossalEval/examples/dataset_evaluation/inference.py:28-59 | applications/ColossalEval/examples/gpt_evaluation/inference.py:25-56 \u2014 \u0060applications/ColossalEval/examples/dataset_evaluation/inference.py\u0060 and \u0060applications/ColossalEval/examples/gpt_evaluation/inference.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 8 separate duplicated blocks between them, totalling at least 194 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/examples/dataset_evaluation/inference.py"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d16cfdb6247a58a7029e2e9058b97e76e1beaa49c52887b15758146ff4b0b9e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25\u201330 lines \u00D7 4): applications/ColossalChat/examples/training_scripts/train_grpo.py:163-192 | applications/ColossalChat/examples/training_scripts/train_kto.py:44-68 | applications/ColossalChat/examples/training_scripts/train_orpo.py:44-68 | applications/ColossalChat/examples/training_scripts/train_ppo.py:201-230 \u2014 before extracting anything, compare \u0060applications/ColossalChat/examples/training_scripts/train_grpo.py\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_kto.py\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 162 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/examples/training_scripts/train_grpo.py:163\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/examples/training_scripts/train_grpo.py"},"region":{"startLine":163}}}],"partialFingerprints":{"codehealthFindingId/v1":"4617fe32bf77f67d629cfd40442a37329f5e1207ec3643dd387dfbf3ac774340"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30 lines \u00D7 2): applications/ColossalChat/examples/training_scripts/train_grpo.py:50-79 | applications/ColossalChat/examples/training_scripts/train_ppo.py:59-88 \u2014 before extracting anything, compare \u0060applications/ColossalChat/examples/training_scripts/train_grpo.py\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_ppo.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 469 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/examples/training_scripts/train_grpo.py"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e54bc59360ddd6c8f5185e24eec4e978de2af037c182c5ae46c67c5a12a0f45"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29 lines \u00D7 2): examples/images/dreambooth/train_dreambooth.py:347-375 | examples/images/dreambooth/train_dreambooth_inpaint.py:367-395 \u2014 before extracting anything, compare \u0060examples/images/dreambooth/train_dreambooth.py\u0060 and \u0060examples/images/dreambooth/train_dreambooth_inpaint.py\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 499 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/dreambooth/train_dreambooth.py"},"region":{"startLine":347}}}],"partialFingerprints":{"codehealthFindingId/v1":"da8922ca7c54cb8f622e417340c21f42059f606d243b3e0d34c6d304450663b1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 2): examples/images/dreambooth/train_dreambooth.py:398-425 | examples/images/dreambooth/train_dreambooth_inpaint.py:424-451 \u2014 before extracting anything, compare \u0060examples/images/dreambooth/train_dreambooth.py\u0060 and \u0060examples/images/dreambooth/train_dreambooth_inpaint.py\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 499 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/dreambooth/train_dreambooth.py"},"region":{"startLine":398}}}],"partialFingerprints":{"codehealthFindingId/v1":"5508472c0a02801d3adf8d9836aca9193ab53d42e030d0c6af158a2ad3174c8f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25\u201327 lines \u00D7 2): applications/ColossalEval/examples/dataset_evaluation/inference.py:90-116 | applications/ColossalEval/examples/gpt_evaluation/inference.py:85-109 \u2014 \u0060applications/ColossalEval/examples/dataset_evaluation/inference.py\u0060 and \u0060applications/ColossalEval/examples/gpt_evaluation/inference.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 8 separate duplicated blocks between them, totalling at least 194 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalEval/examples/dataset_evaluation/inference.py:90\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060applications/ColossalEval/examples/dataset_evaluation/inference.py:89\u0060 calls \u0060get_accelerator\u0060 and \u0060applications/ColossalEval/examples/gpt_evaluation/inference.py:84\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/examples/dataset_evaluation/inference.py"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"44d4715cb83d7716a89ab94a4c2c1cfccebfbe3fad88daa1a55bd1ef4260253f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26 lines \u00D7 3): examples/language/bert/benchmark.py:125-150 | examples/language/bert/finetune.py:273-298 | examples/language/gpt/hybridparallelism/finetune.py:265-290 \u2014 before extracting anything, compare \u0060examples/language/bert/finetune.py\u0060 and \u0060examples/language/gpt/hybridparallelism/finetune.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 242 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/language/bert/benchmark.py:125\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/language/bert/benchmark.py"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"9fd5ea06ca27acbc7462bc4ad799a3f4f669c4e48cfabdadf659e63244e4d398"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26 lines \u00D7 3): examples/language/deepseek/benchmark.py:233-258 | examples/language/llama/benchmark.py:330-355 | examples/language/mixtral/benchmark.py:222-247 \u2014 \u0060examples/language/deepseek/benchmark.py\u0060 and \u0060examples/language/llama/benchmark.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 10 separate duplicated blocks between them, totalling at least 150 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/language/deepseek/benchmark.py:233\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/language/deepseek/benchmark.py"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"75309a9272ce63ac7dc19de6a1151a034b227ed3ac71e14dd72a0c5112cbfc79"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26 lines \u00D7 2): examples/images/dreambooth/train_dreambooth_colossalai.py:601-626 | examples/images/dreambooth/train_dreambooth_colossalai_lora.py:621-646 \u2014 before extracting anything, compare \u0060examples/images/dreambooth/train_dreambooth_colossalai.py\u0060 and \u0060examples/images/dreambooth/train_dreambooth_colossalai_lora.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 757 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/dreambooth/train_dreambooth_colossalai.py"},"region":{"startLine":601}}}],"partialFingerprints":{"codehealthFindingId/v1":"976ed1d9869beb0171a1235faf5b5a39c0e69dfc041ed13526b2c204423bfd3a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19\u201325 lines \u00D7 4): examples/images/diffusion/scripts/img2img.py:120-144 | examples/images/diffusion/scripts/txt2img.py:124-144 | examples/images/vit/args.py:24-43 | examples/tutorial/opt/opt/run_clm.py:122-140 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/images/diffusion/scripts/img2img.py:120\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060examples/images/vit/args.py:43\u0060 calls \u0060add_argument\u0060 and \u0060examples/tutorial/opt/opt/run_clm.py:140\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/vit/args.py"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"4032f46b2165bfc76af1ca1aff9f622fe99e92b4873245214e047f7086c0b135"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 3): examples/images/dreambooth/train_dreambooth.py:292-316 | examples/images/dreambooth/train_dreambooth_colossalai.py:319-343 | examples/images/dreambooth/train_dreambooth_colossalai_lora.py:318-342 \u2014 before extracting anything, compare \u0060examples/images/dreambooth/train_dreambooth.py\u0060 and \u0060examples/images/dreambooth/train_dreambooth_colossalai.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 401 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/dreambooth/train_dreambooth.py"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"92470afdd1a45dd41ba94034c5262b1568e38f0bac6b72c784cf9c67e6888fb3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 3): examples/images/dreambooth/train_dreambooth.py:608-632 | examples/images/dreambooth/train_dreambooth_colossalai.py:621-645 | examples/images/dreambooth/train_dreambooth_colossalai_lora.py:641-665 \u2014 before extracting anything, compare \u0060examples/images/dreambooth/train_dreambooth.py\u0060 and \u0060examples/images/dreambooth/train_dreambooth_colossalai.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 401 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/dreambooth/train_dreambooth.py"},"region":{"startLine":608}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c8de36356fe9a93414355463543b08e5b6c536b6aa79233e93472e12bc19fcb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): examples/community/roberta/pretraining/model/bert.py:1350-1373 | examples/community/roberta/pretraining/model/deberta_v2.py:1159-1182 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/community/roberta/pretraining/model/bert.py:1350\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/community/roberta/pretraining/model/bert.py"},"region":{"startLine":1350}}}],"partialFingerprints":{"codehealthFindingId/v1":"b49dc16f0eeb5c9eda51598ead17d7f468d3cac27093f2fe9fa3c15b62f6e849"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): examples/tutorial/hybrid_parallel/train.py:112-135 | examples/tutorial/large_batch_optimizer/train.py:77-100 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/tutorial/hybrid_parallel/train.py:112\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060examples/tutorial/hybrid_parallel/train.py:136\u0060 calls \u0060destroy\u0060 and \u0060examples/tutorial/large_batch_optimizer/train.py:103\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/tutorial/hybrid_parallel/train.py"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8d1b9ae4ff8e3049fb6226e1219e2f823d1f51f53f8a4c71a2e0c88b66b6ff4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18\u201323 lines \u00D7 3): applications/ColossalChat/examples/training_scripts/train_grpo.py:48-70 | applications/ColossalChat/examples/training_scripts/train_ppo.py:57-79 | applications/ColossalChat/examples/training_scripts/train_sft.py:32-49 \u2014 before extracting anything, compare \u0060applications/ColossalChat/examples/training_scripts/train_grpo.py\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_ppo.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 469 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/examples/training_scripts/train_grpo.py:48\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/examples/training_scripts/train_grpo.py"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2be452fdb52bf9344d77475336b9f2f8503e9891c36a604ff0c82cd2583eea5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21\u201323 lines \u00D7 3): examples/language/bert/finetune.py:148-168 | examples/language/gpt/hybridparallelism/finetune.py:145-167 | examples/language/opt/opt_train_demo.py:44-64 \u2014 before extracting anything, compare \u0060examples/language/bert/finetune.py\u0060 and \u0060examples/language/gpt/hybridparallelism/finetune.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 242 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/language/gpt/hybridparallelism/finetune.py:145\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/language/bert/finetune.py"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"7bcad0118ddef4c17c0ce1cde81306d737322723ad0eaa10a11707c7ea5d8662"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): applications/ColossalChat/examples/training_scripts/train_grpo.py:195-217 | applications/ColossalChat/examples/training_scripts/train_ppo.py:233-255 \u2014 before extracting anything, compare \u0060applications/ColossalChat/examples/training_scripts/train_grpo.py\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_ppo.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 469 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/examples/training_scripts/train_grpo.py:195\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/examples/training_scripts/train_grpo.py"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"931ce4b65097832601e8ef80fbab8757460051cb9b35b427fcc312201c36bc9a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): applications/ColossalEval/examples/dataset_evaluation/inference.py:62-84 | applications/ColossalEval/examples/gpt_evaluation/inference.py:58-80 \u2014 \u0060applications/ColossalEval/examples/dataset_evaluation/inference.py\u0060 and \u0060applications/ColossalEval/examples/gpt_evaluation/inference.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 8 separate duplicated blocks between them, totalling at least 194 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060applications/ColossalEval/examples/dataset_evaluation/inference.py:89\u0060 calls \u0060get_accelerator\u0060 and \u0060applications/ColossalEval/examples/gpt_evaluation/inference.py:85\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/examples/dataset_evaluation/inference.py"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"22174159de5043558d4d2692ab26f0e4f7d6605fac394e2da7d7212b100eeb1f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): examples/images/dreambooth/train_dreambooth_colossalai.py:503-525 | examples/images/dreambooth/train_dreambooth_colossalai_lora.py:524-546 \u2014 before extracting anything, compare \u0060examples/images/dreambooth/train_dreambooth_colossalai.py\u0060 and \u0060examples/images/dreambooth/train_dreambooth_colossalai_lora.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 757 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/images/dreambooth/train_dreambooth_colossalai.py:503\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/dreambooth/train_dreambooth_colossalai.py"},"region":{"startLine":503}}}],"partialFingerprints":{"codehealthFindingId/v1":"adbab0ff607d30ce753c1253ddcc9d240267b24ea30eda1eeaf1d3cba79f10f3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): examples/images/dreambooth/train_dreambooth_colossalai.py:661-683 | examples/images/dreambooth/train_dreambooth_colossalai_lora.py:681-703 \u2014 before extracting anything, compare \u0060examples/images/dreambooth/train_dreambooth_colossalai.py\u0060 and \u0060examples/images/dreambooth/train_dreambooth_colossalai_lora.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 757 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/dreambooth/train_dreambooth_colossalai.py"},"region":{"startLine":661}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f6cb5371a09c54ae8fbac8b6c0191e0bb8a4f5fd7d3a3bdd17d7baf542d7e27"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 4): examples/images/dreambooth/train_dreambooth.py:265-286 | examples/images/dreambooth/train_dreambooth_colossalai.py:292-313 | examples/images/dreambooth/train_dreambooth_colossalai_lora.py:291-312 | examples/images/dreambooth/train_dreambooth_inpaint.py:280-301 \u2014 before extracting anything, compare \u0060examples/images/dreambooth/train_dreambooth.py\u0060 and \u0060examples/images/dreambooth/train_dreambooth_colossalai.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 401 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/dreambooth/train_dreambooth.py"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"87180100e070d7596a1db4ac09185ad42632cd5306a047a587f6949176fd52e6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 3): applications/ColossalChat/examples/training_scripts/train_dpo.py:149-170 | applications/ColossalChat/examples/training_scripts/train_kto.py:149-170 | applications/ColossalChat/examples/training_scripts/train_orpo.py:138-159 \u2014 before extracting anything, compare \u0060applications/ColossalChat/examples/training_scripts/train_dpo.py\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_kto.py\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 289 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/examples/training_scripts/train_dpo.py"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"d92db8466fbd58bce624d8d69eb230350ef77a543119f4c768b49bb2aa1d88fc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21\u201322 lines \u00D7 2): examples/community/roberta/pretraining/arguments.py:7-28 | examples/language/gpt/gemini/train_gpt_demo.py:27-47 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/community/roberta/pretraining/arguments.py:7\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/community/roberta/pretraining/arguments.py"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"adb415c8fbadae79b6732171b387038d55ca2dd5b408cbaf1391c5ca040070ba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): examples/images/dreambooth/train_dreambooth.py:50-71 | examples/images/dreambooth/train_dreambooth_inpaint.py:93-114 \u2014 before extracting anything, compare \u0060examples/images/dreambooth/train_dreambooth.py\u0060 and \u0060examples/images/dreambooth/train_dreambooth_inpaint.py\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 499 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/images/dreambooth/train_dreambooth.py:50\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/dreambooth/train_dreambooth.py"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad55adca1adcc9ebb3ab82a6a41a47ac6ea55c4576de80bed13a9922d4ce5e0f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): examples/language/llama/benchmark.py:373-394 | examples/language/mixtral/benchmark.py:265-286 \u2014 \u0060examples/language/llama/benchmark.py\u0060 and \u0060examples/language/mixtral/benchmark.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 11 separate duplicated blocks between them, totalling at least 164 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/language/llama/benchmark.py"},"region":{"startLine":373}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfd6278c0868b09139a9d10602401c0f79e2118e89382ccb7abc82025e8c6aa1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 5): applications/ColossalChat/examples/training_scripts/train_dpo.py:224-244 | applications/ColossalChat/examples/training_scripts/train_kto.py:245-265 | applications/ColossalChat/examples/training_scripts/train_orpo.py:210-230 | applications/ColossalChat/examples/training_scripts/train_rm.py:222-242 | applications/ColossalChat/examples/training_scripts/train_sft.py:230-250 \u2014 before extracting anything, compare \u0060applications/ColossalChat/examples/training_scripts/train_dpo.py\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_kto.py\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 289 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060applications/ColossalChat/examples/training_scripts/train_dpo.py:220\u0060 calls \u0060boost\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_orpo.py:207\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/examples/training_scripts/train_dpo.py"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"c960219a065a38f4b4282b6ab6f5ee593b0e032b1ece85ba445b8bddbf69a84c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 4): applications/ColossalChat/examples/training_scripts/train_dpo.py:281-301 | applications/ColossalChat/examples/training_scripts/train_kto.py:302-322 | applications/ColossalChat/examples/training_scripts/train_orpo.py:264-284 | applications/ColossalChat/examples/training_scripts/train_rm.py:275-295 \u2014 before extracting anything, compare \u0060applications/ColossalChat/examples/training_scripts/train_dpo.py\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_kto.py\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 289 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/examples/training_scripts/train_dpo.py:281\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/examples/training_scripts/train_dpo.py"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"618a23997a828a2fc40ccb09ba10e60615f715d732d6993cfefb35556362b69a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201321 lines \u00D7 4): applications/ColossalChat/examples/training_scripts/train_grpo.py:47-67 | applications/ColossalChat/examples/training_scripts/train_ppo.py:56-76 | applications/ColossalChat/examples/training_scripts/train_rm.py:32-52 | applications/ColossalChat/examples/training_scripts/train_sft.py:31-46 \u2014 before extracting anything, compare \u0060applications/ColossalChat/examples/training_scripts/train_grpo.py\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_ppo.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 469 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/examples/training_scripts/train_grpo.py"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"43a4d3941a552114c37f4bae0f90996f7d9e93037f45fdcf35666a197dfa5e48"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201321 lines \u00D7 3): applications/ColossalChat/examples/training_scripts/train_dpo.py:101-114 | applications/ColossalChat/examples/training_scripts/train_kto.py:100-120 | applications/ColossalChat/examples/training_scripts/train_orpo.py:99-119 \u2014 before extracting anything, compare \u0060applications/ColossalChat/examples/training_scripts/train_dpo.py\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_kto.py\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 289 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/examples/training_scripts/train_dpo.py:101\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060applications/ColossalChat/examples/training_scripts/train_orpo.py:97\u0060 calls \u0060ValueError\u0060, \u0060Booster\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_dpo.py:101\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/examples/training_scripts/train_dpo.py"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"afe6e8d4e2e425416ef4f06097d836c058aea89cf18d63dc4dcdcef746bb5e1f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 3): examples/images/resnet/train.py:177-197 | examples/tutorial/new_api/cifar_resnet/train.py:177-197 | examples/tutorial/new_api/cifar_vit/train.py:197-217 \u2014 before extracting anything, compare \u0060examples/images/resnet/train.py\u0060 and \u0060examples/tutorial/new_api/cifar_resnet/train.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 158 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/images/resnet/train.py:177\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/resnet/train.py"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"504b7d0e08d0f051ef193691b63a1558604f8f9aaa0e86c1113cbacf92098242"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): examples/language/bert/finetune.py:199-219 | examples/language/gpt/hybridparallelism/finetune.py:196-216 \u2014 before extracting anything, compare \u0060examples/language/bert/finetune.py\u0060 and \u0060examples/language/gpt/hybridparallelism/finetune.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 242 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/language/bert/finetune.py"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"303592660052c8a31c9fe5936c22b38f15f95f3179b6841d00ab64f7c538e014"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201321 lines \u00D7 2): examples/language/bert/finetune.py:247-259 | examples/language/gpt/hybridparallelism/finetune.py:231-251 \u2014 before extracting anything, compare \u0060examples/language/bert/finetune.py\u0060 and \u0060examples/language/gpt/hybridparallelism/finetune.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 242 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/language/bert/finetune.py:247\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/language/bert/finetune.py"},"region":{"startLine":247}}}],"partialFingerprints":{"codehealthFindingId/v1":"297b11cb160c0d0dd8cb6f01565ff8c02149ae2f631f92036de21962793595d1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19\u201320 lines \u00D7 5): applications/ColossalChat/examples/training_scripts/train_dpo.py:200-219 | applications/ColossalChat/examples/training_scripts/train_kto.py:222-240 | applications/ColossalChat/examples/training_scripts/train_orpo.py:189-207 | applications/ColossalChat/examples/training_scripts/train_rm.py:201-219 | applications/ColossalChat/examples/training_scripts/train_sft.py:207-226 \u2014 before extracting anything, compare \u0060applications/ColossalChat/examples/training_scripts/train_dpo.py\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_kto.py\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 289 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/examples/training_scripts/train_dpo.py:200\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060applications/ColossalChat/examples/training_scripts/train_dpo.py:220\u0060 calls \u0060boost\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_orpo.py:208\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/examples/training_scripts/train_dpo.py"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"62cee7033d82005ffeebefa50288cfa94f803e85ee4a80770323472e891bd185"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 5): applications/ColossalChat/examples/training_scripts/train_grpo.py:181-200 | applications/ColossalChat/examples/training_scripts/train_kto.py:57-76 | applications/ColossalChat/examples/training_scripts/train_orpo.py:57-76 | applications/ColossalChat/examples/training_scripts/train_ppo.py:219-238 | applications/ColossalChat/examples/training_scripts/train_sft.py:79-98 \u2014 before extracting anything, compare \u0060applications/ColossalChat/examples/training_scripts/train_grpo.py\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_kto.py\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 162 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/examples/training_scripts/train_grpo.py:181\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/examples/training_scripts/train_grpo.py"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4d3d76d075665f6de352f3ba14238f799649cfadfa8840b97e15dc81d5ed035"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): examples/images/dreambooth/train_dreambooth.py:187-206 | examples/images/dreambooth/train_dreambooth_inpaint.py:208-227 \u2014 before extracting anything, compare \u0060examples/images/dreambooth/train_dreambooth.py\u0060 and \u0060examples/images/dreambooth/train_dreambooth_inpaint.py\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 499 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/images/dreambooth/train_dreambooth.py:187\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/dreambooth/train_dreambooth.py"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"4dfc0d5112049fffc00bba65769159cdd36cb7afd2d67471abf969cd35cf02e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): examples/images/dreambooth/train_dreambooth.py:648-667 | examples/images/dreambooth/train_dreambooth_inpaint.py:696-715 \u2014 before extracting anything, compare \u0060examples/images/dreambooth/train_dreambooth.py\u0060 and \u0060examples/images/dreambooth/train_dreambooth_inpaint.py\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 499 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/dreambooth/train_dreambooth.py"},"region":{"startLine":648}}}],"partialFingerprints":{"codehealthFindingId/v1":"22716240a766da66dd587f36e6449f7878c04c9666d86370d7021622e4e6d08d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): examples/images/vit/args.py:5-24 | examples/language/opt/args.py:5-24 \u2014 before extracting anything, compare \u0060examples/images/vit/args.py\u0060 and \u0060examples/language/opt/args.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 115 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/vit/args.py"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf771cdb0533bc644864a5d887345f501fe59bb680d57f2aa4de9a94358c0aed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): examples/language/gpt/titans/model/embed.py:91-110 | examples/language/gpt/titans/model/embed.py:436-455 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/language/gpt/titans/model/embed.py"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea46976ddba66977487c9f0dd2c55e1fd5b0cd65d4883a194a5d51e53eceb728"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 3): examples/images/diffusion/scripts/img2img.py:81-103 | examples/images/dreambooth/train_dreambooth.py:144-162 | examples/images/dreambooth/train_dreambooth_inpaint.py:164-183 \u2014 before extracting anything, compare \u0060examples/images/dreambooth/train_dreambooth.py\u0060 and \u0060examples/images/dreambooth/train_dreambooth_inpaint.py\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 499 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/images/diffusion/scripts/img2img.py:81\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060examples/images/dreambooth/train_dreambooth.py:143\u0060 calls \u0060add_argument\u0060 and \u0060examples/images/dreambooth/train_dreambooth_inpaint.py:164\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/dreambooth/train_dreambooth.py"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddef27ce6aa211d0e3b5cac4b3568eeb0d123210321d92cd9ffa7954122a47be"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 3): examples/images/resnet/train.py:149-167 | examples/tutorial/new_api/cifar_resnet/train.py:149-167 | examples/tutorial/new_api/cifar_vit/train.py:169-187 \u2014 before extracting anything, compare \u0060examples/images/resnet/train.py\u0060 and \u0060examples/tutorial/new_api/cifar_resnet/train.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 158 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/images/resnet/train.py:149\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/resnet/train.py"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"98579eb83a78d8f5e44fb9d2015550404e0d364d3b1614ca39c640a547b2fe49"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201319 lines \u00D7 2): examples/community/roberta/preprocessing/get_mask.py:112-123 | examples/community/roberta/preprocessing/get_mask.py:193-211 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/community/roberta/preprocessing/get_mask.py"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0c115fbe9c30295c4f41fe0537a336586b48cd5634b837d80d722b603186d96"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201319 lines \u00D7 2): examples/images/dreambooth/train_dreambooth_colossalai.py:483-501 | examples/images/dreambooth/train_dreambooth_colossalai_lora.py:506-522 \u2014 before extracting anything, compare \u0060examples/images/dreambooth/train_dreambooth_colossalai.py\u0060 and \u0060examples/images/dreambooth/train_dreambooth_colossalai_lora.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 757 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/images/dreambooth/train_dreambooth_colossalai.py:483\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/dreambooth/train_dreambooth_colossalai.py"},"region":{"startLine":483}}}],"partialFingerprints":{"codehealthFindingId/v1":"97de0a4c91ca7c3ea62325107df883aa376dab9d35e0910fe6e91dd7cc9a6f74"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): examples/tutorial/opt/opt/run_clm.py:105-124 | examples/tutorial/opt/opt/run_clm.py:201-219 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/tutorial/opt/opt/run_clm.py:105\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/tutorial/opt/opt/run_clm.py"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed3765c0dc46a0f43b61267921b18ba41f7a183911a9527d850274bcbfdb6287"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): examples/tutorial/sequence_parallel/data/datasets/builder.py:44-62 | examples/tutorial/sequence_parallel/data/datasets/dataset_utils.py:498-516 \u2014 before extracting anything, compare \u0060examples/tutorial/sequence_parallel/data/datasets/builder.py\u0060 and \u0060examples/tutorial/sequence_parallel/data/datasets/dataset_utils.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 111 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/tutorial/sequence_parallel/data/datasets/builder.py"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"74bfe961e7ee3aec7001dffe5513d185c8deae48717cd3b50ce32fbad034d0a6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201319 lines \u00D7 2): examples/tutorial/sequence_parallel/data/datasets/dataset_utils.py:257-275 | examples/tutorial/sequence_parallel/data/datasets/dataset_utils.py:318-334 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/tutorial/sequence_parallel/data/datasets/dataset_utils.py:257\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/tutorial/sequence_parallel/data/datasets/dataset_utils.py"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"29f012e9fc031f42fcd4aded42887d1407b0188c3e00609c06ef87c3abb967ef"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 5): examples/images/dreambooth/train_dreambooth.py:49-66 | examples/images/dreambooth/train_dreambooth.py:69-86 | examples/images/dreambooth/train_dreambooth_colossalai.py:55-72 | examples/images/dreambooth/train_dreambooth_colossalai_lora.py:58-75 | examples/images/dreambooth/train_dreambooth_inpaint.py:92-109 \u2014 before extracting anything, compare \u0060examples/images/dreambooth/train_dreambooth.py\u0060 and \u0060examples/images/dreambooth/train_dreambooth_colossalai.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 401 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/images/dreambooth/train_dreambooth.py:49\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/dreambooth/train_dreambooth.py"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0ffc34f9f1d736a2cdc48810f91733f7300df7522bd131e702a88edaa3cecdb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 4): examples/community/roberta/pretraining/model/deberta_v2.py:1145-1165 | examples/community/roberta/pretraining/model/deberta_v2.py:1287-1306 | examples/community/roberta/pretraining/model/deberta_v2.py:1396-1413 | examples/community/roberta/pretraining/model/deberta_v2.py:1473-1496 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060examples/community/roberta/pretraining/model/deberta_v2.py:1474\u0060 calls \u0060LongTensor\u0060 and \u0060examples/community/roberta/pretraining/model/deberta_v2.py:1215\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/community/roberta/pretraining/model/deberta_v2.py"},"region":{"startLine":1145}}}],"partialFingerprints":{"codehealthFindingId/v1":"c44745aee21420f1858cdc9bd684d65b025f46844a97dfbb51fea14a77170363"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201318 lines \u00D7 2): examples/community/roberta/pretraining/model/bert.py:1228-1244 | examples/community/roberta/pretraining/model/bert.py:1343-1360 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/community/roberta/pretraining/model/bert.py:1228\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060examples/community/roberta/pretraining/model/bert.py:1246\u0060 calls \u0060contiguous\u0060 and \u0060examples/community/roberta/pretraining/model/bert.py:1361\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/community/roberta/pretraining/model/bert.py"},"region":{"startLine":1228}}}],"partialFingerprints":{"codehealthFindingId/v1":"36e26fcf3dd51b92aad7d069fd6058c86d7602405b111ed8400ca3905f234107"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): examples/community/roberta/pretraining/model/bert.py:1547-1564 | examples/community/roberta/pretraining/model/bert.py:1745-1762 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/community/roberta/pretraining/model/bert.py"},"region":{"startLine":1547}}}],"partialFingerprints":{"codehealthFindingId/v1":"841108973bea84fa625c5788178c7755ce162c3382e4fcfc4cd1667e0bcf378c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201318 lines \u00D7 2): examples/community/roberta/pretraining/model/bert.py:1839-1855 | examples/community/roberta/pretraining/model/deberta_v2.py:1486-1503 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/community/roberta/pretraining/model/bert.py:1839\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/community/roberta/pretraining/model/bert.py"},"region":{"startLine":1839}}}],"partialFingerprints":{"codehealthFindingId/v1":"f31ad8ab96f902de9e47c6ccebcd1da769131af98f4de9cce8c255593e5aa9c6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201318 lines \u00D7 2): examples/images/vit/args.py:64-79 | examples/language/opt/args.py:16-33 \u2014 before extracting anything, compare \u0060examples/images/vit/args.py\u0060 and \u0060examples/language/opt/args.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 115 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/images/vit/args.py:64\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/vit/args.py"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b4620418f90926ed3b0809b4ed2fac0568ad50989d0aae5a448a193d9a57fed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): examples/images/vit/vit_benchmark.py:46-63 | examples/language/opt/opt_benchmark.py:49-66 \u2014 before extracting anything, compare \u0060examples/images/vit/vit_benchmark.py\u0060 and \u0060examples/language/opt/opt_benchmark.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/vit/vit_benchmark.py"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"529ac7bc85ae84eb2ea54d369cb5e37eea16ac343f1ef4f5dcbc066175ecc8a9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): examples/inference/benchmark_ops/benchmark_decoding_attn.py:95-112 | examples/inference/benchmark_ops/benchmark_decoding_attn.py:117-134 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/inference/benchmark_ops/benchmark_decoding_attn.py:95\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/inference/benchmark_ops/benchmark_decoding_attn.py"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"e182c47ebfeab0926dbce189bf7c4d67a6e58c90697cc376b5b4546b4b8b2701"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): examples/tutorial/sequence_parallel/data/datasets/builder.py:63-80 | examples/tutorial/sequence_parallel/data/datasets/dataset_utils.py:519-536 \u2014 before extracting anything, compare \u0060examples/tutorial/sequence_parallel/data/datasets/builder.py\u0060 and \u0060examples/tutorial/sequence_parallel/data/datasets/dataset_utils.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 111 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/tutorial/sequence_parallel/data/datasets/builder.py:63\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/tutorial/sequence_parallel/data/datasets/builder.py"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bec5e31fcf65ddab929ed814e24c01f93d4b1ab201a13a2117bb88537bce8d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): examples/tutorial/sequence_parallel/data/datasets/builder.py:88-105 | examples/tutorial/sequence_parallel/data/datasets/dataset_utils.py:551-568 \u2014 before extracting anything, compare \u0060examples/tutorial/sequence_parallel/data/datasets/builder.py\u0060 and \u0060examples/tutorial/sequence_parallel/data/datasets/dataset_utils.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 111 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/tutorial/sequence_parallel/data/datasets/builder.py:88\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/tutorial/sequence_parallel/data/datasets/builder.py"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f081ff81bd7f1fb8778ff8b68b89bc664d94407fec881df5f8e2eb0222efb36"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 4): examples/images/dreambooth/train_dreambooth.py:623-639 | examples/images/dreambooth/train_dreambooth_colossalai.py:636-652 | examples/images/dreambooth/train_dreambooth_colossalai_lora.py:656-672 | examples/images/dreambooth/train_dreambooth_inpaint.py:671-687 \u2014 before extracting anything, compare \u0060examples/images/dreambooth/train_dreambooth.py\u0060 and \u0060examples/images/dreambooth/train_dreambooth_colossalai.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 401 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060examples/images/dreambooth/train_dreambooth_inpaint.py:668\u0060 calls \u0060cat\u0060 and \u0060examples/images/dreambooth/train_dreambooth.py:620\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/dreambooth/train_dreambooth.py"},"region":{"startLine":623}}}],"partialFingerprints":{"codehealthFindingId/v1":"030551b70631b8d6e4e13885a0e8b1bade58dbace9cc333194805a592b50b050"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201317 lines \u00D7 3): applications/ColossalChat/examples/data_preparation_scripts/prepare_dataset.py:79-91 | examples/images/vit/args.py:57-71 | examples/language/opt/args.py:43-59 \u2014 before extracting anything, compare \u0060applications/ColossalChat/examples/data_preparation_scripts/prepare_dataset.py\u0060 and \u0060examples/images/vit/args.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 59 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/language/opt/args.py:43\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060applications/ColossalChat/examples/data_preparation_scripts/prepare_dataset.py:91\u0060 calls \u0060add_argument\u0060 and \u0060examples/language/opt/args.py:59\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/examples/data_preparation_scripts/prepare_dataset.py"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"87278a052c2cd4d02c1e47f5b73e0ed99bf86980a4ec26eeeed0e3d18c41f48a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 3): examples/community/roberta/pretraining/model/bert.py:1550-1565 | examples/community/roberta/pretraining/model/bert.py:1748-1763 | examples/community/roberta/pretraining/model/deberta_v2.py:1403-1419 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/community/roberta/pretraining/model/bert.py:1550\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/community/roberta/pretraining/model/bert.py"},"region":{"startLine":1550}}}],"partialFingerprints":{"codehealthFindingId/v1":"d182df9695d7ec62718c09bec5bec0116a00f6801ec5c02179d14339cec41abd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 3): examples/community/roberta/pretraining/model/bert.py:1539-1557 | examples/community/roberta/pretraining/model/bert.py:1739-1755 | examples/community/roberta/pretraining/model/bert.py:1824-1846 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/community/roberta/pretraining/model/bert.py"},"region":{"startLine":1539}}}],"partialFingerprints":{"codehealthFindingId/v1":"eba79af8901e44755709fe4bcc4debb48a1874e9aecf3eea8a601ce16a313396"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 3): examples/images/dreambooth/train_dreambooth.py:28-44 | examples/images/dreambooth/train_dreambooth_colossalai.py:34-50 | examples/images/dreambooth/train_dreambooth_colossalai_lora.py:37-53 \u2014 before extracting anything, compare \u0060examples/images/dreambooth/train_dreambooth.py\u0060 and \u0060examples/images/dreambooth/train_dreambooth_colossalai.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 401 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/dreambooth/train_dreambooth.py"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"664cad50770e41d1c34ce11bb9bce7bd9de7f5b3815cba6d44efa8fc259a1723"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 2): examples/community/roberta/pretraining/model/bert.py:1346-1361 | examples/community/roberta/pretraining/model/bert.py:1463-1479 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/community/roberta/pretraining/model/bert.py:1346\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/community/roberta/pretraining/model/bert.py"},"region":{"startLine":1346}}}],"partialFingerprints":{"codehealthFindingId/v1":"7fed943782291c5f91a29392c626caec884e7196a34916b3a781246cfc388b20"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): examples/tutorial/opt/inference/opt_fastapi.py:33-49 | examples/tutorial/opt/inference/opt_server.py:38-54 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060examples/tutorial/opt/inference/opt_server.py:55\u0060 calls \u0060isinstance\u0060 and \u0060examples/tutorial/opt/inference/opt_fastapi.py:50\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/tutorial/opt/inference/opt_fastapi.py"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"57d6e1d0d494793920d3c9a24ee29cdb1e489c9907d178dc1a20d84a945693d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201316 lines \u00D7 3): applications/ColossalChat/examples/data_preparation_scripts/prepare_dataset.py:71-86 | examples/images/vit/args.py:6-20 | examples/language/opt/args.py:6-20 \u2014 before extracting anything, compare \u0060applications/ColossalChat/examples/data_preparation_scripts/prepare_dataset.py\u0060 and \u0060examples/images/vit/args.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 59 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/examples/data_preparation_scripts/prepare_dataset.py:71\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/examples/data_preparation_scripts/prepare_dataset.py"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4a89406ede73dc4edbf1bc906954bb770a832af19900bd27fbf5b0f794f9462"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 3): examples/community/roberta/pretraining/model/bert.py:1547-1562 | examples/community/roberta/pretraining/model/bert.py:1658-1673 | examples/community/roberta/pretraining/model/bert.py:1745-1760 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060examples/community/roberta/pretraining/model/bert.py:1674\u0060 calls \u0060view\u0060 and \u0060examples/community/roberta/pretraining/model/bert.py:1564\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/community/roberta/pretraining/model/bert.py"},"region":{"startLine":1547}}}],"partialFingerprints":{"codehealthFindingId/v1":"785210095cf529a94e4c6e073248a731ae4d33df515ec67bf6aa0846515845a7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201316 lines \u00D7 3): examples/images/resnet/train.py:38-50 | examples/tutorial/new_api/cifar_resnet/train.py:38-50 | examples/tutorial/new_api/cifar_vit/train.py:55-70 \u2014 before extracting anything, compare \u0060examples/images/resnet/train.py\u0060 and \u0060examples/tutorial/new_api/cifar_resnet/train.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 158 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/tutorial/new_api/cifar_vit/train.py:55\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/resnet/train.py"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"9db866d6137853e8c67a72c0ee30e19b214440d6314512b76b1da830dac0dd89"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 3): examples/images/resnet/train.py:82-97 | examples/tutorial/new_api/cifar_resnet/train.py:82-97 | examples/tutorial/new_api/cifar_vit/train.py:102-117 \u2014 before extracting anything, compare \u0060examples/images/resnet/train.py\u0060 and \u0060examples/tutorial/new_api/cifar_resnet/train.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 158 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/resnet/train.py"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"50c6cb72b0e1ee47d79034bcbd00b63ee10f1294132036b0ac8b0365fb392214"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): applications/ColossalChat/examples/training_scripts/train_grpo.py:288-303 | applications/ColossalChat/examples/training_scripts/train_ppo.py:332-347 \u2014 before extracting anything, compare \u0060applications/ColossalChat/examples/training_scripts/train_grpo.py\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_ppo.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 469 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060applications/ColossalChat/examples/training_scripts/train_ppo.py:348\u0060 calls \u0060eval\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_grpo.py:304\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/examples/training_scripts/train_grpo.py"},"region":{"startLine":288}}}],"partialFingerprints":{"codehealthFindingId/v1":"12293530bcf658c5a7c153bf546d126db60732976d707025839d6c0f4c3d44d7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): applications/ColossalChat/examples/training_scripts/train_grpo.py:402-417 | applications/ColossalChat/examples/training_scripts/train_ppo.py:469-484 \u2014 before extracting anything, compare \u0060applications/ColossalChat/examples/training_scripts/train_grpo.py\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_ppo.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 469 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/examples/training_scripts/train_grpo.py:402\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060applications/ColossalChat/examples/training_scripts/train_ppo.py:485\u0060 calls \u0060eval\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_grpo.py:419\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/examples/training_scripts/train_grpo.py"},"region":{"startLine":402}}}],"partialFingerprints":{"codehealthFindingId/v1":"781d789368a07119694994c34503d59def08ba0a44d03cb420c0b3f9f153f36c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): examples/language/bert/finetune.py:248-266 | examples/tutorial/new_api/glue_bert/finetune.py:148-163 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/language/bert/finetune.py:248\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/language/bert/finetune.py"},"region":{"startLine":248}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2d672fb33bc71e1f1ee4e93038a9b70784c7772bbcf1a97f990fda4f0d85fb8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): examples/language/deepseek/benchmark.py:158-173 | examples/language/llama/benchmark.py:240-255 \u2014 \u0060examples/language/deepseek/benchmark.py\u0060 and \u0060examples/language/llama/benchmark.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 10 separate duplicated blocks between them, totalling at least 150 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/language/deepseek/benchmark.py"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7099a2284bcf711a1676a93f415292e6f647681e529b68f08340e75fcc7f504"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 4): examples/community/roberta/pretraining/model/bert.py:1459-1473 | examples/community/roberta/pretraining/model/bert.py:1545-1559 | examples/community/roberta/pretraining/model/bert.py:1743-1757 | examples/community/roberta/pretraining/model/bert.py:1834-1848 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/community/roberta/pretraining/model/bert.py"},"region":{"startLine":1459}}}],"partialFingerprints":{"codehealthFindingId/v1":"06b76b20c37686d692c2a581b097c88addb60ad47ea1a8819a6d9d6f03c1f7ac"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201315 lines \u00D7 4): examples/images/dreambooth/train_dreambooth.py:132-142 | examples/images/dreambooth/train_dreambooth_colossalai.py:155-166 | examples/images/dreambooth/train_dreambooth_colossalai_lora.py:158-169 | examples/images/dreambooth/train_dreambooth_inpaint.py:154-168 \u2014 before extracting anything, compare \u0060examples/images/dreambooth/train_dreambooth.py\u0060 and \u0060examples/images/dreambooth/train_dreambooth_colossalai.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 401 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/images/dreambooth/train_dreambooth_colossalai.py:155\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/dreambooth/train_dreambooth.py"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"46438a8a099df193770480ec3f72547009857cdb19921e6079f4c9dc4dc95942"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201315 lines \u00D7 4): examples/images/dreambooth/train_dreambooth.py:296-308 | examples/images/dreambooth/train_dreambooth_colossalai.py:323-335 | examples/images/dreambooth/train_dreambooth_colossalai_lora.py:322-334 | examples/images/dreambooth/train_dreambooth_inpaint.py:313-327 \u2014 before extracting anything, compare \u0060examples/images/dreambooth/train_dreambooth.py\u0060 and \u0060examples/images/dreambooth/train_dreambooth_colossalai.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 401 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/dreambooth/train_dreambooth.py"},"region":{"startLine":296}}}],"partialFingerprints":{"codehealthFindingId/v1":"c97a7b85a9da67d9f51515d0c7deabca6d6821f02d537119030c99cc39452819"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 3): examples/community/roberta/pretraining/model/bert.py:1230-1244 | examples/community/roberta/pretraining/model/bert.py:1346-1360 | examples/community/roberta/pretraining/model/bert.py:1462-1478 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/community/roberta/pretraining/model/bert.py:1230\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060examples/community/roberta/pretraining/model/bert.py:1246\u0060 calls \u0060contiguous\u0060 and \u0060examples/community/roberta/pretraining/model/bert.py:1361\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/community/roberta/pretraining/model/bert.py"},"region":{"startLine":1230}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2ec75e1903de3368f8dd250b86d8fd2d4bf003fe30aa754a93f3b319b006de5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 3): examples/community/roberta/pretraining/model/bert.py:1347-1361 | examples/community/roberta/pretraining/model/bert.py:1464-1479 | examples/community/roberta/pretraining/model/deberta_v2.py:1155-1170 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/community/roberta/pretraining/model/bert.py:1347\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/community/roberta/pretraining/model/bert.py"},"region":{"startLine":1347}}}],"partialFingerprints":{"codehealthFindingId/v1":"b80c39bf10ee3a04acfed8900835140b51076242f3845617f13daab43715787b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): examples/community/roberta/pretraining/model/deberta_v2.py:1295-1309 | examples/community/roberta/pretraining/model/deberta_v2.py:1602-1616 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/community/roberta/pretraining/model/deberta_v2.py"},"region":{"startLine":1295}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd9369a46ef86979249180eb62696e976f9c821b8207370dc35316099a6a4114"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 2): examples/images/vit/vit_benchmark.py:68-81 | examples/images/vit/vit_train_demo.py:170-184 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/images/vit/vit_train_demo.py:170\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/vit/vit_benchmark.py"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"3869de01c5f218cbb928e6b1879e22195314ab0fa594212e47d85f7af31be900"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): examples/language/bert/finetune.py:183-197 | examples/language/gpt/hybridparallelism/finetune.py:182-196 \u2014 before extracting anything, compare \u0060examples/language/bert/finetune.py\u0060 and \u0060examples/language/gpt/hybridparallelism/finetune.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 242 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/language/bert/finetune.py:183\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/language/bert/finetune.py"},"region":{"startLine":183}}}],"partialFingerprints":{"codehealthFindingId/v1":"037530a3ee04ac4a9de5cacd58794756504d1e35eb671cbba2dd34203b3a6c37"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): examples/language/deepseek/benchmark.py:175-189 | examples/language/llama/benchmark.py:275-289 \u2014 \u0060examples/language/deepseek/benchmark.py\u0060 and \u0060examples/language/llama/benchmark.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 10 separate duplicated blocks between them, totalling at least 150 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/language/deepseek/benchmark.py:175\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/language/deepseek/benchmark.py"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc39ef6ee8901e319995ba4aef13495fd9d8565eefb59b56b1893ee3456ca9ec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): examples/language/deepseek/benchmark.py:191-205 | examples/language/mixtral/benchmark.py:193-207 \u2014 \u0060examples/language/deepseek/benchmark.py\u0060 and \u0060examples/language/mixtral/benchmark.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 11 separate duplicated blocks between them, totalling at least 155 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/language/deepseek/benchmark.py"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"de5e12623a612d02b9ed2146f5ff6a8a15584d5d69e17fc1902d70f0ddd2430e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 6): applications/ColossalChat/examples/training_scripts/train_grpo.py:43-55 | applications/ColossalChat/examples/training_scripts/train_kto.py:26-39 | applications/ColossalChat/examples/training_scripts/train_orpo.py:26-39 | applications/ColossalChat/examples/training_scripts/train_ppo.py:52-64 | applications/ColossalChat/examples/training_scripts/train_rm.py:28-40 | applications/ColossalChat/examples/training_scripts/train_sft.py:27-39 \u2014 before extracting anything, compare \u0060applications/ColossalChat/examples/training_scripts/train_grpo.py\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_kto.py\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 162 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/examples/training_scripts/train_grpo.py"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f3495e4612143dd408fd1b8a147ce66479b85938381dedc2174aa784246d11b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 5): examples/language/deepseek/performance_evaluator.py:127-140 | examples/language/gpt/gemini/commons/performance_evaluator.py:127-140 | examples/language/llama/performance_evaluator.py:127-140 | examples/language/mixtral/performance_evaluator.py:127-140 | examples/language/performance_evaluator.py:127-140 \u2014 before extracting anything, compare \u0060examples/language/deepseek/performance_evaluator.py\u0060 and \u0060examples/language/gpt/gemini/commons/performance_evaluator.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 96 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/language/deepseek/performance_evaluator.py"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6bcd4c7c08a221e27e98ddac9ecfeb403b393fda80d71b01c2a2aa73c2ae57a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 5): examples/language/deepseek/performance_evaluator.py:150-163 | examples/language/gpt/gemini/commons/performance_evaluator.py:150-163 | examples/language/llama/performance_evaluator.py:150-163 | examples/language/mixtral/performance_evaluator.py:150-163 | examples/language/performance_evaluator.py:150-163 \u2014 before extracting anything, compare \u0060examples/language/deepseek/performance_evaluator.py\u0060 and \u0060examples/language/gpt/gemini/commons/performance_evaluator.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 96 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/language/deepseek/performance_evaluator.py"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2fad658d917332b81083c3bce4497bf7dea2d7555f1b70716118c2444ec23b6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 4): colossalai/shardformer/examples/data.py:119-132 | examples/language/bert/data.py:111-124 | examples/language/gpt/hybridparallelism/data.py:112-125 | examples/tutorial/new_api/glue_bert/data.py:110-123 \u2014 before extracting anything, compare \u0060colossalai/shardformer/examples/data.py\u0060 and \u0060examples/language/bert/data.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/examples/data.py"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"117f19182c0c3d8fda93ff148e086fc021b927ae065b770feee84f7f734d3d67"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): examples/images/resnet/train.py:57-70 | examples/tutorial/new_api/cifar_resnet/train.py:57-70 | examples/tutorial/new_api/cifar_vit/train.py:77-90 \u2014 before extracting anything, compare \u0060examples/images/resnet/train.py\u0060 and \u0060examples/tutorial/new_api/cifar_resnet/train.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 158 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/resnet/train.py"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7f05027f1157d81f6d4d524ba2a8fa9dcae1e0cab585c253ec3c3ea45cbbfa8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): applications/ColossalChat/examples/training_scripts/train_dpo.py:264-277 | applications/ColossalChat/examples/training_scripts/train_kto.py:285-298 \u2014 before extracting anything, compare \u0060applications/ColossalChat/examples/training_scripts/train_dpo.py\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_kto.py\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 289 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/examples/training_scripts/train_dpo.py"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"584d6e74b30258c5a47b8231378c26aaaae05bf665dfc3a1174effe794fdd8dd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): applications/ColossalEval/examples/dataset_evaluation/inference.py:240-253 | applications/ColossalEval/examples/gpt_evaluation/inference.py:223-236 \u2014 \u0060applications/ColossalEval/examples/dataset_evaluation/inference.py\u0060 and \u0060applications/ColossalEval/examples/gpt_evaluation/inference.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 8 separate duplicated blocks between them, totalling at least 194 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalEval/examples/dataset_evaluation/inference.py:240\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/examples/dataset_evaluation/inference.py"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"2286a6ff4f9af0dd693048ecb3a4e96890293b08065ccc750587923c0f9fe549"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 2): colossalai/shardformer/examples/convergence_benchmark.py:139-151 | examples/tutorial/new_api/glue_bert/finetune.py:51-64 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/examples/convergence_benchmark.py"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"29fde9e9c6d3d3824aadce40510ed69115849a0158be5530d2af03a58e922cd1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201314 lines \u00D7 2): examples/tutorial/sequence_parallel/data/tokenizer/bert_tokenization.py:77-86 | examples/tutorial/sequence_parallel/data/tokenizer/bert_tokenization.py:97-110 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/tutorial/sequence_parallel/data/tokenizer/bert_tokenization.py"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"c90189cecdb12eb5d666d3da7bfb769e51e6ae078788678b5d8ce7452677fe22"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201313 lines \u00D7 4): applications/ColossalChat/examples/data_preparation_scripts/prepare_dataset.py:84-94 | examples/images/vit/args.py:14-26 | examples/images/vit/args.py:62-74 | examples/language/opt/args.py:14-26 \u2014 before extracting anything, compare \u0060applications/ColossalChat/examples/data_preparation_scripts/prepare_dataset.py\u0060 and \u0060examples/images/vit/args.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 59 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/examples/data_preparation_scripts/prepare_dataset.py:84\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060examples/images/vit/args.py:12\u0060 calls \u0060add_argument\u0060 and \u0060applications/ColossalChat/examples/data_preparation_scripts/prepare_dataset.py:83\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/examples/data_preparation_scripts/prepare_dataset.py"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff7112ef8b9397f7795419155c562b4edc46474e30bafd5e702e022982d93c5a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201313 lines \u00D7 3): examples/images/dreambooth/train_dreambooth.py:186-196 | examples/images/dreambooth/train_dreambooth_colossalai_lora.py:202-214 | examples/images/dreambooth/train_dreambooth_inpaint.py:207-217 \u2014 before extracting anything, compare \u0060examples/images/dreambooth/train_dreambooth.py\u0060 and \u0060examples/images/dreambooth/train_dreambooth_colossalai_lora.py\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 425 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/images/dreambooth/train_dreambooth.py:186\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/dreambooth/train_dreambooth.py"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e7d0736826057cd17e5ceee11eca840d9563fe78f307c764df5b1de2b08c21b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): examples/images/dreambooth/train_dreambooth.py:376-388 | examples/images/dreambooth/train_dreambooth_colossalai.py:390-402 | examples/images/dreambooth/train_dreambooth_colossalai_lora.py:389-401 \u2014 before extracting anything, compare \u0060examples/images/dreambooth/train_dreambooth.py\u0060 and \u0060examples/images/dreambooth/train_dreambooth_colossalai.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 401 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/dreambooth/train_dreambooth.py"},"region":{"startLine":376}}}],"partialFingerprints":{"codehealthFindingId/v1":"2153bdb69a9edb7b275fb1b9dfbfa6dd27924f709bf290c985f7723f43744472"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): applications/ColossalChat/examples/training_scripts/train_grpo.py:346-357 | applications/ColossalChat/examples/training_scripts/train_ppo.py:397-409 \u2014 before extracting anything, compare \u0060applications/ColossalChat/examples/training_scripts/train_grpo.py\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_ppo.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 469 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/examples/training_scripts/train_grpo.py:346\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060applications/ColossalChat/examples/training_scripts/train_grpo.py:345\u0060 calls \u0060load_checkpoint\u0060, \u0060isinstance\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_ppo.py:397\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/examples/training_scripts/train_grpo.py"},"region":{"startLine":346}}}],"partialFingerprints":{"codehealthFindingId/v1":"0343144ee8c76d7d63796d88f93c3f5d6b5967c75acabae5ccdd4f8091c2940f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): applications/ColossalChat/examples/training_scripts/train_rm.py:62-76 | applications/ColossalChat/examples/training_scripts/train_sft.py:58-70 \u2014 before extracting anything, compare \u0060applications/ColossalChat/examples/training_scripts/train_rm.py\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_sft.py\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 192 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/examples/training_scripts/train_rm.py:62\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/examples/training_scripts/train_rm.py"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"3371b38b2cc313db36dc15f8244e4c936d4006820655d1789ba7068dab0e91ab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201313 lines \u00D7 2): examples/community/roberta/preprocessing/tokenize_mask.py:64-76 | examples/community/roberta/preprocessing/tokenize_mask.py:131-140 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/community/roberta/preprocessing/tokenize_mask.py"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b1eff598327476d47ee17af8ef70aafa35704870adbe24b399ef9d40ab5c7f3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): examples/language/gpt/experiments/pipeline_parallel/model_zoo.py:16-28 | examples/language/gpt/gemini/commons/model_zoo.py:16-28 \u2014 before extracting anything, compare \u0060examples/language/gpt/experiments/pipeline_parallel/model_zoo.py\u0060 and \u0060examples/language/gpt/gemini/commons/model_zoo.py\u0060 as WHOLE FILES: 100% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/language/gpt/experiments/pipeline_parallel/model_zoo.py"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ec18a590b9aedcf0472dc62a8d621fbd416895602f4824b40b7ee4fbc5c1a68"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 9): applications/ColossalChat/examples/training_scripts/train_dpo.py:73-84 | applications/ColossalChat/examples/training_scripts/train_grpo.py:210-221 | applications/ColossalChat/examples/training_scripts/train_grpo.py:224-235 | applications/ColossalChat/examples/training_scripts/train_kto.py:83-94 | applications/ColossalChat/examples/training_scripts/train_orpo.py:83-94 | applications/ColossalChat/examples/training_scripts/train_ppo.py:248-259 | applications/ColossalChat/examples/training_scripts/train_ppo.py:261-272 | applications/ColossalChat/examples/training_scripts/train_rm.py:111-122 | applications/ColossalChat/examples/training_scripts/train_sft.py:105-116 \u2014 before extracting anything, compare \u0060applications/ColossalChat/examples/training_scripts/train_dpo.py\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_grpo.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/examples/training_scripts/train_dpo.py:73\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060applications/ColossalChat/examples/training_scripts/train_grpo.py:208\u0060 calls \u0060warning\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_dpo.py:72\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/examples/training_scripts/train_dpo.py"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fb423decd9c177cd452ef85c202ca0d3cbc854b6b6e7d6497115eea0f16a231"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 6): applications/ColossalChat/examples/training_scripts/train_dpo.py:147-158 | applications/ColossalChat/examples/training_scripts/train_grpo.py:125-136 | applications/ColossalChat/examples/training_scripts/train_kto.py:147-158 | applications/ColossalChat/examples/training_scripts/train_orpo.py:136-147 | applications/ColossalChat/examples/training_scripts/train_ppo.py:147-158 | applications/ColossalChat/examples/training_scripts/train_sft.py:151-162 \u2014 before extracting anything, compare \u0060applications/ColossalChat/examples/training_scripts/train_dpo.py\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_grpo.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/examples/training_scripts/train_dpo.py"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"02420697c24448eb7856a2f498667d7a671c9bc4cbc73d187b9ad5beefb29727"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 5): applications/ColossalChat/examples/training_scripts/train_dpo.py:246-256 | applications/ColossalChat/examples/training_scripts/train_kto.py:267-277 | applications/ColossalChat/examples/training_scripts/train_orpo.py:232-242 | applications/ColossalChat/examples/training_scripts/train_rm.py:244-254 | applications/ColossalChat/examples/training_scripts/train_sft.py:250-261 \u2014 before extracting anything, compare \u0060applications/ColossalChat/examples/training_scripts/train_dpo.py\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_kto.py\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 289 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/examples/training_scripts/train_dpo.py:246\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060applications/ColossalChat/examples/training_scripts/train_dpo.py:245\u0060 calls \u0060isinstance\u0060, \u0060set_start_index\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_sft.py:250\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/examples/training_scripts/train_dpo.py"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca227581b8e919427fbce463063a7aacc5a708d70ddcbeb5933d7257ed604fdf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 4): applications/ColossalChat/examples/training_scripts/train_dpo.py:161-172 | applications/ColossalChat/examples/training_scripts/train_kto.py:161-172 | applications/ColossalChat/examples/training_scripts/train_orpo.py:150-161 | applications/ColossalChat/examples/training_scripts/train_rm.py:160-171 \u2014 before extracting anything, compare \u0060applications/ColossalChat/examples/training_scripts/train_dpo.py\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_kto.py\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 289 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/examples/training_scripts/train_dpo.py"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c55e8812c8cbb4dff8db92ae7122054509b21fb0cf3ee2f28f635e5d47545ec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 4): applications/ColossalChat/examples/training_scripts/train_dpo.py:188-199 | applications/ColossalChat/examples/training_scripts/train_kto.py:210-221 | applications/ColossalChat/examples/training_scripts/train_orpo.py:177-188 | applications/ColossalChat/examples/training_scripts/train_rm.py:187-198 \u2014 before extracting anything, compare \u0060applications/ColossalChat/examples/training_scripts/train_dpo.py\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_kto.py\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 289 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060applications/ColossalChat/examples/training_scripts/train_rm.py:199\u0060 calls \u0060ceil\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_dpo.py:200\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/examples/training_scripts/train_dpo.py"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9af0d4471d9b4fec0ec384a6db3b5c177f1d24b440bf2860d53b9b0a277ffe8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 3): examples/images/vit/vit_benchmark.py:75-85 | examples/images/vit/vit_train_demo.py:178-188 | examples/language/opt/opt_train_demo.py:86-97 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/images/vit/vit_benchmark.py:75\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/vit/vit_benchmark.py"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"80e5a5662cfce5e4486027a7784bb2f612c0343bf723b3b2bb3759c930e221b0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): examples/language/deepseek/benchmark.py:111-122 | examples/language/llama/benchmark.py:97-108 | examples/language/mixtral/benchmark.py:91-102 \u2014 \u0060examples/language/deepseek/benchmark.py\u0060 and \u0060examples/language/llama/benchmark.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 10 separate duplicated blocks between them, totalling at least 150 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060examples/language/llama/benchmark.py:111\u0060 calls \u0060add_argument\u0060 and \u0060examples/language/deepseek/benchmark.py:125\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/language/deepseek/benchmark.py"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cda743c35a9aa29547b76781a8927bc988d68176d356286118a7cdab1b0f13a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): applications/ColossalChat/examples/training_scripts/lora_finetune.py:301-312 | applications/ColossalChat/examples/training_scripts/lora_finetune.py:339-350 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/examples/training_scripts/lora_finetune.py"},"region":{"startLine":301}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad7e988cbab35894d9d15601f21e5a98956f0b05c93594da44b55efa360e9fd2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): examples/images/vit/vit_benchmark.py:134-145 | examples/language/opt/opt_benchmark.py:123-134 \u2014 before extracting anything, compare \u0060examples/images/vit/vit_benchmark.py\u0060 and \u0060examples/language/opt/opt_benchmark.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/vit/vit_benchmark.py"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"d88f67cc21908b4f4995d0e391da473f18f9a4521f51f11fc56727c77d970882"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201312 lines \u00D7 2): examples/language/bert/benchmark.py:62-73 | examples/tutorial/new_api/glue_bert/finetune.py:112-121 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/language/bert/benchmark.py:62\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/language/bert/benchmark.py"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"3000031ddef139a1ba6f65b38eb04b492080a12179d17b0ea3b1297e7dfee585"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): examples/language/llama/benchmark.py:357-368 | examples/language/mixtral/benchmark.py:249-260 \u2014 \u0060examples/language/llama/benchmark.py\u0060 and \u0060examples/language/mixtral/benchmark.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 11 separate duplicated blocks between them, totalling at least 164 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/language/llama/benchmark.py"},"region":{"startLine":357}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee659f95bd77166fb0820956c958125e7b1a64bb24fca58f16c5256e6ff414d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201312 lines \u00D7 2): examples/language/opt/args.py:57-65 | examples/tutorial/opt/opt/run_clm.py:134-145 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/language/opt/args.py:57\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/language/opt/args.py"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed74efba574c9f84ab9dfecba44707332ee04cac80643e3c23faecacf0aff2fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): examples/tutorial/sequence_parallel/model/bert.py:83-94 | examples/tutorial/sequence_parallel/model/bert.py:210-221 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/tutorial/sequence_parallel/model/bert.py"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"abfc93ddfdedc9c5bc3445a5ba12925fc69d574c49c2c987e4ad1a2caa4cdf64"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 8): applications/ColossalChat/examples/data_preparation_scripts/prepare_dataset.py:179-189 | applications/ColossalChat/examples/training_scripts/train_dpo.py:146-155 | applications/ColossalChat/examples/training_scripts/train_grpo.py:124-133 | applications/ColossalChat/examples/training_scripts/train_kto.py:146-155 | applications/ColossalChat/examples/training_scripts/train_orpo.py:135-144 | applications/ColossalChat/examples/training_scripts/train_ppo.py:146-155 | applications/ColossalChat/examples/training_scripts/train_rm.py:137-146 | applications/ColossalChat/examples/training_scripts/train_sft.py:149-159 \u2014 before extracting anything, compare \u0060applications/ColossalChat/examples/training_scripts/train_dpo.py\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_grpo.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/examples/data_preparation_scripts/prepare_dataset.py:179\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/examples/data_preparation_scripts/prepare_dataset.py"},"region":{"startLine":179}}}],"partialFingerprints":{"codehealthFindingId/v1":"86f369cab43614c3dfdcafb657d500b22e39174efb235b8547277ac96b5aca58"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201311 lines \u00D7 7): applications/ColossalChat/examples/training_scripts/train_dpo.py:222-230 | applications/ColossalChat/examples/training_scripts/train_grpo.py:310-318 | applications/ColossalChat/examples/training_scripts/train_kto.py:243-251 | applications/ColossalChat/examples/training_scripts/train_orpo.py:207-216 | applications/ColossalChat/examples/training_scripts/train_ppo.py:355-363 | applications/ColossalChat/examples/training_scripts/train_rm.py:219-228 | applications/ColossalChat/examples/training_scripts/train_sft.py:226-236 \u2014 before extracting anything, compare \u0060applications/ColossalChat/examples/training_scripts/train_dpo.py\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_grpo.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/examples/training_scripts/train_orpo.py:207\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060applications/ColossalChat/examples/training_scripts/train_dpo.py:220\u0060 calls \u0060boost\u0060, \u0060set_default_dtype\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_orpo.py:207\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/examples/training_scripts/train_dpo.py"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"53945cf274f781aa6493d54ee27c655624fba2f3356ba505e94ee52ca05d204e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): applications/ColossalChat/examples/training_scripts/train_dpo.py:175-185 | applications/ColossalChat/examples/training_scripts/train_kto.py:197-207 | applications/ColossalChat/examples/training_scripts/train_orpo.py:164-175 | applications/ColossalChat/examples/training_scripts/train_rm.py:174-185 \u2014 before extracting anything, compare \u0060applications/ColossalChat/examples/training_scripts/train_dpo.py\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_kto.py\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 289 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/examples/training_scripts/train_dpo.py"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"082b59d12dfe1759173d323129faaf831234ebf0caff3c76f3e31cafc25da806"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): colossalai/shardformer/examples/convergence_benchmark.py:154-164 | examples/language/bert/finetune.py:115-125 | examples/language/gpt/hybridparallelism/finetune.py:111-121 | examples/tutorial/new_api/glue_bert/finetune.py:68-78 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 4 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/examples/convergence_benchmark.py"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8bb347277e7a9aaa3a58e20a1315d39cb0a18a3718e639b84f63fbaa029c710"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): colossalai/shardformer/examples/data.py:55-65 | examples/language/bert/data.py:54-64 | examples/language/gpt/hybridparallelism/data.py:54-64 | examples/tutorial/new_api/glue_bert/data.py:54-64 \u2014 before extracting anything, compare \u0060colossalai/shardformer/examples/data.py\u0060 and \u0060examples/language/bert/data.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060examples/language/gpt/hybridparallelism/data.py:65\u0060 calls \u0060getattr\u0060 and \u0060colossalai/shardformer/examples/data.py:66\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/examples/data.py"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2e08235f6b6fbcbe7ff304ed07f01c2f4521180ab72f897ec6a7b774fa840b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): examples/language/bert/benchmark.py:93-103 | examples/tutorial/new_api/cifar_resnet/train.py:142-152 | examples/tutorial/new_api/cifar_vit/train.py:162-172 | examples/tutorial/new_api/glue_bert/finetune.py:138-148 \u2014 \u0060examples/tutorial/new_api/cifar_resnet/train.py\u0060 and \u0060examples/tutorial/new_api/cifar_vit/train.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 8 separate duplicated blocks between them, totalling at least 136 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/language/bert/benchmark.py"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"e41b458a4ea9cd51259d336de8faf774f03d0b9d19f289ef5406e62fdaf9ddd5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): examples/images/dreambooth/train_dreambooth.py:497-507 | examples/images/dreambooth/train_dreambooth_colossalai_lora.py:539-549 | examples/images/dreambooth/train_dreambooth_inpaint.py:499-509 \u2014 before extracting anything, compare \u0060examples/images/dreambooth/train_dreambooth.py\u0060 and \u0060examples/images/dreambooth/train_dreambooth_colossalai_lora.py\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 425 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/dreambooth/train_dreambooth.py"},"region":{"startLine":497}}}],"partialFingerprints":{"codehealthFindingId/v1":"919ce3430e93ba5400a30e92800bf8b4a83b0b47e9161135602c2d62513e5c77"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): examples/images/vit/vit_benchmark.py:49-59 | examples/images/vit/vit_train_demo.py:140-150 | examples/language/opt/opt_benchmark.py:52-62 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/vit/vit_benchmark.py"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"55c70be8825da6546aa63b3f8901a54fc18ce23bfd64ffbc19c83e07953e5d88"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): examples/images/dreambooth/train_dreambooth.py:680-690 | examples/images/dreambooth/train_dreambooth_inpaint.py:717-727 \u2014 before extracting anything, compare \u0060examples/images/dreambooth/train_dreambooth.py\u0060 and \u0060examples/images/dreambooth/train_dreambooth_inpaint.py\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 499 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/dreambooth/train_dreambooth.py"},"region":{"startLine":680}}}],"partialFingerprints":{"codehealthFindingId/v1":"99ffd307ba0e76dc45b2f816e2a6d5bac83dd1aaf4dffce239bacc0a44dfcd75"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): examples/language/deepseek/benchmark.py:79-89 | examples/language/mixtral/benchmark.py:59-69 \u2014 \u0060examples/language/deepseek/benchmark.py\u0060 and \u0060examples/language/mixtral/benchmark.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 11 separate duplicated blocks between them, totalling at least 155 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/language/deepseek/benchmark.py"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"76f0163f0b4ab8c2b11e401915b33a17529d0e1cff9dcbb9ba8ec177b48a486d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): examples/language/gpt/hybridparallelism/benchmark.py:39-49 | examples/language/llama/benchmark.py:66-76 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/language/gpt/hybridparallelism/benchmark.py"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ef1c42b9f0787188a81f06ed811db0511e3742e98e658bcd05783c03e8c7cb3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): examples/language/gpt/titans/model/embed.py:113-123 | examples/language/gpt/titans/model/embed.py:458-468 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/language/gpt/titans/model/embed.py"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"411abf97f555693d3d9398b68ae9a9f173e142554642188738afef28b28aa1ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): examples/language/llama/benchmark.py:221-231 | examples/language/mixtral/benchmark.py:140-150 \u2014 \u0060examples/language/llama/benchmark.py\u0060 and \u0060examples/language/mixtral/benchmark.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 11 separate duplicated blocks between them, totalling at least 164 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/language/llama/benchmark.py:221\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/language/llama/benchmark.py"},"region":{"startLine":221}}}],"partialFingerprints":{"codehealthFindingId/v1":"17cb1105d398bf884d8157cec9909e041132a89309b2062e353d4f6741f3601f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 7): applications/ColossalChat/examples/training_scripts/train_dpo.py:250-259 | applications/ColossalChat/examples/training_scripts/train_grpo.py:351-360 | applications/ColossalChat/examples/training_scripts/train_kto.py:271-280 | applications/ColossalChat/examples/training_scripts/train_orpo.py:236-245 | applications/ColossalChat/examples/training_scripts/train_ppo.py:403-412 | applications/ColossalChat/examples/training_scripts/train_rm.py:248-257 | applications/ColossalChat/examples/training_scripts/train_sft.py:255-264 \u2014 before extracting anything, compare \u0060applications/ColossalChat/examples/training_scripts/train_dpo.py\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_grpo.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/examples/training_scripts/train_dpo.py:250\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/examples/training_scripts/train_dpo.py"},"region":{"startLine":250}}}],"partialFingerprints":{"codehealthFindingId/v1":"47e85ef41cec79ccc6dc7eb0f6825fa2cf5b05107b6f8ad026cb192928c4f7a4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): colossalai/shardformer/examples/data.py:69-78 | examples/language/bert/data.py:68-77 | examples/language/gpt/hybridparallelism/data.py:70-79 | examples/tutorial/new_api/glue_bert/data.py:68-77 \u2014 before extracting anything, compare \u0060colossalai/shardformer/examples/data.py\u0060 and \u0060examples/language/bert/data.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/examples/data.py"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"d23101564b9e6faf494f20f9cbb09b7ae3396a5fac4b868f39c5e17d06f664de"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): examples/images/dreambooth/train_dreambooth.py:416-425 | examples/images/dreambooth/train_dreambooth_colossalai.py:430-439 | examples/images/dreambooth/train_dreambooth_colossalai_lora.py:429-438 | examples/images/dreambooth/train_dreambooth_inpaint.py:442-451 \u2014 before extracting anything, compare \u0060examples/images/dreambooth/train_dreambooth.py\u0060 and \u0060examples/images/dreambooth/train_dreambooth_colossalai.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 401 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060examples/images/dreambooth/train_dreambooth_colossalai.py:440\u0060 calls \u0060info\u0060 and \u0060examples/images/dreambooth/train_dreambooth.py:426\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/dreambooth/train_dreambooth.py"},"region":{"startLine":416}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc648ce477a5f8c73ecd424795f65ecdd9254e724f0caa59fc1f336d65c8c83c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 3): applications/ColossalChat/examples/training_scripts/train_grpo.py:102-110 | applications/ColossalChat/examples/training_scripts/train_kto.py:136-145 | applications/ColossalChat/examples/training_scripts/train_orpo.py:125-134 \u2014 before extracting anything, compare \u0060applications/ColossalChat/examples/training_scripts/train_grpo.py\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_kto.py\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 162 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060applications/ColossalChat/examples/training_scripts/train_kto.py:135\u0060 calls \u0060disable_dropout\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_orpo.py:124\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/examples/training_scripts/train_grpo.py"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1da26e0edd4c266eda59ff231c0f3fb16adfb1b6058d824797a832e9adefa71"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): examples/language/deepseek/benchmark.py:193-202 | examples/language/llama/benchmark.py:292-301 | examples/language/mixtral/benchmark.py:195-204 \u2014 \u0060examples/language/deepseek/benchmark.py\u0060 and \u0060examples/language/llama/benchmark.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 10 separate duplicated blocks between them, totalling at least 150 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/language/deepseek/benchmark.py:193\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/language/deepseek/benchmark.py"},"region":{"startLine":193}}}],"partialFingerprints":{"codehealthFindingId/v1":"58b2c550fbefb8846897cbf4215a69a76eb2e04e51d38d921e27543a6afdc361"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): applications/ColossalChat/examples/training_scripts/train_grpo.py:277-286 | applications/ColossalChat/examples/training_scripts/train_ppo.py:314-323 \u2014 before extracting anything, compare \u0060applications/ColossalChat/examples/training_scripts/train_grpo.py\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_ppo.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 469 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/examples/training_scripts/train_grpo.py"},"region":{"startLine":277}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c0327559f5879e2edde124a6c0dc355a14171f60f84a27623e21f3352df06de"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): applications/ColossalEval/examples/dataset_evaluation/inference.py:195-204 | applications/ColossalEval/examples/gpt_evaluation/inference.py:184-193 \u2014 \u0060applications/ColossalEval/examples/dataset_evaluation/inference.py\u0060 and \u0060applications/ColossalEval/examples/gpt_evaluation/inference.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 8 separate duplicated blocks between them, totalling at least 194 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/examples/dataset_evaluation/inference.py"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f7ef566690523c4205929860a056a79416c2d80a3e9a8e3f111a451e27216a4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): examples/community/roberta/pretraining/model/bert.py:739-748 | examples/community/roberta/pretraining/model/deberta_v2.py:911-920 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/community/roberta/pretraining/model/bert.py"},"region":{"startLine":739}}}],"partialFingerprints":{"codehealthFindingId/v1":"23867cc357822ee4c94ccda81e8589feda39c11006d43570dec16a6a722dd77c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): examples/community/roberta/pretraining/model/bert.py:1639-1648 | examples/community/roberta/pretraining/model/deberta_v2.py:1583-1592 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/community/roberta/pretraining/model/bert.py"},"region":{"startLine":1639}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee9560a534cf2b8b0700703e141c185173d5bd2552b38a302ddaffec93a4b374"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): examples/images/dreambooth/train_dreambooth.py:593-602 | examples/images/dreambooth/train_dreambooth_inpaint.py:623-632 \u2014 before extracting anything, compare \u0060examples/images/dreambooth/train_dreambooth.py\u0060 and \u0060examples/images/dreambooth/train_dreambooth_inpaint.py\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 499 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060examples/images/dreambooth/train_dreambooth.py:604\u0060 calls \u0060train\u0060 and \u0060examples/images/dreambooth/train_dreambooth_inpaint.py:633\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/dreambooth/train_dreambooth.py"},"region":{"startLine":593}}}],"partialFingerprints":{"codehealthFindingId/v1":"72f169cf76ef4c2c36b5624866c3cbea7076fe2585976da66abe715255611428"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): examples/language/deepseek/benchmark.py:156-165 | examples/language/mixtral/benchmark.py:157-166 \u2014 \u0060examples/language/deepseek/benchmark.py\u0060 and \u0060examples/language/mixtral/benchmark.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 11 separate duplicated blocks between them, totalling at least 155 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/language/deepseek/benchmark.py:156\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/language/deepseek/benchmark.py"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"4182ceed4347eabf8b7b8e6f2a85b33d272330626129648dbc953643a4479bb2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 8): applications/ColossalChat/examples/training_scripts/train_dpo.py:253-261 | applications/ColossalChat/examples/training_scripts/train_grpo.py:354-362 | applications/ColossalChat/examples/training_scripts/train_kto.py:274-282 | applications/ColossalChat/examples/training_scripts/train_orpo.py:239-247 | applications/ColossalChat/examples/training_scripts/train_ppo.py:406-414 | applications/ColossalChat/examples/training_scripts/train_ppo.py:428-436 | applications/ColossalChat/examples/training_scripts/train_rm.py:251-259 | applications/ColossalChat/examples/training_scripts/train_sft.py:258-266 \u2014 before extracting anything, compare \u0060applications/ColossalChat/examples/training_scripts/train_dpo.py\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_grpo.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/examples/training_scripts/train_dpo.py"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7a0fab0ca41eb7ee8d2854cd8297dbe1428ac4fb5abc45205b35d5218f30728"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4): examples/images/dreambooth/train_dreambooth.py:612-620 | examples/images/dreambooth/train_dreambooth_colossalai.py:625-633 | examples/images/dreambooth/train_dreambooth_colossalai_lora.py:645-653 | examples/images/dreambooth/train_dreambooth_inpaint.py:657-665 \u2014 before extracting anything, compare \u0060examples/images/dreambooth/train_dreambooth.py\u0060 and \u0060examples/images/dreambooth/train_dreambooth_colossalai.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 401 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060examples/images/dreambooth/train_dreambooth_inpaint.py:668\u0060 calls \u0060cat\u0060 and \u0060examples/images/dreambooth/train_dreambooth.py:623\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/dreambooth/train_dreambooth.py"},"region":{"startLine":612}}}],"partialFingerprints":{"codehealthFindingId/v1":"10dd0304ccbf19694bdd59bf0256151ac91b08e799fbcab83267d247597af837"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4): examples/images/vit/vit_benchmark.py:75-83 | examples/images/vit/vit_train_demo.py:178-186 | examples/language/opt/opt_benchmark.py:69-77 | examples/language/opt/opt_train_demo.py:86-94 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/vit/vit_benchmark.py"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"59452e2c3244eed5991474a34f701f9a24c9494a6d1b727682543a1e2dd44b48"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): examples/images/vit/args.py:71-79 | examples/language/opt/args.py:22-33 | examples/language/opt/args.py:54-64 \u2014 before extracting anything, compare \u0060examples/images/vit/args.py\u0060 and \u0060examples/language/opt/args.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 115 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/images/vit/args.py:71\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060examples/images/vit/args.py:69\u0060 calls \u0060add_argument\u0060 and \u0060examples/language/opt/args.py:53\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/vit/args.py"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"f022f77cae2764bb692ec60344aeddff4f87374c63794d8e9acd9f65afb31306"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): applications/ColossalChat/examples/training_scripts/train_dpo.py:128-136 | applications/ColossalChat/examples/training_scripts/train_kto.py:130-138 \u2014 before extracting anything, compare \u0060applications/ColossalChat/examples/training_scripts/train_dpo.py\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_kto.py\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 289 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060applications/ColossalChat/examples/training_scripts/train_dpo.py:138\u0060 calls \u0060train\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_kto.py:140\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/examples/training_scripts/train_dpo.py"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9237acdf1596f3375e9fcb0851286303411994985e01d10ba9f11a5842e5358"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): applications/ColossalChat/examples/training_scripts/train_kto.py:127-135 | applications/ColossalChat/examples/training_scripts/train_orpo.py:118-125 \u2014 before extracting anything, compare \u0060applications/ColossalChat/examples/training_scripts/train_kto.py\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_orpo.py\u0060 as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 343 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/examples/training_scripts/train_kto.py:127\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/examples/training_scripts/train_kto.py"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"4003974d39116073ec5ff93d9c50499d0ce4fdb0b343538ab0f2061003b2ede6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): examples/community/roberta/pretraining/arguments.py:35-42 | examples/community/roberta/pretraining/arguments.py:64-72 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/community/roberta/pretraining/arguments.py:35\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/community/roberta/pretraining/arguments.py"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a99cdd6d2387fa9533ad03d2c46c2f2d78d8f47b3f19249eb1d5f90ba9a591d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): examples/images/dreambooth/train_dreambooth_colossalai.py:685-693 | examples/images/dreambooth/train_dreambooth_colossalai_lora.py:705-713 \u2014 before extracting anything, compare \u0060examples/images/dreambooth/train_dreambooth_colossalai.py\u0060 and \u0060examples/images/dreambooth/train_dreambooth_colossalai_lora.py\u0060 as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 757 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/dreambooth/train_dreambooth_colossalai.py"},"region":{"startLine":685}}}],"partialFingerprints":{"codehealthFindingId/v1":"57091da31544e0ab4be36d5bfd972e4e2be6c4e18dc58d2078c5283a8fb893ba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): examples/language/bert/benchmark_utils.py:63-71 | examples/language/bert/benchmark_utils.py:122-130 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/language/bert/benchmark_utils.py"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"52e381470a91ebfe3fc316f1f813b976db00e28ba7290dc9a03d8e9157ba2ba5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): examples/language/gpt/hybridparallelism/finetune.py:134-142 | examples/language/opt/opt_train_demo.py:35-42 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/language/gpt/hybridparallelism/finetune.py:134\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/language/gpt/hybridparallelism/finetune.py"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"fae89f780d13a60d12ccc28cd4c37d2404cc1572a1d771ade7b5cba10bb91c5b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 5): examples/language/deepseek/performance_evaluator.py:171-178 | examples/language/gpt/gemini/commons/performance_evaluator.py:171-178 | examples/language/llama/performance_evaluator.py:171-178 | examples/language/mixtral/performance_evaluator.py:171-178 | examples/language/performance_evaluator.py:171-178 \u2014 before extracting anything, compare \u0060examples/language/deepseek/performance_evaluator.py\u0060 and \u0060examples/language/gpt/gemini/commons/performance_evaluator.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 96 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/language/deepseek/performance_evaluator.py"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"3012db696f5c8b892152a69366ed9f4a7fe587f371a71e59f0392442f1d50f33"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): examples/images/dreambooth/train_dreambooth.py:645-652 | examples/images/dreambooth/train_dreambooth_colossalai.py:658-665 | examples/images/dreambooth/train_dreambooth_colossalai_lora.py:678-685 | examples/images/dreambooth/train_dreambooth_inpaint.py:693-700 \u2014 before extracting anything, compare \u0060examples/images/dreambooth/train_dreambooth.py\u0060 and \u0060examples/images/dreambooth/train_dreambooth_colossalai.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 401 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/dreambooth/train_dreambooth.py"},"region":{"startLine":645}}}],"partialFingerprints":{"codehealthFindingId/v1":"46195a153d8a5e666796a937aceb43397e616ef8b944c9da3c5896fa94712def"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): examples/language/deepseek/benchmark.py:291-299 | examples/language/llama/benchmark.py:388-395 | examples/language/mixtral/benchmark.py:280-287 \u2014 \u0060examples/language/deepseek/benchmark.py\u0060 and \u0060examples/language/llama/benchmark.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 10 separate duplicated blocks between them, totalling at least 150 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/language/deepseek/benchmark.py"},"region":{"startLine":291}}}],"partialFingerprints":{"codehealthFindingId/v1":"05598666d8fa5a0860fabac83761631a91aedb63b786f14aa6dbb6e027fbeb40"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): applications/ColossalEval/examples/dataset_evaluation/inference.py:205-212 | applications/ColossalEval/examples/gpt_evaluation/inference.py:195-202 \u2014 \u0060applications/ColossalEval/examples/dataset_evaluation/inference.py\u0060 and \u0060applications/ColossalEval/examples/gpt_evaluation/inference.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 8 separate duplicated blocks between them, totalling at least 194 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/examples/dataset_evaluation/inference.py"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"227dc311156f154d25b722932fcb345203d15b16d46c4a0607c2075089030774"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): examples/inference/benchmark_ops/benchmark_fused_rotary_embdding_unpad.py:58-66 | examples/inference/benchmark_ops/benchmark_rotary_embedding.py:43-50 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/inference/benchmark_ops/benchmark_fused_rotary_embdding_unpad.py"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b02c0cd5d2eead3d50420493464a38d8d4a993b0bb3ec9780da932954a540ff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): examples/language/gpt/titans/model/embed.py:66-73 | examples/language/gpt/titans/model/embed.py:412-419 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/language/gpt/titans/model/embed.py"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"82069f100111d16cbfc42dd1d47b4f700723cdaf16da5b57f17a7b78badea172"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20137 lines \u00D7 2): colossalai/shardformer/examples/convergence_benchmark.py:78-83 | examples/tutorial/new_api/glue_bert/finetune.py:202-208 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060colossalai/shardformer/examples/convergence_benchmark.py:78\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/examples/convergence_benchmark.py"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc63a870d9cbca4465f1248e55217107c11a8711d9b703d04d5b6d672c9aae90"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): examples/community/roberta/pretraining/model/bert.py:659-665 | examples/community/roberta/pretraining/model/deberta_v2.py:1188-1194 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/community/roberta/pretraining/model/bert.py"},"region":{"startLine":659}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2e8f26bba6d782590564ece55398e1dfdb4cd6182381279bcb4b48c71faa866"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 8): colossalai/shardformer/examples/data.py:99-104 | colossalai/shardformer/examples/data.py:110-115 | examples/language/bert/data.py:93-98 | examples/language/bert/data.py:102-107 | examples/language/gpt/hybridparallelism/data.py:94-99 | examples/language/gpt/hybridparallelism/data.py:103-108 | examples/tutorial/new_api/glue_bert/data.py:92-97 | examples/tutorial/new_api/glue_bert/data.py:101-106 \u2014 before extracting anything, compare \u0060colossalai/shardformer/examples/data.py\u0060 and \u0060examples/language/bert/data.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060colossalai/shardformer/examples/data.py:108\u0060 calls \u0060native_prepare_dataloader\u0060 and \u0060examples/language/bert/data.py:100\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/examples/data.py"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"89a341d211d4a6bc07c44b246c2d3763b59a941ce1879297864ca03a8ff290b6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): examples/language/deepseek/benchmark.py:91-96 | examples/language/gpt/hybridparallelism/benchmark.py:51-56 | examples/language/llama/benchmark.py:78-83 | examples/language/mixtral/benchmark.py:71-76 \u2014 \u0060examples/language/deepseek/benchmark.py\u0060 and \u0060examples/language/llama/benchmark.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 10 separate duplicated blocks between them, totalling at least 150 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060examples/language/deepseek/benchmark.py:97\u0060 calls \u0060add_argument\u0060 and \u0060examples/language/gpt/hybridparallelism/benchmark.py:57\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/language/deepseek/benchmark.py"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"17243458d47103de4b934671a2a13f2d0b81fe6361bb65eb7667e6ea7395d69b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): applications/ColossalChat/examples/training_scripts/train_dpo.py:140-145 | applications/ColossalChat/examples/training_scripts/train_kto.py:140-145 | applications/ColossalChat/examples/training_scripts/train_orpo.py:129-134 \u2014 before extracting anything, compare \u0060applications/ColossalChat/examples/training_scripts/train_dpo.py\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_kto.py\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 289 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060applications/ColossalChat/examples/training_scripts/train_dpo.py:138\u0060 calls \u0060train\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_kto.py:138\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/examples/training_scripts/train_dpo.py"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc8af65950fa16e0fb38d51c0b14d2c28e78eeaba9016a0b61dade703effaeb5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): examples/images/resnet/train.py:198-203 | examples/tutorial/new_api/cifar_resnet/train.py:198-203 | examples/tutorial/new_api/cifar_vit/train.py:218-223 \u2014 before extracting anything, compare \u0060examples/images/resnet/train.py\u0060 and \u0060examples/tutorial/new_api/cifar_resnet/train.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 158 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/resnet/train.py"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e3e46a5088293b021eeeb9dbb2c6fa2b05aaceddbc678e8333c4d2bd3547256"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): applications/ColossalQA/examples/webui_demo/RAG_ChatBot.py:23-28 | applications/ColossalQA/examples/webui_demo/RAG_ChatBot.py:121-126 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalQA/examples/webui_demo/RAG_ChatBot.py"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bfbd3a6ff125da407eb1b705243a2ebef15c9a0753d5b4ec25538d7291643a4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 5): applications/ColossalChat/examples/training_scripts/train_dpo.py:222-227 | applications/ColossalChat/examples/training_scripts/train_grpo.py:310-315 | applications/ColossalChat/examples/training_scripts/train_kto.py:243-248 | applications/ColossalChat/examples/training_scripts/train_ppo.py:355-360 | examples/language/gpt/hybridparallelism/benchmark.py:201-205 \u2014 before extracting anything, compare \u0060applications/ColossalChat/examples/training_scripts/train_dpo.py\u0060 and \u0060applications/ColossalChat/examples/training_scripts/train_grpo.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/examples/training_scripts/train_dpo.py"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3ad7b92c8319f33d269af4932bf5dc260d7a9ee65eaa9e215fcc09a6d9aa9a2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): examples/images/dreambooth/train_dreambooth.py:186-190 | examples/images/dreambooth/train_dreambooth_colossalai.py:199-203 | examples/images/dreambooth/train_dreambooth_colossalai_lora.py:202-208 | examples/images/dreambooth/train_dreambooth_inpaint.py:207-211 \u2014 before extracting anything, compare \u0060examples/images/dreambooth/train_dreambooth.py\u0060 and \u0060examples/images/dreambooth/train_dreambooth_colossalai.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 401 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/images/dreambooth/train_dreambooth.py:186\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060examples/images/dreambooth/train_dreambooth_colossalai.py:203\u0060 calls \u0060add_argument\u0060 and \u0060examples/images/dreambooth/train_dreambooth.py:190\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/dreambooth/train_dreambooth.py"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"763d75db618b551c4f00b0a67472b94781fabffa7462bf89eb6467508cd0ab6e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): examples/language/deepseek/benchmark.py:85-89 | examples/language/gpt/hybridparallelism/benchmark.py:45-49 | examples/language/llama/benchmark.py:72-76 | examples/language/mixtral/benchmark.py:65-69 \u2014 \u0060examples/language/deepseek/benchmark.py\u0060 and \u0060examples/language/llama/benchmark.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 10 separate duplicated blocks between them, totalling at least 150 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/language/deepseek/benchmark.py:85\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/language/deepseek/benchmark.py"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec823235067c9debdf00d658284cd8a38311fbbccd1e673163112ed6a0825f71"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): applications/ColossalChat/examples/community/peft/easy_dataset.py:198-202 | applications/ColossalChat/examples/community/peft/easy_dataset.py:208-212 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/examples/community/peft/easy_dataset.py"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b9d543e240bdfe44f7fca249110af94a1deb8eeda64e3c9ddb580a834e0135a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): applications/ColossalChat/examples/community/peft/train_peft_prompts.py:131-135 | applications/ColossalChat/examples/community/peft/train_peft_prompts.py:140-147 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applications/ColossalChat/examples/community/peft/train_peft_prompts.py:131\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/examples/community/peft/train_peft_prompts.py"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"a78da042b75dc009357da347df9e3af3f2fe3c435400839ef273b21e6724173c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): applications/ColossalEval/examples/dataset_evaluation/inference.py:260-264 | applications/ColossalEval/examples/gpt_evaluation/inference.py:243-247 \u2014 \u0060applications/ColossalEval/examples/dataset_evaluation/inference.py\u0060 and \u0060applications/ColossalEval/examples/gpt_evaluation/inference.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 8 separate duplicated blocks between them, totalling at least 194 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/examples/dataset_evaluation/inference.py"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f79bd902346b801654df37d4dea261ce862c6f9b1600e922f46a4cf91ad7be5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): examples/images/vit/args.py:82-86 | examples/language/opt/args.py:66-70 \u2014 before extracting anything, compare \u0060examples/images/vit/args.py\u0060 and \u0060examples/language/opt/args.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 115 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060examples/images/vit/args.py:79\u0060 calls \u0060add_argument\u0060 and \u0060examples/language/opt/args.py:63\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/vit/args.py"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"ede51848fd7849abd9d397e3ce4583ec9d63cb06b842d074f21d7764221d3de0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): examples/language/bert/finetune.py:55-59 | examples/language/gpt/hybridparallelism/finetune.py:52-56 \u2014 before extracting anything, compare \u0060examples/language/bert/finetune.py\u0060 and \u0060examples/language/gpt/hybridparallelism/finetune.py\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 242 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/language/bert/finetune.py"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d6b3ba3ce24529e17c21ba697265722eed5694a98805dc141e0e12334f0b3c1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): examples/language/commons/utils.py:6-12 | examples/language/gpt/gemini/commons/utils.py:8-27 \u2014 before extracting anything, compare \u0060examples/language/commons/utils.py\u0060 and \u0060examples/language/gpt/gemini/commons/utils.py\u0060 as WHOLE FILES: 87% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/language/commons/utils.py"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"234b69390bbf88094b8f1ff08e76f9e725055a80fbc503323ee2325f4239b1cb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): examples/community/roberta/pretraining/model/bert.py:433-438 | examples/community/roberta/pretraining/model/deberta_v2.py:303-308 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/community/roberta/pretraining/model/bert.py"},"region":{"startLine":433}}}],"partialFingerprints":{"codehealthFindingId/v1":"2aba0bab02f6ad4b18c5772c933bce664b63d1007769142516a5ec412b3c48f5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): examples/images/dreambooth/train_dreambooth.py:337-343 | examples/images/dreambooth/train_dreambooth_colossalai.py:364-370 | examples/images/dreambooth/train_dreambooth_colossalai_lora.py:363-369 | examples/images/dreambooth/train_dreambooth_inpaint.py:356-362 \u2014 before extracting anything, compare \u0060examples/images/dreambooth/train_dreambooth.py\u0060 and \u0060examples/images/dreambooth/train_dreambooth_colossalai.py\u0060 as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 401 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/dreambooth/train_dreambooth.py"},"region":{"startLine":337}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb3f1421eeb5bfc7ce358cd7aad6281a4c84c293851b7c4ba9cc14d78d952368"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): examples/images/vit/vit_benchmark.py:18-24 | examples/language/bert/benchmark_utils.py:21-27 | examples/language/opt/opt_benchmark.py:24-30 \u2014 before extracting anything, compare \u0060examples/images/vit/vit_benchmark.py\u0060 and \u0060examples/language/opt/opt_benchmark.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060examples/language/opt/opt_benchmark.py:20\u0060 calls \u0060require_version\u0060 and \u0060examples/images/vit/vit_benchmark.py:14\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/vit/vit_benchmark.py"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9859353ad528b882d91cbe953ea072e6244f0aaad6f835f645888e4f827f476"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 5): examples/language/deepseek/performance_evaluator.py:23-36 | examples/language/gpt/gemini/commons/performance_evaluator.py:23-36 | examples/language/llama/performance_evaluator.py:23-36 | examples/language/mixtral/performance_evaluator.py:23-36 | examples/language/performance_evaluator.py:23-36 \u2014 before extracting anything, compare \u0060examples/language/deepseek/performance_evaluator.py\u0060 and \u0060examples/language/gpt/gemini/commons/performance_evaluator.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 96 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/language/deepseek/performance_evaluator.py"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fdac3363dfb8380af757d618efa89a13333bb0e23f7fd9e43b814522d92fe10"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): examples/language/gpt/gemini/train_gpt_demo.py:82-86 | examples/language/palm/train.py:94-98 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/language/gpt/gemini/train_gpt_demo.py"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b21efd175b1f380f380371d7ffc170b8bea604ccf49088d0332b76df97400ca"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: WorkerBase (LCOM4 9): WorkerBase\u0027s methods fall into 9 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 9 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/pipeline/rpc/_pipeline_base.py"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"46ed19feadec102522485d26f08fe39affd36eb7d5f37381ae00343191f6e630"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: HybridParallelModule (LCOM4 7): HybridParallelModule\u0027s methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/plugin/hybrid_parallel_plugin.py"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"332a589e5391a6d2aad6ae2a801724aba7a75b153b7c6cabe0920ef6035ff0db"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: CheckpointIO (LCOM4 4): CheckpointIO\u0027s methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/checkpoint_io_base.py"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"37310889b68426e57bdcca225eb278f4863116058c44a91937f54685dbbc3344"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: ZeroBubbleVPipeScheduler (LCOM4 4): ZeroBubbleVPipeScheduler\u0027s methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/pipeline/schedule/zero_bubble_pp.py"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8c3022968b813fc6e06705b5648f75aeea9ce2e6cb7a7b2bb1165ec2231f15d"}},{"ruleId":"D14","level":"error","message":{"text":"Banned license: contexttimer: \u0060contexttimer\u0060 0.3.3 is published on PyPI under \u0060GPL-3.0\u0060, which this policy bans, and it is in the SHIPPED closure of this repository \u2014 so it is installed by everything that depends on this repository, not just by its test environment. A distribution offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package, or record an accepted exception."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"d9b825a08039ef5b39e288c385cd7f9156602bebdac4d35d1544d8c568db38b9"}},{"ruleId":"D14","level":"error","message":{"text":"Banned license: fuzzywuzzy: \u0060fuzzywuzzy\u0060 0.18.0 is published on PyPI under \u0060GPL-2.0\u0060, which this policy bans, and it is in the SHIPPED closure of this repository \u2014 so it is installed by everything that depends on this repository, not just by its test environment. A distribution offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package, or record an accepted exception."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"f04c3662050c4a87737c0760abe66553d3b8268f06c4667c581d95b7f8c81a15"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: colossalai/lazy/pretrained.py: colossalai/lazy/pretrained.py changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 50 in pretrained.new_from_pretrained at line 36. 1 of those changes was a fix/bug commit, and the other 2 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-07-24..2026-10-22, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-24 17:37:07 \u002B08:00\u0027 --until=\u00272026-10-22 17:37:07 \u002B08:00\u0027 --full-history --no-merges -- colossalai/lazy/pretrained.py\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/lazy/pretrained.py"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d6e9ef4352c80ef3cd30ad56abe6745a1d2474eb9fcd38db95e232a4ec0ac13"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: colossalai/shardformer/policies/command.py: colossalai/shardformer/policies/command.py changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in CommandPolicy.module_policy at line 38. 1 of those changes was a fix/bug commit, and the other 2 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-07-24..2026-10-22, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-24 17:37:07 \u002B08:00\u0027 --until=\u00272026-10-22 17:37:07 \u002B08:00\u0027 --full-history --no-merges -- colossalai/shardformer/policies/command.py\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/command.py"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"c709a6b9198373c19d806db95abfad489e4c596f043fefe3df53ccc9c08af881"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py: colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in hybrid_parallel_checkpoint_io._route_padded_parameter_aliases at line 59. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-24..2026-10-22, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-24 17:37:07 \u002B08:00\u0027 --until=\u00272026-10-22 17:37:07 \u002B08:00\u0027 --full-history --no-merges -- colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2f46be4f64669080099a9c37e6feaca8d58e78289cf3733856933fefed89f97"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #1: If anonymized user #1 becomes unavailable, 2 significant file(s) lose their only recent owner: colossalai/shardformer/modeling/chatglm2_6b/modeling_chatglm.py, colossalai/shardformer/modeling/chatglm2_6b/configuration_chatglm.py. Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"98119e891aaa338dae29812a858302b47b0ffa86998c3f275fa8b4baf4d0067a"}},{"ruleId":"D16","level":"note","message":{"text":"Further sole-owners (lower concentration): 1 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold \u2014 folded into the bus-factor score and metrics (5 single-owned of 599 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 599 of the 1024 production source files in this repository met that bar). They are anonymized user #2 (2 file(s)) \u2014 spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: applications/ColossalChat/coati/distributed/zero_bubble/producer.py, applications/ColossalChat/rl_example_zero_bubble.py."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6eac528f2429e724e1a97ed868f79eefbcf1888dab4af9a9e673429369bb5b2f"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: ChatGLMModel output is [S, B, H], merging batch of pipeline is wrong \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_shardformer/test_model/test_shard_chatglm2.py"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e5bd36dfa47f1c9c41ad08e31e35a1d20050f2feb3e064f49e82d2ed043b52b"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO he precision in weight checking is too significant. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_shardformer/test_model/test_shard_t5.py"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"498fdf307bba718162ed78bf9168a59ff654a7e12395b96f7b58ffba8d5ca692"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: num_microbatch size = 2 inf loss \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_shardformer/test_model/test_shard_vit.py"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba0a751b642b2bb8525379724f00532f895d6fcaa530f518159018c494bfdd59"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: fix bug when settign lazy_init for Conv2D Layers in ViT models \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_shardformer/test_model/test_shard_vit.py"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5fc32641d3ea38485b550d989c6a0a8426192854edc62259ea8442d310168bd"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO fix WhisperForConditionalGeneration enable jit fused operato \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_shardformer/test_model/test_shard_whisper.py"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"9744096dc514cc38cd11c26a4cbe6dd086bcd4b5ae19210d096d41235b4ae5a3"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO\uFF08jianghai) fix fp16 \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_shardformer/test_model/test_shard_whisper.py"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"42d2b391561c192ee5335e1291427eeb1d9276efbf3f91af83753b4d43c58fe6"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Support MixtralForCausalLM \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_pipeline/test_schedule/test_zerobubble_pp.py"},"region":{"startLine":790}}}],"partialFingerprints":{"codehealthFindingId/v1":"6675a02ae337b68a64df2101c4f41e0856c35a0c67cabe0941c4af3f5e0eee04"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Support MixtralForCausalLM \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_pipeline/test_schedule/test_zerobubble_pp.py"},"region":{"startLine":948}}}],"partialFingerprints":{"codehealthFindingId/v1":"24d15ffb350309de6f6a876540a2be5359c176161b1d6c88c9f0a8d9b18b880d"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO \u0022exp_avg_sq_col\u0022, \u0022exp_avg_sq_row\u0022, \u0022exp_avg_sq\u0022 \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_optimizer/_utils.py"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"63d6402cfb8b3bb7a530a5b392d14e80d76c8b67cc60ed515e4a11f9c7f1c63c"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: this case may cause shape mismatch @duanjunwen \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_optimizer/_utils.py"},"region":{"startLine":268}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f306188ac46d4bb0921dfba097535a02096bf68e391be61e353666ca0408053"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: some sharding checks are currently buggy, but the state values should match \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_optimizer/_utils.py"},"region":{"startLine":300}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f7d59bfc3df556c59418813f1766a42841eb897bacabcffd62e904c842b9444"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # @duanjunwen TODO: fix this test case. Currently params are sharded but are not dtensor here, throwing an error. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_optimizer/test_dist_adafactor.py"},"region":{"startLine":395}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d8cf273d3571b425b943cd200054a35ebceffe85d288bfb21a1ecbb39ac7a07"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: error in layer: \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_optimizer/test_dist_came.py"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"b124f397f596b763fc28c521e0db5b25ee269db6c4174a40f0a5bc5e3981876c"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: err here; backward diff gard; Only transformers_bert pass; \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_optimizer/test_dist_came.py"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3b20545d81993e1ab0bebf2b6465da165ae8c349297d1405429c81f99ceb8b5"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: model \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_optimizer/test_dist_came.py"},"region":{"startLine":317}}}],"partialFingerprints":{"codehealthFindingId/v1":"0709035f15fbc717b71f9386d5d6f1145d1612df1da0451d57e77bed11f82255"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # err in TODO layer \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_optimizer/test_dist_came.py"},"region":{"startLine":349}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a2847c87f3d78edda0d68a419a5ff86ce78ff5364480565bc9be0f71202a063"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO Something wrong with ci when running this test. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_optimizer/test_nvme.py"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"ede8fde800c95929d8d7adb4e5447e578eb5b1112f1ab9561c25c8bf39fb9561"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO check sharded and sliced moe \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_moe/test_moe_ep_tp.py"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"982566d1aa9c893baaec0ea3eb394f4937798b1daf3ef97614e19fc88b5f77a1"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO check sharded and sliced moe \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_moe/test_moe_ep_tp.py"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"72baeafd9a736af5f039b64c5d16354fe62a8518a371f84d5a98eb27174a898c"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: high atol, check if bug exists \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_legacy/test_moe/test_moe_load_balance.py"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"8feebfdd363fc6df2919901a190154e7cdeb6d0c1a42b4d8fc81f5da70737c66"}},{"ruleId":"D17","level":"warning","message":{"text":"FixmeComment: # FIXME: test bert \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_legacy/test_engine/test_engine.py"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc36870de005fc8347fce68302cdbf10882594f9130c22c2e8ba41c8cdab2f32"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(ver217): lazy init does not support weight norm, skip these models \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_lazy/test_models.py"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"43ec2aeeec5f248395f9915f1c8671b778dc0e59c235a503db83e258f5d0c98d"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: fix the test \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_infer/test_rpc_engine.py"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebf4dfcd0f9040921b2598d1438bd3fc5bdeed160322f0a685c4f59a7a5ce802"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(yuanheng-zhao): Since the alibi kernel is pretty similar to the original one, \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_infer/test_kernels/triton/test_context_attn_unpad.py"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"682b925670028848e50b9c583d3df2d627af3911dda1eeaf38e23190af27b3dd"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(yuanheng-zhao): Since the alibi kernel is pretty similar to the original one, \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_infer/test_kernels/triton/test_decoding_attn.py"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"5011c9f535ed2af1ab58dfa9836e0cfbe85a3cddc532809e5d743403ddffe263"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(yuanheng-zhao): Since the alibi kernel is pretty similar to the original one, \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/context_attn_unpad.py"},"region":{"startLine":607}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5e792d5ec3c5333f5026427a768501a1363f0cbfcac389ad4bf8cfa5074e951"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(yuanheng-zhao): Since the alibi kernel is pretty similar to the original one, \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/flash_decoding.py"},"region":{"startLine":418}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b6507345d5e078693fd84936301c0fa1986b1753ba4f5a8628bcd2452c78e11"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: We could handle this case by hijacking torch.Tensor.to function. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_fx/test_tracer/test_torchaudio_model/test_torchaudio_model.py"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"493a619a61b846f7a9150ca5899db0231731e06f1a51b496f9346579bd3a59f5"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: support the following models \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_fx/test_tracer/test_timm_model/test_timm_model.py"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"89fbe283a827f7981bf0d9b9120e0449872030a26dd2d6d3121298d2697c8b5d"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: support the following models \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_fx/test_tracer/test_hf_model/test_hf_albert.py"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca8f5ec39e1c10d7b9da6374c155e56bbbc716ff07467c0f42139252e92a4534"}},{"ruleId":"D17","level":"warning","message":{"text":"FixmeComment: # FIXME(ver217): timm/models/convit.py:71: in forward \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_fx/test_tracer/test_timm_model/test_timm_model.py"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"38986d8b898159264b56abb4cb3456fb8837add6f767600fad8818dbf031d842"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(ver217): support the following models \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_fx/test_tracer/test_hf_model/test_hf_gpt.py"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"1209fd4ce610ddef2ea592b441c79972f3284146be007e67b4b7b8bf36332d2b"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(ver217): this test is strictly relies on hardware, temporary skip it \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_cluster/test_device_mesh_manager.py"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"7639813a81d072af0e1687e1913c28ab6585cd7320db778ad4d90ce0b9192749"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(ver217): other configs lead to hang \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_checkpoint_io/test_hybrid_parallel_plugin_checkpoint_io.py"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"37fe5fb9fd840dfcf4080baf55955b057ae140ec74369aa7f2d8208fddf2fa48"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(ver217): add more models \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_booster/test_plugin/test_3d_plugin.py"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ffaa9b39bad192ff9d6750432c573de3f9375cfe79c74416c6b498abfe040e3"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(ver217): CI does not support lazy now \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_booster/test_plugin/test_gemini_plugin.py"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"646f5b47decc9463d7f4eedf7d51f82c0e59e781b87c539c15fa2072707ef691"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO check why does the model fail to run using Gemini \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_booster/test_plugin/test_gemini_plugin.py"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4234841534be25a1d7e07fcb3b0a5da8efdf0229080e75d3c25b2f4f7f546b1"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO check why falcon fails to run Gemini \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_booster/test_plugin/test_gemini_plugin.py"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"1afead3bf8e2e361cac3f5e7a2206d52abe53069e9431fa030934a93b33e5551"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO debug blip2 when using tp, something wrong with shift_logits\u0027s shape \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_booster/test_plugin/test_gemini_plugin.py"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"e13f3d177d53e3c0317460920601398b6333c07a337266c9451e74bea42f261f"}},{"ruleId":"D17","level":"warning","message":{"text":"FixmeComment: # FIXME(ver217): fix these models \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_booster/test_plugin/test_low_level_zero_plugin.py"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fccd506aead7718f6b0938ff2edbe189f30a29769fd70a7fc7eef6cf64f4deb"}},{"ruleId":"D17","level":"warning","message":{"text":"FixmeComment: # FIXME(ver217, oahzxl): implement full op \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_autochunk/test_autochunk_transformer/test_autochunk_gpt.py"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c4fba1bb3f3f605e6fcc00d32e6ee2ff555e544ca8db1888edda701e78b6d34"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: add sync bn strategies after related passes ready \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_auto_parallel/test_tensor_shard/test_node_handler/test_batch_norm_handler.py"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"e61d8a1ddecccb8c0fb97cc629180ebc273a7602f5e0dff86c47c39c85f5a736"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: test sync bn after the implicit runtime pass completed \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_auto_parallel/test_tensor_shard/test_node_handler/test_batch_norm_handler.py"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"d896a8d91771feae716f76bb846cd824405726bcf3967eb5d67c85fbf9530cc2"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: the rng state need to be fixed for distributed runtime \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/test_auto_parallel/test_tensor_shard/test_gpt/gpt_modules.py"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"1779cc60b152d4467dc42755f1704d8804e33de7b4d6d800df183a79174d09a1"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO The loss and gradient check in the test are failing, to be fixed. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/kit/model_zoo/transformers/opt.py"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf5956b2c32b6d06dd9e33ba9f75bcede59a15c8cc4edbdc9a3e6ee8bf1132e1"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: will need to register fake impl of aten::_unique2 to make it work (torch==2.5.1) \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/kit/model_zoo/timm/timm.py"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"c85ff0637cefc31b30b6a6dbaa56f0b5d2447b314e5c627d595a5833d0267416"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: remove this after updating openmoe example \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"extensions/pybind/flash_attention/__init__.py"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"a64555ec7142aab7cd4c4e2c02ac4d58e51d943776ec822d8b47da59344fddca"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: remove this after updating openmoe example \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/openmoe/model/modeling_openmoe.py"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b8f75429a606982b224275bbe72bdc6087549d66290b01a82ba7ea351fce182"}},{"ruleId":"D17","level":"warning","message":{"text":"HackComment: # Hack just to make this work, can optimizer later if necessary \u2014 a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/tutorial/sequence_parallel/data/datasets/indexed_dataset.py"},"region":{"startLine":243}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a0795b1f3365d94a3f7758dc275306e5303606bc26545844dfc4e93643c71ef"}},{"ruleId":"D17","level":"warning","message":{"text":"FixmeComment: # FIXME(ver217): gemini is not supported resnet now \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/tutorial/new_api/cifar_vit/train.py"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c02e305c958aa4be763fa2fd5a60a46ee278a787a6d7112e5ecfc87cd6c7989"}},{"ruleId":"D17","level":"warning","message":{"text":"FixmeComment: # FIXME(ver217): gemini is not supported resnet now \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/tutorial/new_api/cifar_resnet/train.py"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4ffb110ee280a089551b2b99ab7b4f840a65138d836f240ebff0bb5cc16271c"}},{"ruleId":"D17","level":"warning","message":{"text":"FixmeComment: # FIXME(ver217): gemini is not supported resnet now \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/resnet/train.py"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"4798414f93160c59a095ea69e8c14562900df5df5524b4c0685b20f38d63d9da"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/language/palm/train.py"},"region":{"startLine":232}}}],"partialFingerprints":{"codehealthFindingId/v1":"37387563e8358c2f0930e7dd9474324fdfade35afda6ef879cfe34f6e1a09a5c"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/pipeline/schedule/v_schedule.py"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb01324c76d9bb0543ff0d2229d1893623520348c78cd95f76da49a4c73397d1"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO (patil-suraj): Remove this check when gradient accumulation with two models is enabled in accelerate. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/dreambooth/train_dreambooth.py"},"region":{"startLine":358}}}],"partialFingerprints":{"codehealthFindingId/v1":"31d58e407be57054d53f0a61c642a38dfa95507bb2a02524c73c821c876e68c6"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO (patil-suraj): Remove this check when gradient accumulation with two models is enabled in accelerate. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/images/dreambooth/train_dreambooth_inpaint.py"},"region":{"startLine":378}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc6aa92750af8b7f32f1d9540475e7865f283676175c02be26172b714984f1cb"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: fit fp8 communication \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/low_level/low_level_optim.py"},"region":{"startLine":619}}}],"partialFingerprints":{"codehealthFindingId/v1":"086ccb1f76470e835a5a9878a3d307e08c66cc15193a71609da7d12ef06182b2"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO better of of doing this \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/low_level/low_level_optim.py"},"region":{"startLine":710}}}],"partialFingerprints":{"codehealthFindingId/v1":"e554d5e82e0d049390c87169dbd56a771edf48624a17367b0d3e7ec49d849b1e"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: fit fp8 \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/low_level/bookkeeping/tensor_bucket.py"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"f71210169732c855fcc0d3089685623cd30b579cc9102db2a16b16733a260fdc"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(ver217): support dtensor here \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/gemini/chunk/search_utils.py"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fff061918b103c58c375540eeace47910681d1fbe8be7392343ba3b09652d50"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: add NPU support \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/utils/memory.py"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c039bd3b54e8a42d352f7baa502dbb37003b04102d80f7d226f1b8696a11f24"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO : add lock to prevent conflict \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/utils/rank_recorder/rank_recorder.py"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"286b512839dfbde36d2623848f7ed7f21bd0a36d9235251551fff80ad457b110"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(jzy) we don\u0027t support object reflection now. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/tensor/colo_parameter.py"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"c06662e9b926dd63d6d3dde5ef9b91a21902703f68bc52b67ef96be8eb901594"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: shape consistency option is not implemented yet \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/tensor/shape_consistency.py"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b2d35da7f18bdedc6ff172c27e5a239df073e764f76a082b1a1cf1eedb00a59"}},{"ruleId":"D17","level":"warning","message":{"text":"HackComment: # hack some tensor methods \u2014 a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/tensor/d_tensor/api.py"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"99d00c868285fa81603c628fda720e8eb9b466fa3da353d785e84a725b6002b5"}},{"ruleId":"D17","level":"warning","message":{"text":"HackComment: # hack some tensor methods \u2014 a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/tensor/d_tensor/api.py"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0e025dee3af47e57569ced3a0884a0d8c3d7f72ee3c8bee178f98d295cb297c"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: layout converter option is not implemented yet \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/tensor/d_tensor/layout_converter.py"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1ae8d02eb067effedc5751b16c44c5738775199f9b8af6df01e8b2c1f9414b0"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: prevent casting to fp32 \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_deepseek_v3_tf4.py"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"57970bdf9f82a914302706a6480d339aa8b1463e12ddb6c2aa733af8634e7eb1"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: prevent casting to fp32 \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_deepseek_v3_tf5.py"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"9fea44956759b09a2a52d27288987a3b3a94e2de20bc92f23f7a557deab5a89c"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: assign pg mesh from plugin to all modules \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_mixtral_tf4.py"},"region":{"startLine":377}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cecdc58899fe6f1064817e6ab8c683ee611019ee8234edfb31e334bde91e90f"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: assign pg mesh from plugin to all modules \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_mixtral_tf5.py"},"region":{"startLine":404}}}],"partialFingerprints":{"codehealthFindingId/v1":"744b26691bb21d684d17a8f170a3afb11b604da38da91920e5f61f6c093a4c52"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: assign pg mesh from plugin to all modules \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/deepseek.py"},"region":{"startLine":384}}}],"partialFingerprints":{"codehealthFindingId/v1":"c892d2117f407bdeff499399008147d343be307b3ea2bdee58e6cc5b269e188e"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO using the jit fused add_and_dropout affect the accuracy \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_whisper_tf4.py"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"aaf504cfd0c3da78354255dcb299ae18f78e17b525fd12ccc512e8df4adb1e8d"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO using the jit fused add_and_dropout affect the accuracy \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_whisper_tf5.py"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"98e1aae209500b7c7d467308a48e67cb75f75d84225f8febb805b753a08d50e3"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO:(Jianghai) We divide encoder and decoder layers into different parts here, \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_whisper_tf4.py"},"region":{"startLine":641}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e29ede2b01b9730abc0a18c6dc7c651398f8614a7ac35587d275a6bf144e14e"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO:(Jianghai) We divide encoder and decoder layers into different parts here, \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_whisper_tf4.py"},"region":{"startLine":671}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae305fb3ad38b8c7984e458ff31c4ca27534e1ce973b9498fd82da9865746e7f"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO:(Jianghai) We divide encoder and decoder layers into different parts here, \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_whisper_tf5.py"},"region":{"startLine":628}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1204064c8b9c7b5fdf7a6381ef26dc477d0c639cb3b421f6cbff9ce8a8b283e"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO:(Jianghai) We divide encoder and decoder layers into different parts here, \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/_whisper_tf5.py"},"region":{"startLine":658}}}],"partialFingerprints":{"codehealthFindingId/v1":"a60e68a6dda930901402f87a959b47874f154b67bd47bd554542b9a06c556b14"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(jianghai): add explaination of the output here. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"04d9355ec8bd1b5aaeaaf8ed89590d1cfa6b5328b6b89c2b5d4bd41945e83acc"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(jianghai): add explaination of the output here. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf5.py"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbb104557ec692df744df7c5dc011152bb06ca3f13dfce56686947fc0c2aeae3"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment repeated across 15 files: The identical TodoComment appears in 15 files (31 occurrences) \u2014 almost certainly one boilerplate line from a single migration or decision, not 31 independent debts. Fix the systemic cause once rather than file-by-file. Text: \u0022# TODO(jianghai): left the recording kv-value tensors as () or None type, this feature may be added in the future.\u0022. Source code is not a task system: track the cleanup where tasks live. (Every occurrence still counts toward the score and metrics.)"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"5dcc261b0c615f97b8d00acf1b2c701efc446dfb6d6afd8606b10e9297b8264f"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(jianghai) left the recording kv-value tensors as () or None type, this feature may be added in the future. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf4.py"},"region":{"startLine":307}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe24b9f06187a6fa702bd2b8f98bdbf338a418601b398ce18d7377378dcf95f0"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(jianghai) left the recording kv-value tensors as () or None type, this feature may be added in the future. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_bert_tf5.py"},"region":{"startLine":320}}}],"partialFingerprints":{"codehealthFindingId/v1":"b43f512161e2c52ebc231b53975e1c8952605e3abb5645b4eb48fe5b113c5ec9"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: We can replace \u0060gradient_checkpointing_enable\u0060 fn and initialize a gradient_checkpointing (List[bool]) for each layer \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_llama_tf4.py"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb7211086783f1e517b20dc8c3435769268cd83f34a1a78c83dae4e2f224ae3c"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: We can replace \u0060gradient_checkpointing_enable\u0060 fn and initialize a gradient_checkpointing (List[bool]) for each layer \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_llama_tf5.py"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4f1b10e8334c4f405df5be29563bf8ef6341dc8629e8b7f52dffb86ab7f87bb"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: We can replace \u0060gradient_checkpointing_enable\u0060 fn and initialize a gradient_checkpointing (List[bool]) for each layer \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen2_tf4.py"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"713b05ba911527ab9eef0785fd2f49919332ace85144f9f5768e7da9c3c86b15"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: We can replace \u0060gradient_checkpointing_enable\u0060 fn and initialize a gradient_checkpointing (List[bool]) for each layer \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen2_tf5.py"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"d41adec662df52769cd86e21b1f14f515b9c557d10ebb16bd65a0bef4ceae061"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: We can replace \u0060gradient_checkpointing_enable\u0060 fn and initialize a gradient_checkpointing (List[bool]) for each layer \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen3_tf4.py"},"region":{"startLine":189}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b32e164b51074648ab847318067d3f22d8d622d41fba6b836e0545fa5f628be"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: We can replace \u0060gradient_checkpointing_enable\u0060 fn and initialize a gradient_checkpointing (List[bool]) for each layer \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen3_tf5.py"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb48bca996f6f6d1c2238f469e987376543a1b14d5014eff6fed37e6c3f521f6"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: We can replace \u0060gradient_checkpointing_enable\u0060 fn and initialize a gradient_checkpointing (List[bool]) for each layer \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/command.py"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e5eb0d66423f0a4698737b9d340e2f0bf53fc51e97dd110f34a0ef934ce72f8"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: We can replace \u0060gradient_checkpointing_enable\u0060 fn and initialize a gradient_checkpointing (List[bool]) for each layer \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/mistral.py"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed38be1bf5e9cdb6e7087839d689a5a5a04a5bac4f526de113b3fa28c3daa022"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: better init \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_mixtral_tf4.py"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"e88aeb4aa654330d52c1aa4cbf91827d17fb262e2f193d3d78d8a0870083fe15"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: better init \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_mixtral_tf5.py"},"region":{"startLine":423}}}],"partialFingerprints":{"codehealthFindingId/v1":"df000de8bc4c23421d7d7cda78de2025e584653199f21f9b008be36d61abf3ed"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(FoolPlayer): maybe have a cleaner way to cast the input (from \u0060ImageProcessor\u0060 side?) \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_vit_tf4.py"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"927359489ac9e8af8c3588b8237aeadac229faea8fab33e3372edd8966acf19d"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: left the recording kv-value tensors as () or None type, this feature may be added in the future. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_whisper_tf4.py"},"region":{"startLine":888}}}],"partialFingerprints":{"codehealthFindingId/v1":"663ec97839817ef68a64d416d505d363c0dd69157e0307d2a82401653da64723"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: These transpose are quite inefficient but Flash Attention requires the layout [batch_size, sequence_length, num_heads, head_dim]. We would need to refactor the KV cache \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/deepseek.py"},"region":{"startLine":653}}}],"partialFingerprints":{"codehealthFindingId/v1":"a185b369a98cad680ddce0717c8c9384793cadfd5919be6efb140260498e06ce"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: upgrade transformers to 4.44.0 to fix the bug, remove the hard code. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/deepseek.py"},"region":{"startLine":764}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd54e8fc2ee8ef28aa7f81c81df29b0fb595abf9ef9c93ef1fdc0ae46b34cd63"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(baizhou): left the recording kv-value tensors as () or None type, this feature may be added in the future. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/gpt2.py"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"04eac9a316ea8c7b0fd46cd6f17446b1a83c35eaeb9bb930b1728757beab0b76"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(baizhou): left the recording kv-value tensors as () or None type, this feature may be added in the future. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/gptj.py"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"d926a4fdc2a30f2876d4b090e285c66cdbace0c66b324aabf09df11abe979a04"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(baizhou): left the recording kv-value tensors as () or None type, this feature may be added in the future. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/opt.py"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a726d8d3c0e04bb21ebd498c1fb7bd0c6d0ecea0de0eee80f25240d5b4602c9"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(baizhou): left the recording kv-value tensors as () or None type, this feature may be added in the future. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/t5.py"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea0b24cf31b33d0b568560a0ff4363bd283565919ccc63f4e5186aa4d97ee516"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(baizhou): left the recording kv-value tensors as () or None type, this feature may be added in the future. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/t5.py"},"region":{"startLine":305}}}],"partialFingerprints":{"codehealthFindingId/v1":"613675e3be16961d58de801419333c64a2ccaacb76d6e507e6017f5b088b7065"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(baizhou): left the recording kv-value tensors as () or None type, this feature may be added in the future. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/t5.py"},"region":{"startLine":445}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b49b6d87d3d2448d8d0d2512e52a206d4b05070681f32e4af4c03424e77689d"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO Need to fully optimize \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/_operation.py"},"region":{"startLine":771}}}],"partialFingerprints":{"codehealthFindingId/v1":"825ea5c0c46f9bd66975185945897bf5d8b655afd81708d27e4eaca14868d293"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO However sometimes while the GPU has scheduled the next kernel, \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/attn.py"},"region":{"startLine":819}}}],"partialFingerprints":{"codehealthFindingId/v1":"acc5d136f3223e228704c8feaad5c8cd37fc671df54cb9539c2c5f18c0aa03ff"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: support setting a batch dim (fix packing length) for packed mode, so that \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/attn.py"},"region":{"startLine":1186}}}],"partialFingerprints":{"codehealthFindingId/v1":"cea185e523403a9f1f109bbe261575e885bb11037d5ac1dd3e408c4c7fac9050"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO() work for inference only \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/linear.py"},"region":{"startLine":464}}}],"partialFingerprints":{"codehealthFindingId/v1":"d887d59de93a38ff6d1a0cf432d4e64784bd5512e8b002d52a5183d98ccf6701"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO() work for inference only \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/qkv_fused_linear.py"},"region":{"startLine":502}}}],"partialFingerprints":{"codehealthFindingId/v1":"7236317e48e0852ca01e977ece878e8a728d9551d4b0aea50d5c7794dedaca66"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO() work for inference only \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_1d/layers.py"},"region":{"startLine":645}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fe4ac61236df3dc53d0bb6639130b1e8f9411d2613311d8b03789128166a26c"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO:support sp \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/loss.py"},"region":{"startLine":373}}}],"partialFingerprints":{"codehealthFindingId/v1":"50ed7955ac55289d787da076d661335759ed2a0a0fa5007ee13aca3c59979040"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # Todo: Currently we use fp8_view_type \u003Cfloat16, bfloat16\u003E to indicate which fp8 format is used. This is a temporary workaround due to \u0027Only support tensor for fast send\u0027. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/quantization/fp8.py"},"region":{"startLine":322}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d378da53ea49cb0f30b6978f3d0a233634c69ec65a9a5cfdfc0ad1447d9f547"}},{"ruleId":"D17","level":"warning","message":{"text":"HackComment: # HACK this should be handled by C10D \u2014 a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/quantization/utils.py"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"dda582aba471343af2e4232281bbe7c905d67a6aa4d4d9417ac4d027cefb5d96"}},{"ruleId":"D17","level":"warning","message":{"text":"FixmeComment: # NOTE: FIXME: NPU DOES NOT support isend nor irecv, so broadcast is kept for future use \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/pipeline/p2p.py"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"32d2e7f02a5e736f7033c54dce80ec52184e6e373fe69b26a9ff1325c5d794ab"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: optim post valid \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/pipeline/schedule/zero_bubble_pp.py"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb82f5ad8fed9b9da9c35e4d848e35c08ce4adae84b0175b65fd8195255e6d51"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(jiaruifang) dose not support amsgrad \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/cpu_adam.py"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"198e895e556d842846b6d97b25dedb563ea799f9aa8072aa74b94ec9bb9b488d"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: this might not work with padding, e.g. (3, 3) with dp size 2 \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/distributed_galore.py"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"81c1e8350819a9f53f59b0732210f5a37ab75773c2fb416cb55b0d72a11a33c2"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: redo SVD in the next step. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/galore.py"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f07d0444bbecb37322f7dcc5ee09e324f4f750a35db994d3395aa6647260f8d"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(ver217): design a new method to save state_dict. When using NVMe offload, this method may lead to OOM. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/nvme_optimizer.py"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"05cc861b215e7bfd1f414d6587f91fd09a1380dd805b11e2680332805be97a3e"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(ver217): design a new method to load state_dict. When using NVMe offload, whole state_dict may not be able to fit in memory. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/nvme_optimizer.py"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"a15ec787eef05b2f7e975473f55616f2a66bd22b31da3e687c40deb36729b585"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: support async backward \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/moe/_operation.py"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f454d29c224939ebeacdf36868ad220e9b19775cf1e9bbad26bb5c916eadb84"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: we can reduce comm volume by removing empty capacity \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/moe/_operation.py"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"699f947600b8111c88b27c89730de8ca0252412c532a369dbed7b6505f84b18f"}},{"ruleId":"D17","level":"warning","message":{"text":"FixmeComment: # FIXME(ver217): p.data here is an empty tensor on CUDA and has no useful information \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/zero/sharded_optim/sharded_optim_v2.py"},"region":{"startLine":336}}}],"partialFingerprints":{"codehealthFindingId/v1":"012e18c20101daa39b5660cec44848bd23d112e77aa635cc97f54617701eb4ba"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO() improve efficiency by gathering tensors into a chunk and transferring \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/zero/sharded_optim/sharded_optim_v2.py"},"region":{"startLine":358}}}],"partialFingerprints":{"codehealthFindingId/v1":"556b8789d7dc9c0022280d044562c6906fcf9ab29966b2d603ab0037f56654e3"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO() optimize this line CPU (fp32) -\u003E GPU (fp16) \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/zero/sharded_optim/sharded_optim_v2.py"},"region":{"startLine":382}}}],"partialFingerprints":{"codehealthFindingId/v1":"779cf0efbef319a71133d36e1b08a55073f1a689d492db28f1332982c14f1b1a"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Remove the toggle-enable_nccl_base_collectives when github open issue #801 is resolved."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/zero/sharded_model/reduce_scatter.py"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"340b77e324cfd5ddf8f45465a6a7a67a9d36aba59764f21b39c6c1913357c01b"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: investigate how to avoid using torch.cat (because it seems to be slow for CPU tensors) \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/zero/sharded_model/reduce_scatter.py"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc45a8650131decf29ff4dceed49fbc119b8b08099a11ddba05b63402654b2e7"}},{"ruleId":"D17","level":"warning","message":{"text":"FixmeComment: # FIXME(ver217): refactor the below line when impl eviction policy \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/zero/sharded_model/sharded_model_v2.py"},"region":{"startLine":387}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb02038781c490d2c8372bac0a80d33985c09a0f0c751b2234406aa336078a43"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(ver217): make these args configurable \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/zero/gemini/tensor_placement_policy.py"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb6c653f35424a7804b592ad4843dfe371cb43c82e2252197388c236bdd29d16"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO() optimize the tensor moving with non-blocking \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/zero/gemini/tensor_utils.py"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"08ef4653854c6e1d2fd9a6d489a17087b28a191f4d573f32c0310874de72ce9c"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO() rename this function \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/zero/gemini/tensor_utils.py"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"49363fa982a2f531a8b0037960d77a78e26b08930eda2a0e4aeb93a058e0094f"}},{"ruleId":"D17","level":"warning","message":{"text":"FixmeComment: # FIXME(ver217): uncomment below line when remove_hook is implemented \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/utils/profiler/stateful_tensor_mem_extention.py"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7b0aa6585841a66226e7f970bf9e1fa46eab6984332a0586da0ebc43bfd34b5"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(jiaruifang) circle import, move the divide to colossalai.commons. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/tensor/dist_spec_mgr.py"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"af08b37bffe8a4080426b801b510ffd58d131f688ccee9d09c2a6fd6848e7178"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # (lyl)TODO: analyze ColoTensor as well \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/pipeline/pipelinable.py"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0efcc64b94846ff59845a4a935eb4ef9f401f1086ff35df99567d51daaa0606"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO : flexible API for DP size and TP size \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/pipeline/pipeline_process_group.py"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"23bc9342c98042aee88ffdb5a2e1b92e3ea404e98898f581cdb470b852621824"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(jiangziyue) get single value instead of the whole output \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/pipeline/rpc/_pipeline_base.py"},"region":{"startLine":399}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f0d2e4a178ce2179cedbb177acd5d54e242c089602108bd7de0dbea92302fb8"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(jiangziyue) get single value instead of the whole output \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/pipeline/rpc/_pipeline_base.py"},"region":{"startLine":652}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e822832c58b9a2971512508cfed48037d00cc79a085f68fdcaf05fe4c5adc3f"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(jiangziyue) get single value instead of the whole output \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/pipeline/rpc/_pipeline_base.py"},"region":{"startLine":714}}}],"partialFingerprints":{"codehealthFindingId/v1":"086508eda6e5deb4f94e7c882f736da864305522cf728457592dfb90f5e64b60"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(jiangziyue) Profile the side effect of the lock for lifecycle protection and consider a better one. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/pipeline/rpc/_pipeline_base.py"},"region":{"startLine":450}}}],"partialFingerprints":{"codehealthFindingId/v1":"1efbe886fa21a63b74a0e0750e35a5e4faaecb72228582dbcd9c0aae24c170eb"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(jiangziyue) : All values which should do bp are torch.Tensor? \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/pipeline/rpc/_pipeline_base.py"},"region":{"startLine":943}}}],"partialFingerprints":{"codehealthFindingId/v1":"8242d67fb80edd741cb0f88ecc6d9b774010712f2f85f72efed0279a254f2cf6"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO : add relationship between input_pp_ranks and parts of microbatch \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/pipeline/rpc/_pipeline_base.py"},"region":{"startLine":1253}}}],"partialFingerprints":{"codehealthFindingId/v1":"86b8e24ccad73b839aadeccbf8e3b8cf2781442f16d279d75fe67ba1b85a2f7c"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO : add relationship between output_pp_ranks and parts of microlabels \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/pipeline/rpc/_pipeline_base.py"},"region":{"startLine":1259}}}],"partialFingerprints":{"codehealthFindingId/v1":"a80c30516e5769363024361c7a38de46848dae51687aed65a2a0e5ea7dbd2a59"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(jiangziyue) : get model output with single value, instead of merging into last stage. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/pipeline/rpc/_pipeline_base.py"},"region":{"startLine":1262}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9c99a43519b4cdd79ae98cc22cc45962f896a9246f91a1a4772f9746629e06a"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO : more stable format \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/pipeline/rpc/_pipeline_base.py"},"region":{"startLine":1289}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9f3092934ade01b8debd82d89eabcc9124f61e07acc33b1fc70ffcd3d459dd7"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO : If you want to extend it to multi head chimera, overwrite here \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/pipeline/rpc/_pipeline_schedule.py"},"region":{"startLine":237}}}],"partialFingerprints":{"codehealthFindingId/v1":"87a017bb4f117af696ecb1d8ac091d471ebe62fa62a83d5b3c087150037dc3d9"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO : combine producer and consumer \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/pipeline/rpc/utils.py"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f0e5ea3b8383b584e6d72e651bdf54319f7f2ebd84db79f79082d160264a9fc"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(jiaruifang) fixme \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/parallel/data_parallel.py"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"72e68a23b63fa3f6c9d913d39a3d560ff93fe7c4fe6c8a648fd397ca4edd8b10"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO async gpu -\u003E cpu \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/parallel/layers/cache_embedding/cache_mgr.py"},"region":{"startLine":462}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa7e476138c1a6d18e6ace33fef647267e0a27ceb86105753cfbe45b6ab3d939"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO wait for optimize \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/parallel/layers/cache_embedding/cache_mgr.py"},"region":{"startLine":489}}}],"partialFingerprints":{"codehealthFindingId/v1":"e04b229b633bf0ef0c3f3848ac0020333f8adb6f319da911732d4614b923219c"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: This seems to only work if you add torch.cuda.Event.wait() \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_1d/_operation.py"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"d42611496843e06867effb808d8c27b242cc7c7f834ec6f12a90431d7cf535a4"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: enabling mpi backend to support CPU all_to_all \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/_ops/_utils.py"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"71ab6a9a4327a67328cec9b84cc8c3c7c661047363876aaa5bd285e7bd055f97"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: use a global process group mesh \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/load_balance.py"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"87d79c0e1d4997332a3e807ad6b037d6fb0d56d00165536b687f90c4fcb78938"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: exchange master weight, skip for now \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/load_balance.py"},"region":{"startLine":309}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b96df9a847bbf8d4b4ac777ed447360986e74a26676cd745b727817c94a889e"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: for inference, we can add emb kv into cache to avoid computation \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/openmoe/model/modeling_openmoe.py"},"region":{"startLine":378}}}],"partialFingerprints":{"codehealthFindingId/v1":"2df3d1e946dfb8468044f9218c10f838c1f718db4753d21fad83d56037b413d0"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: remove \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/openmoe/model/modeling_openmoe.py"},"region":{"startLine":906}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b2046562da3f144110ebc094e45404cae4d0c99c53de4e01d65acf1af86d6af"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: remove \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/openmoe/model/modeling_openmoe.py"},"region":{"startLine":1030}}}],"partialFingerprints":{"codehealthFindingId/v1":"476275afae0cf2bea55f570dda0a46b467620b66ecea2a805e961c6be0544e14"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: recursively assign ep group foe all modules \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/openmoe/model/openmoe_policy.py"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"201bc51dfb050c6d81323ce7dfe15d0e6005f26adee742886516bab56affb99a"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: move to plugin \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/layer/layers.py"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"368c94354ab499800d2e13979ddf09833774b65656c38bda0f2e443a406ce300"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: optimize computation \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/layer/layers.py"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"4acb3c1431ea60a1debaddc0dbb5e5b83d85ef950e1ee221b253fa06743b300f"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: bincount introduces synchronize, fix it \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/layer/layers.py"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9e5b8225d3adf8d9dbd37838c482e82022b0b33df20c1b77155d5bbfdf9b4e0"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: figure out if cache and batch id is needed \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/async_manager.py"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"590f97173945360f6a240a7a0b0c3cd08e7e777bac122ea6310662ee24989c9e"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: figure out if cache and batch id is needed \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/manager.py"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b346afbff49498496ae534d5094cb01601d12fa93d11f13353667e1bba4c156"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO might want to implement the func that generates output tokens by passing BatchInferState \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/tensor_parallel/engine.py"},"region":{"startLine":365}}}],"partialFingerprints":{"codehealthFindingId/v1":"4530a93e1ec4435c2f7827b1c8e4fd53e60d1c236309f94fdb9373d03eab64ce"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: add the condition for early stopping \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/pipeline/microbatch_manager.py"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"6264bb4dc9b8d536c0233fa7c3365c0ae4861c0b4d68a2c5d3c495b3d20c3ba4"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: implement early_stopping, and various generation options \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/hybridengine/engine.py"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5763d1a97119fdd64cdec9e8bd4fe7de1d90479cf0d54d4fab16158771ddff0"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: support only tensor parallel inference \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/hybridengine/engine.py"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"907625f0fd98a5754d2bc466666f4111a9d534368a7105f6330ae66ac2d9013b"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: the logic of return should be defined here. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/dynamic_batching/io_struct.py"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"256ec7a3c104a9707c632317d0448c47805b8cedea6bf2084126f1f89e83b4c6"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: remove this after testing new zero with pipeline parallelism \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/engine/schedule/_pipeline_schedule.py"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"42435797cc412e3c09fcd90ac70b983909601941215473c4ea8d5acc069e7402"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO adjust here \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/engine/schedule/_pipeline_schedule_v2.py"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3ab20516269ab5b55c286a7a301cb8c019b4f1e084512a34b8f4db5bb8c2d1c"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: add memory buffer \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/engine/gradient_handler/_data_parallel_gradient_handler.py"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd97489820ca1008517b6024173bcc41fae6e6ad1aa9822e39992419dc1bb8fc"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO : more elegant ? P.S. reduce a _broadcast_object_list \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/communication/p2p_v2.py"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"d97eb7f97aaeb108435ba6fc4fbb144e66ac2a60418c09ce306c88d53374ff54"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: is there a way to split by device and dtype without appending in the inner loop? \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/amp/torch_amp/_grad_scaler.py"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"29634f51e7678ba3dc4778de67a30cad057e7d20d6fd469a144e16d662ab6543"}},{"ruleId":"D17","level":"warning","message":{"text":"FixmeComment: # FIXME(ver217): torch script functions are not verified \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/lazy/lazy_init.py"},"region":{"startLine":300}}}],"partialFingerprints":{"codehealthFindingId/v1":"39557568ebe5f7db386e1663055d3b109eae0fbf903e3c942f3f3fade99a6078"}},{"ruleId":"D17","level":"warning","message":{"text":"HackComment: # hack isinstance check of parameter \u2014 a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/lazy/lazy_init.py"},"region":{"startLine":434}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b92d5560bd82b917d346ce6bb7354e3422444cc6b6701a9bd557da0106caa08"}},{"ruleId":"D17","level":"warning","message":{"text":"FixmeComment: # FIXME might want to explore better way to get the summation of prev seq lengths. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/context_attn_unpad.py"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"5864c1f0852b0e46cfe5cb54981d2d1e92aa5559ce550b977abd8ff3563b5bba"}},{"ruleId":"D17","level":"warning","message":{"text":"FixmeComment: # FIXME might want to explore better way to get the summation of prev seq lengths. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/context_attn_unpad.py"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"e628ec635324cb2d052cc66e165f5fbc993824833da8b052ec76ecc9e6ced8e1"}},{"ruleId":"D17","level":"warning","message":{"text":"FixmeComment: # FIXME might want to explore better way to get the summation of prev seq lengths. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/context_attn_unpad.py"},"region":{"startLine":422}}}],"partialFingerprints":{"codehealthFindingId/v1":"6713c139030cd9288018cd492796b62d1faa0acd88abfffda5e50bdaff4c2658"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(yuanheng-zhao): This is a temporary dispatch to use the new layout for kcache \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/context_attn_unpad.py"},"region":{"startLine":189}}}],"partialFingerprints":{"codehealthFindingId/v1":"34432c6724f784abb47805a6573614395a2c9d85408ed6f9b13b53d2c7c9562b"}},{"ruleId":"D17","level":"warning","message":{"text":"HackComment: # HACK: KCache must be contiguous in order to apply the following offsets calculation \u2014 a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/context_attn_unpad.py"},"region":{"startLine":344}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa09c16aa5b6c05455255eb1742fac79b9190ded04c36d72bdbf3b4e3f6cae1c"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO might want to replace with BLOCK_KV % BLOCK_SIZE == 0 (optimize BLOCK_KV as multiple of BLOCK_SIZE) \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/flash_decoding.py"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"806ddcfedef3227ec0d202a4169298d706a179ab747d2c66fbb79cdf7a7ed6fa"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO might want to replace with BLOCK_KV % BLOCK_SIZE == 0 (optimize BLOCK_KV as multiple of BLOCK_SIZE) \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/flash_decoding.py"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"01dd942bb8ddd7452bc5098d12f325fa67386061f47fa8ea928b2f86582bf5e3"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # For compatibility (TODO revise modeling in future) \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/flash_decoding.py"},"region":{"startLine":389}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9196afdfe417547e007228dec5ae9b42ab90e24157976b21989d9d3fb925cb9"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO might consider sorting by length \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/batch_bucket.py"},"region":{"startLine":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"656ac7ebbc51dca2e976619e135589a3a1dce335404e21b2bc4ebc8517c6975c"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO external (rename): modify Sequence.sentence_len to seq_len \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/batch_bucket.py"},"region":{"startLine":249}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b4d18bcb4d0c7960b5e0e47fd5ef44994cbf7b868f30ecddb1d4801f8fda9ea"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO arg type not support beam search sampling yet \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/batch_bucket.py"},"region":{"startLine":406}}}],"partialFingerprints":{"codehealthFindingId/v1":"c73a23a53e1e3d841c3dbfac40aafd2d7fe5f56e28d50173887438a6913ffc03"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: beam search is not support for now \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/config.py"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"dadff92aed85a790db7c88f925de047aa33b6e3c758b25f0aed41879e09ff5a3"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(@lry89757) need more detailed check \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/config.py"},"region":{"startLine":298}}}],"partialFingerprints":{"codehealthFindingId/v1":"99aac6d530ff4c1199507ff37901623493538309d2b39d7e6368d78ca7f1689f"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(yuehuayingxueluo) This is only a temporary implementation. Later, we will implement presence_penalties, frequency_penalties, and repetition_penalties using CUDA kernels. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/logit_processors.py"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"e85447bb90df6f20f8b3dc728abfba275d79a7c41d7b5b2556fb0cfb15a1941a"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(yuanheng-zhao) support bsz \u003E 1 \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/spec/drafter.py"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"6815dec7c68a8133160bd627a68702afbd1464f24c04be59372e913d865bd485"}},{"ruleId":"D17","level":"warning","message":{"text":"XxxComment: # XXX \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/modeling/models/glide_llama.py"},"region":{"startLine":322}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2099848097d2972d3e40dae7af892dd46770cfd5338900b56b7239278456cc5"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # 6. Prepare extra step kwargs. TODO: Logic should ideally just be moved out of the pipeline \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/modeling/models/pixart_alpha.py"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1fbd9f81a644694e9d1333da774f5234e35a5a793523c9a3700bfcda9ea6e8e"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: this requires sync between CPU and GPU. So try to pass timesteps as tensors if you can \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/modeling/models/pixart_alpha.py"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"edf42f54f489f4ebbcf4236e3fe5204bf824cd7e9d955b25838197d19c439203"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(@lry89757) temporarily image, please support more return output \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/modeling/models/pixart_alpha.py"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"d20baa2d7cd1cff96fe4d73756ba59bffe368ea65704d2950abbe1f8f0e0734b"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(@lry89757) temporarily image, please support more return output \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/modeling/models/stablediffusion3.py"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"e58dc8043d2c3809ec756b3b4ecd5a3ade3fac4259240da2aa38c94d3851ac31"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: add support for attn.scale when we move to Torch 2.1 \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/modeling/layers/distrifusion.py"},"region":{"startLine":580}}}],"partialFingerprints":{"codehealthFindingId/v1":"a42c9438085aadd64346b9ccb565db92ade1ee10b614dfc954bf33e4bc4d0a55"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO add logics to update token_ids \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/kv_cache/block_cache.py"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"67608f408f5cea5b56a5be37b446ddfcb95431fb4aeb7f1282de4110ad5ab173"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO Consider removing this function as we plan to implement \u0022half-dynamic\u0022 batching in schduler/request handler, \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/kv_cache/kvcache_manager.py"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"41fa85be1ee37f4244437a737a5039b3d893ce50e382b582794c148b49f0c93e"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO might want to revise the logic here \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/kv_cache/kvcache_manager.py"},"region":{"startLine":346}}}],"partialFingerprints":{"codehealthFindingId/v1":"52a441e8a7adccc7ebcd410da04f2e36e8ea9aad7e20beaa2fbd90b12ed47761"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO support bsz \u003E 1 \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/kv_cache/kvcache_manager.py"},"region":{"startLine":388}}}],"partialFingerprints":{"codehealthFindingId/v1":"e686c5bc2c44a29c0cf3d0dfb2f6b825ab01029009d47938aa43d3248da89b45"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(char-1ee): if the model not supported, use transformers APIs to load and generate \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/core/llm_engine.py"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"90d2ac37a3091e1819dde83b3858c75d0ac34aa316956a73b8514474c14529f8"}},{"ruleId":"D17","level":"warning","message":{"text":"HackComment: # HACK Retrieve the running batch \u2014 a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/core/llm_engine.py"},"region":{"startLine":424}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d3603be38451ca3a5fdb5abcfbc9fd55ac5d8c82e5f0873b8daefac7f657712"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: padding_id is used for generating attn_mask and will be removed if nopad version is supported. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/core/llm_engine.py"},"region":{"startLine":741}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfcd334ed0436d2c323b4c8c9cdad71f717f25134630236f8487fb53f03f43c3"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: padding_id is used for generating attn_mask and will be removed if nopad version is supported. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/core/rpc_engine.py"},"region":{"startLine":277}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a42ee9073bf93b18c06d0471455ad13c727a7c740ded84d63d98ee944366c1e"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO In the continuous batching scenario, the batch size may be greater than max_batch_size, \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/core/request_handler.py"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b255055a06a6fb8488bc9338855e64fc891a054d63053f03eae1ff4e44266c4"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO In the continuous batching scenario, the batch size may be greater than max_batch_size, \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/core/request_handler.py"},"region":{"startLine":428}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f67ee11832a64c4e710cf26f66b2a47157630726d60d044ecdcb2bbefd8b95b"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO (zhaoyuanheng): support speculative decoding for batch size \u003E 1 \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/core/request_handler.py"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"317011cd7062aa2137e53e1443eb31e1efbf3827b101c30f61ad2c45da619407"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Query cudnnGetRNNTrainingReserveSize (expose to python) \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/_meta_regist_12.py"},"region":{"startLine":256}}}],"partialFingerprints":{"codehealthFindingId/v1":"2368bd5ce3be0727a81056e60082d41e92e02508e6c228ea7323522b5534ef31"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Query cudnnGetRNNTrainingReserveSize (expose to python) \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/_subclasses/_meta_registration.py"},"region":{"startLine":272}}}],"partialFingerprints":{"codehealthFindingId/v1":"297fa707307ef7df32a543010892efebd5c85ec6596a625e426afbe7f0bb5cad"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: solves GraphModule creation. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/experimental.py"},"region":{"startLine":360}}}],"partialFingerprints":{"codehealthFindingId/v1":"a614ffba21d21cb6193be2a0b1fc3427111fe26f1b2cd178f11ee8132db2be25"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: solves GraphModule creation. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/tracer.py"},"region":{"startLine":440}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f8f21b11fdd171d5f9f0bf56ce750b5f718fb76a17990538edaaf7801fba13c"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: solves GraphModule creation. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/fx/tracer/tracer.py"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed1145a46399490d5cd9c2d524670b9211b0a84c6c4e0f04bdca070320dbf6f5"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: process str type padding \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/meta_patch/patched_function/convolution.py"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"91a8267116b8d409f7845483f8baf61b29558a7fc3d8d5485af449e27b651445"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: infer shape without performing the computation. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/meta_patch/patched_function/python_ops.py"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"60bd63262e17ceae548cfb68dc4fb4674d84692851379f5c9ef0ceb6086b138d"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: infer shape without performing the computation. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/meta_patch/patched_function/python_ops.py"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d6389e336d891322cd990898f1b26d57eb705e9b00115c65ea71001925286e6"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: non zeros mode requires some extra processing for input \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/bias_addition_patch/patched_bias_addition_module/conv.py"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"83110f56bc4a9cc75b54d52daf0f0f723eaf340e22bbe6bcdc9c2dcafca1298e"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(super-dainiu): removed redundant items, currently all of them are necessary for development \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/profiler/dataflow.py"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbc7de6710cb0f8700e67b5e07288261ab9d01985f5facce55c61868bc42a1c7"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: some of the bwd_mem_out might be model parameters. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/profiler/dataflow.py"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab1bea9239a88039f3a527de346a1193d2aec4d5d70a1d9635937380bbd6af2a"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: this will be removed in future \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/profiler/opcount.py"},"region":{"startLine":330}}}],"partialFingerprints":{"codehealthFindingId/v1":"9772a2207469bccdc921b91a529f80807d4d657d8a2b626de3077af8454eacca"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(yby): specify \u0060saved_tensors\u0060 for backward memory estimation \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/profiler/profiler.py"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"e559b8bc13125f01944c1bc27ab1a1a839930a85cd6043ab54df13ccfd8e62a5"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(super-dainiu): should divide the memory by sharding spec \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/profiler/shard_utils.py"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f185948fcf8ab3a4da065c035528b6cb6b17f18619a040aaed7686dd49cb7f5"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(super-dainiu): should divide the memory by sharding spec \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/profiler/shard_utils.py"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"4785291fc1ce15b931583ffc808df13245ddcfd994f0557b6260d7e3cd0c498e"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(super-dainiu): should divide the memory by sharding spec \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/profiler/shard_utils.py"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8fbf99d94ee2756d49735c6372469d61bb6b46e33c97b8336fee4bc0b90dd0d"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(super-dainiu): should divide the time by the number of GPUs as well as TFLOPs \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/profiler/shard_utils.py"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"f00ee0069747649a32b0b8b508c6a470feaf992e943d89a4c479138fefa8b854"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(super-dainiu): should divide the time by the number of GPUs as well as TFLOPs \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/profiler/shard_utils.py"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"1366d3e4ec3e017565088b572f7d19a909d9baf0a3070e28d7b4c82d2b562b0e"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO fill out the inplace ops \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/profiler/experimental/constants.py"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2f84ffaf178f6c61923aafe55ab44b40765c5b5fec4bfdc13892d3542d1e6ff"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: list all call_methods that are inplace here \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/profiler/experimental/constants.py"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"21f2cc9d4f882eb03897d078826acd07175a038ab169ce9c6cda79397abdadc7"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: reshape may return a copy of the data if the data is not contiguous \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/profiler/experimental/constants.py"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3a6094af85e3723b9a641a9a9e0426886d7d0fa30a62965f9adc3aa438f0d65"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: list all call_methods that are not inplace here \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/profiler/experimental/constants.py"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"99c290b8ac127bac3ad4b1f850a068fdf19c4798471baed16bcc29a4246310c9"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: different activation has different FLOPs count, currently unused. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/profiler/experimental/profiler_module/activation_function.py"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"4342f8e6044949c2cb7345dae0e0b0e533ab2db6aa66cc4ce2f139b015f96653"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: different activation has different FLOPs count, currently unused. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/profiler/experimental/profiler_function/activation_function.py"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f7932e05bcf962aacc9299d88530c87dc06bd277bc10b092ae6632d1fecdf20"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: This is hard to compute memory cost \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/profiler/experimental/profiler_module/attention.py"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"148e1d6240f6c2a3e2ad7785eb0db29b813b2a9b0367664c36f8d705295d7962"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(lyl): use partition IR to assign partition ID to each node. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/passes/adding_split_node_pass.py"},"region":{"startLine":343}}}],"partialFingerprints":{"codehealthFindingId/v1":"50c217f93615d80f0162d20f36a968f94bda60f36ab740787f5ec64fd9a04e8e"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: the attribute node_size should be removed in the future \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/passes/concrete_info_prop.py"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"091906272fb29b489e6e737414f4042872dfd576b0e4bac20e60f5880cb31e42"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: the attribute node_size should be removed in the future \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/passes/meta_info_prop.py"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"69e67bcf64b7476bc46f5e5a9c6c6705a74a4f7f5d0ac661913d37b4e3523656"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: we can add a list of sharding spec here, and record the sharding \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/passes/meta_info_prop.py"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"4da20c0863bd263ad53ed951bcd3dcc8cb87ad3c7a8ce6244cf3a8c006710b89"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Needs to handle special cases, like x = linear(x) \u002B linear(x) \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/passes/shard_1d_pass.py"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"99ae2e29c915316d6a482fc66cdd398b2348c74efdcd02f199427cb8e263f2c9"}},{"ruleId":"D17","level":"warning","message":{"text":"HackComment: # HACK: workaround for how torch custom ops are registered. We \u2014 a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/codegen/activation_checkpoint_codegen.py"},"region":{"startLine":644}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5fe1baea8e63503eef24feb44851c3a7f946c21d9ec1189e524361c6f12430e"}},{"ruleId":"D17","level":"warning","message":{"text":"HackComment: # HACK: workaround for how torch custom ops are registered. We \u2014 a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/codegen/activation_checkpoint_codegen.py"},"region":{"startLine":886}}}],"partialFingerprints":{"codehealthFindingId/v1":"82a7f4a5bf3180cc56d8c96380038189e9f99078e253aa682c19edc0e78e5605"}},{"ruleId":"D17","level":"warning","message":{"text":"HackComment: # HACK: workaround for how torch custom ops are registered. We \u2014 a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/autochunk/autochunk_codegen.py"},"region":{"startLine":393}}}],"partialFingerprints":{"codehealthFindingId/v1":"4183e0e8429d01bb75b007e739abd415280f5c5336d7f0f8d6d43d5e4703c100"}},{"ruleId":"D17","level":"warning","message":{"text":"HackComment: # HACK: workaround for how torch custom ops are registered. We \u2014 a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/fx/codegen.py"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"33c7889304476390331198902777410e3a4dbcf477c5cd4f5fde7dff1fd53bb1"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: [luzgh]: Why alpa needs max_n_succ_stages? Delete. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/device/calc_pipeline_strategy.py"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3e320d24598b5a3f306b887bf3470d7d7acb2fd0c9c84a829a246e794ee2763"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: [luzgh]: Why alpa needs the num_autosharding_configs dimension in compute_cost? \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/device/calc_pipeline_strategy.py"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"56336a78c8940d643c4b628610eea787fc356317d6cb49ffe7490908d78b851b"}},{"ruleId":"D17","level":"warning","message":{"text":"HackComment: # hack the device attribute \u2014 a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/device/device_mesh.py"},"region":{"startLine":219}}}],"partialFingerprints":{"codehealthFindingId/v1":"4be99e5f2d351a99a6b143f0fe347365991f0fd9d2362d487808bc0792013f56"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(FrankLeeeee): handle distributed tensors \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/general_checkpoint_io.py"},"region":{"startLine":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1b7f21b821b501640c24016e605f0d2c31cdec00427701ca25955cb1e746395"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Check correctness here \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/moe_checkpoint.py"},"region":{"startLine":415}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fa90981c3162d70b99455ab80708a07d8baf5588cc1eb94b23634c4ba297a7c"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: check correctness here \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/moe_checkpoint.py"},"region":{"startLine":812}}}],"partialFingerprints":{"codehealthFindingId/v1":"37953fe65d46f65259d2e82234c1d30147c54cab8137cc4f9ad2e8496d0e69e3"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(YuliangLiu): get index of the tensor shard \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/utils.py"},"region":{"startLine":620}}}],"partialFingerprints":{"codehealthFindingId/v1":"22fab5edd65eff0fa2496560f9a1a5186f4b9e3f97dcff2c47d3ed7afc7d853e"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(FrankLeeeee): use global environment to check if it is a dist job \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/accelerator.py"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"eaf7970c7ad5d8fd0220b3c683ac1707179668c1db606ee25fb61cbdb2446ddc"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(FrankLeeeee): consider multi-model and multi-optimizer case \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/booster.py"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c64d492f9d5a6e26bb9ddf479f4d5b4349de43dd6d5d60c809d11725e31a5a0"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(FrankLeeeee): consider multi-dataloader case \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/booster.py"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"33f5de9667f90c9ec97722707d875aa57be030fe0c512d60b33536fc23aa231e"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(frank lee): implement this method with plugin \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/booster.py"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ed55e7e252f0d18e5a74b80801f2d320bf6934f7b3371c9e1a966188ff66e6e"}},{"ruleId":"D17","level":"warning","message":{"text":"FixmeComment: # FIXME(ver217): gemini does not support sync bn \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/plugin/gemini_plugin.py"},"region":{"startLine":666}}}],"partialFingerprints":{"codehealthFindingId/v1":"68b1f305f0c2ea8dcb64f432de7d86467b32cdec5848fd958ea29cc6e9735e8c"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Support Galore \u002B ZeRO \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/plugin/hybrid_parallel_plugin.py"},"region":{"startLine":1249}}}],"partialFingerprints":{"codehealthFindingId/v1":"22b1b126c1e97f466f1f29062b55ec73daa0b075b3985d3ac3724680a7ba10ec"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Support Galore \u002B ZeRO \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/plugin/low_level_zero_plugin.py"},"region":{"startLine":590}}}],"partialFingerprints":{"codehealthFindingId/v1":"60d2097fc4712cbe7aecb7611380a95743623d8ab6936d6cd22c53125636f6c0"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Support Galore \u002B ZeRO \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/plugin/moe_hybrid_parallel_plugin.py"},"region":{"startLine":437}}}],"partialFingerprints":{"codehealthFindingId/v1":"03b4b21552c93c01a669bbc4d28ada1d20a797056dc1d30720ca49648a45c9d0"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: implement this method \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/mixed_precision/mixed_precision_base.py"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"76abad3582e24ecc2697787f715bbf28c1770425c16719d79ac91ea9bd6edd1f"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: contiguous_memory still not accurate for matmul, view, reshape and transpose \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/autochunk/estimate_memory.py"},"region":{"startLine":209}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f393c45de74d270b05a61fb25ca41f20535161c65d8ccf095a02ad6291fa28c"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO need to be removed \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/autochunk/search_chunk.py"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d6d8fb2b2fc0b2ef06284a6eff561b2396dea787dc1c95f0a18eeb6422e298a"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: contiguous maybe need some extra processes. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/constants.py"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c4d1a8c786cd8c16f8258a03225fe1a38609661371109ff48ee43dfef81d94e"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: implement this function \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/initialize.py"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"9712cce101de0c1fdddb85a0b7b96a2f8e38fce17072bd9c50bb2e1dc85299e8"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: implement this function \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/initialize.py"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fe6255b71cced8948d943d2624a5622e45f5d2ffbe1f1d98903059090cd8b7b"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: placeholder input nodes \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/sharding_strategy.py"},"region":{"startLine":250}}}],"partialFingerprints":{"codehealthFindingId/v1":"591996aaf002dfd420cfd6427d8788773f5f7971f4d48a838ff81b180933fe5c"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: remove this after we support the fall back logic. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/sharding_strategy.py"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"26d9c2a6b1888d68d4e8b3b1b33141b9b5ff75b2e63241a94453d27b4e295e27"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: add the logic to remove live variables \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/solver/graph_analysis.py"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4770312dac0e05955d0c643c5a53743d37ca7f74f935fe984d5f8e2c3a37789"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: test this function when other handlers are ready \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/node_handler.py"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"60f1d9bf02466c1f9f42a0e30b8af323dc75957e444b0a9abb8f5dc257a2514c"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: patch all torch functions and modules to make it clean \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/node_handler.py"},"region":{"startLine":272}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5b4b64d66ffb559e406dac2997e1dd09e3e177ce7f44f287ef5b397302ffcef"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: patch all torch functions and modules to make it clean \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/node_handler.py"},"region":{"startLine":327}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba103ab44e2b36a040a5f2564d2d671da959945dfcf6d8ecfe68bb2daceed71c"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: a constant coefficient need to be added. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/batch_norm_generator.py"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b20ea7e77d62539e8e1b2c4c90c9cbfe1822c05f0fe6fbfa1bdcdbb5fabf946"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: a constant coefficient need to be added. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/layer_norm_generator.py"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"efbe3c188af85b35d19855a64b2e554e37ff159c5a4468ae8d3976d6f851bac8"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: the communication happens internally at SyncBN operation. We need to replace the BN operation \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/batch_norm_generator.py"},"region":{"startLine":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"de89a7d08b14f8a74e914dd34ea360cf683dfa28a45d9e56387156a5e74c906d"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: the communication happens internally at SyncBN operation. We need to replace the BN operation \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/batch_norm_generator.py"},"region":{"startLine":241}}}],"partialFingerprints":{"codehealthFindingId/v1":"e27a513332f1a036f2429357a560adaeb6aaffc2619478a40c856fab33ba7e08"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: the communication happens internally at SyncBN operation. We need to replace the BN operation \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/batch_norm_generator.py"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2cc3ace090dceecbe1ff90810fd822ff82c93c26f9f9884f225ee081338ab1f"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Temporary solution has no communication cost, \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/batch_norm_generator.py"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"d90156598bfedfcd225fc45477d347ba7d69fc2d6a9fa7d39705dc313ce0b5fe"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Temporary solution has no communication cost, \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/batch_norm_generator.py"},"region":{"startLine":250}}}],"partialFingerprints":{"codehealthFindingId/v1":"72651868d46b1991ac2cc1fc009f16da70eb354a69034413ff6f1d8d2ae3a550"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Temporary solution has no communication cost, \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/batch_norm_generator.py"},"region":{"startLine":301}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cce36f4ea55b7db550a51c16330672286e9d0b38b54e01dd4c8f9eb27b61888"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: The strategies below should be uncommented after runtime \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/batch_norm_generator.py"},"region":{"startLine":331}}}],"partialFingerprints":{"codehealthFindingId/v1":"11d24a3e44dcf27684c75829afb3aa76d710d42cc780d85bf7e9cad65e9783c4"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: compute_cost need to be divided by TFLOPS, now it just shows the computation size. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffc2bc30e23a4b5327a75ba27f6a170395dea19c05c5d2307d70018ad7e3cd4a"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: compute_cost need to be divided by TFLOPS, now it just shows the computation size. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/layer_norm_generator.py"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"b24005fc51be8b0bd19e0e62ceeca918aa59955c52ee82cbaaa1b985a421138e"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: compute_cost need to be divided by TFLOPS, now it just shows the computation size. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/normal_pooling_generator.py"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2f71835f837a63b5f56df5ee53948bb000488865e37d994f6156857e5260eb7"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: estimate the embedding computation cost as sparse operation \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/embedding_generator.py"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"35314401da2e96f36f4a044e3075cba3e9d4112ba5c0ca860a2eac55e422fd8c"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: torch.addbmm correctness issue need to be fixed. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/matmul_strategy_generator.py"},"region":{"startLine":750}}}],"partialFingerprints":{"codehealthFindingId/v1":"e09a549e90d892b2c5b6839cdbdb2d7d12b0ef420f94339a96f7a4735e3f70ec"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: need to take care of the case when the first element of output only need to be sharded. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/output_generator.py"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"65b8dd66491dd1f6904f00faf7fd3c9389984fe7fe65305ef7d5854b03cf9c27"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: a better way to handle the distributed sum is sum all the data on chip and then do all reduce \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/sum_generator.py"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec7eb06decdaeea4de98c8cb631112d75a27f6638a021ceadb06629003f6a477"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Verify this observation \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/passes/meta_info_prop.py"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c5ff823e03ec773c46ac42efb601e6f9a7d724ea200f8c73ffc8ac3ee431046"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: add assertion here to make sure the dim size is divisible by total_shard_size \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/passes/runtime_preparation_pass.py"},"region":{"startLine":348}}}],"partialFingerprints":{"codehealthFindingId/v1":"a45ba4810000096dbd0536015e09c7d0b395616a5825c58eadcb8f73052de2b0"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: build a ColoParameter class to manager the distributed parameters \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/passes/runtime_preparation_pass.py"},"region":{"startLine":435}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f0d2211af6700a2ee4f5c5f64d95bc5dfd860f8e8e451481cfc69388bae918e"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: we need to do more actions to take care of the shared parameters. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/passes/runtime_preparation_pass.py"},"region":{"startLine":450}}}],"partialFingerprints":{"codehealthFindingId/v1":"507808b36daa76b234d15ca977c163dbaabeebb8f29dce05e28108a1727701a9"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: the pass below should be uncommented after the implementation of implicit_comm_action_apply_pass completed. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/passes/runtime_preparation_pass.py"},"region":{"startLine":514}}}],"partialFingerprints":{"codehealthFindingId/v1":"4864b5b9d18483fe0772ce4c87d4f15d15bf720a73aa2f06277ccd96c41236f4"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO meta info prop bug \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/offload/region_manager.py"},"region":{"startLine":382}}}],"partialFingerprints":{"codehealthFindingId/v1":"56908248a0ba749f9228759f3f0dad88086526b6928fb430fd4eb790377df196"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: use profiler to check conv temp memory \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/meta_profiler/meta_registry/conv.py"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"93ebaab8a6b233f85f05bc687782a715760eece24e3a02d1e8b13e347476dfc9"}},{"ruleId":"D17","level":"warning","message":{"text":"FixmeComment: # FIXME: don\u0027t know why but torch.fx always gets a suffix like \u0027_1\u0027 in the name \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/fx/tracer/tracer.py"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"13412c56f5fd07adc37fc77bc83806ff5e0fe282d02cc80eae9f457c74a4d8c1"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # CommunicationProfiler,    # TODO: add communication profiling \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/fx/passes/graph_profile.py"},"region":{"startLine":348}}}],"partialFingerprints":{"codehealthFindingId/v1":"1dd0fece907fb75e223e4b110b5c9740f6438be2015b4a32245d00b713bffa86"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: dive deep here \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/_subclasses/_monkey_patch.py"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"123611e9b24faf518daf7a4555c9d2cbd3d84593b2009cd1fdca88b92801df9a"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: check if should be this aggressive \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/_subclasses/meta_tensor.py"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"34d5466a5aee8e557652df97cb17474ad109efd507e83feb6e594b62c634786d"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO add translation chain here \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalQA/colossalqa/retrieval_conversation_en.py"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"d910deeea0ed15578bb79a0da37b7ce7e2e4bb6b781c468197671c9c4ebd4fb0"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO add translation chain here \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalQA/colossalqa/retrieval_conversation_zh.py"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"81abde7e2b4abdbd08c0a11a11bb0dbf6faf6c9a0ab328727a28b7e2da51daaf"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: This may cause excessive tokens count \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalQA/colossalqa/local/colossalcloud_llm.py"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce632d54031458cab8cba424184c168043043d84be7a5ef48878beeccb5da083"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: Improve the labeling process. Should annotate the border by adding special tokens. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/models/huggingface.py"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"1201cd4d7f0ed9c8dde21e2d8b30c2b38e5d12f3ad83cab117ab6f1fd99203d9"}},{"ruleId":"D17","level":"warning","message":{"text":"HackComment: # Hack: some old model\u0027s default update_model_kwargs_fn/prepare_inputs_fn may doesn\u0027t work due to version conflict with transformers, you can overwrite them \u2014 a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/examples/training_scripts/train_grpo.py"},"region":{"startLine":399}}}],"partialFingerprints":{"codehealthFindingId/v1":"aaf68578c03d6521c7ce255af66f4c38716214ab9eceed5855cd6707a3088dac"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(ver217): streaming generation does not support repetition_penalty now \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/examples/inference/web_chatbot/server.py"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9504c9ed9623c95c3dfd79f7174b3beba31d9cd7c433ac48b5a4056ce81fe47"}},{"ruleId":"D17","level":"warning","message":{"text":"HackComment: # Hack: Skip empty dataset. If dataset contains less than num_of_rank samples, some rank may have empty dataset and leads to error \u2014 a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/examples/data_preparation_scripts/prepare_dataset.py"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"b54dd7d8fbdf535f8cecd0d6b6399f6b73aec55a3fdc2e23573439462d1ef20b"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(ver217): this may be controlled by strategy if they are prepared by strategy \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/grpo.py"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7e2832f64ef0acb0bf8c91da1c306d81c4e19a459d05745a61f9b1721bfc757"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(ver217): this may be controlled by strategy if they are prepared by strategy \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/ppo.py"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb86721d0626d6673edcdbe6f0504039713cc0fe476871f7f674bf1ab395a55d"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO: balance duties \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/ray/detached_trainer_ppo.py"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"49df6fa452c3564380c108dfbb6b2f64887284126411dea7d93ee97e68dd7b6a"}},{"ruleId":"D17","level":"warning","message":{"text":"HackComment: # Hack: manually initialize cache_position to address transformer version conflict \u2014 a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/experience_maker/naive.py"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"be6d4e53bec41dd848a9b1a422d5e9cede02f783bc87a857654d9e06f0009d8d"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(ver217): add prefetch \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/experience_buffer/naive.py"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"5eaf5747923d7493adf9a213306e824ed02a3822534b44de86adc64eaac78c2e"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(2023-09-18) check errors for each unspliced tokenized data point \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/colossal_llama/dataset/spliced_and_tokenized_dataset.py"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"c592b5bf9c46237a0b85c150487ffa31b7c6e3e96aaf95772c97f2400071708d"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO(2023-09-18): check errors for each spliced tokenized data point. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/colossal_llama/dataset/spliced_and_tokenized_dataset.py"},"region":{"startLine":299}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b36ab245d74f82293fdb57a7646d13fe3dd52e69e112f55b193a1d58782e759"}},{"ruleId":"D20","level":"note","message":{"text":"No ADRs found: No ADRs found. No recognised ADR directory (\u0060docs/adr/\u0060, \u0060docs/decisions/\u0060, \u0060adr/\u0060, \u0060docs/rfcs/\u0060, an \u0060ADR0001/\u0060 folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (\u0060docs/adr/use-postgres.md\u0060, \u0060docs/adr/2024/0001-x.md\u0060); or a file anywhere whose name is ADR-shaped (\u00600001-use-postgres.md\u0060, \u0060adr-012-caching.md\u0060); or, when neither turned anything up, a document carrying the decision-record signature (an \u0022Architecture Decision Record\u0022 heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these \u2014 unnumbered files outside any recognised directory, without those headings \u2014 is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in \u0060docs/adr/\u0060."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"d2bea044ff79d7d275f5a91a6e2f548586178eaf480274c33960ad020c854631"}},{"ruleId":"D26","level":"note","message":{"text":"Projects may be oversized for their cohesion: 2 of 8 project(s) overshoot their size bounds, lowering Project Cohesion to 5.0/10. The most over is \u0060(repository root)\u0060 (149051 LoC, 1417 module-visible types across 180 directories). Review these for cohesion \u2014 draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"d5a94650dc74886a0f1f08eb9fb6775f1fc395279ef7e901c970c9d26f767a72"}},{"ruleId":"D28","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"0704f1e8fa5df7011417ed59ed6a781c0a8d2dfba960265f661e5bb6b6e2aacb"},"properties":{"commitSha":"fd2c8d8156d858545743b5c5c96c7a5f2d378c92"}},{"ruleId":"D28","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"3cdfd7beb31b791ae18dcb425e21eb157c842e7bbcd522cc330573c1a6538db1"}},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"283c7583a37b23bf966fa6ff4c2f237964c3c8abbde32727c56114ff69d60015"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"1a2684a81faf68d65d461c920b0e57fb2275197e3d0215de3788eb7882290611"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"3e903f053eaa5a6bbb87237da3c9458063e843622bcadf933c58ce60cfc3d0a7"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"4a5337101da446a01af96b684e1dcce13b20f23cb41fd3e66dac461b4f5cc2d8"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"2def1fc96afb3725c09eb9e4c607268491025f4861e224837c2a68b4b3ea3970"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"eacaaab1417b123c2e4c6d8cf0ac4949f1b54a76d7bb1859c2ba42f0392e641e"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"af2749a7bea1b1a54ecaded8442e8a83089ba505c7b0d1670282b46a80940256"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"30c4b41512d1c518222f2a368d9d68ebe00f9afc90ce4ea75df157bce3df8332"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"e010513b735d234aa1e2604df0e7b5b48d77d7839bee703128e65acca3f63fc5"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"c41c9a1e6e27854de8aaa507e608b8feb1221daa28b6372b2ee5e69a3eb19166"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"7359ab5ca836d874f812fe1e9dedbbdea352ff89dba405c191776e5ccf5217ff"},"taxa":[{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"fa2530d7929f56181769855ffc2f5dd84b89594df426c97f0ddbbb77f1896339"},"taxa":[{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"e9b08efa5ff5698fc9602514a17387c7d9f581913dd2d7299d52e829b12bd436"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"c0c4da2c680f59dbf6fb569336e0411b3cfcaf914c8316f3c0593352eee90667"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"140c011f02b359398581402158e0c72e6d04bf8542b6b1d73d446e0c208e5ae5"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"265f37095529470c56266dd5adbdf17571e884dfa2c4a6d6a7fb622538da36f8"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"852503ea25d5c545c713dc8022f6bfad03280cd0448a9aeebd05083ec8b795d9"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"86d4d0a8cbadac9f8d2dd35a838e1d271338dd9e3cecfe38e080c12a6b655e61"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"f15dba746d08e3db2ffd95536971151861d65b3d3e02b347e79b93ddb9c5bed9"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"0322a9169f44878536c8e8aa727e4074193901ab4a20bdc2515ba330fc3f669e"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"3bf13d7c98df4ce51f850d971f80d335ad6a7a426cd3a6de0728802ffaaad6b0"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"4e27129544103f64af8af050b58eae19ccfc6353275dfc6e6e0f1683e306da62"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"9c8f5ce282a1790a7f5e2a5a24d74216c68621f7525bcfcaad3e8a9fa57df73a"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"c257ca0196ca70266cfad7c0506a2a6697de64d97bafdfc60654754f1249779c"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"20d2725b38247415b429a3d36f9c0364727b7dad1e7346fe41ffb17d3017084d"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"a95826d1c19ba8748c26f113b6cd7eb893cc99929074175d2f3d32501472759e"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"b6d89950e13202549d6eb68a4997df4f6d8ec38994e7f99dfe6a577bd173f25c"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"90f50fa3f51d5605c41846fb934e9f4336bbd5418fa724e05247818ecd1fe24a"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"7f0c4b1ce630201fb3ab3989af0aed6e8e0d0ef2b3bd58186ab79be1f157f4b9"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"db67d0275318f90407f7ca48caa3406202076a004ac373a62c9776c6f0d6f884"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"b8ab109fa877f9d2e53a8287060ddf7acfe925bd956bb98f6ad453b8ebde1e08"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"860a5e81e1299c581dbbce71bf2e8633467cbb24a7fb0fe00eb0d13c5521a9d3"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"11612ba5b384d1612d529daaec0315e417577548eb3a9a432dffab1e82488ae7"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"a7368664eaa6954e37e78937186af1a3dd36f7ab91b4ff3949f1c911d416e5f0"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"a44f6d50dc5e77a3bf073e250684c54724ec83fe927e9ad4f83bd20d1c4bb9c0"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"3ef1f52c56219c3993e3fb97fe392f97bf2c75a57bbf5ae58fcc2ab645154ed1"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"30c86629ed618561d6f93bb060a3fa6f47ee94a0d1d7e3414062b2484845d860"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"7edc8b28f5a97bfaad958733f6105e1aaec543ef7cd4ed2c6657ad064612dbee"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"f45571df7c2e8b5fd50668107ee577ddcd1c02fef5f11dbac0ca7f2e9724683f"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"7e7076100d81f38c56ab180784c6797fc90025b1e6e99b4139d268ed48482f9a"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"51fdd18ce5c4f3a022c9f4b54a7e443cf36080f61305986c6911739f10ff2a7f"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"085827cb3c4ae962a3c763ad7994bd76a6923d2b56b7f351553e1b82a240821d"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"b6079dffa80a2d1fd0be37b3e72e8654fe36333d8cb2c24f151d1d9cc15a15cb"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"4643607e3484feeb8957779e97df79865f7e8f9377d00e1eaa847eb4ccca59a8"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"573078e39f31dd1711963282064a3bed679b5cc9eb29ca741000f3eff1dfcd9c"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"da83324f6f80e8d4b55cca38fcbc284118e844f7fc1156586d13d9780b9b7837"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"89cddebd9a77b7e6003960a7e7fd4e2a9fc19accb8aaa0eced341dfc0d5432bc"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"6eef8850627450911a82c537c0b957929b95eb07fc9fb1e8e5320c1b5dbbb758"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"9f2ad433a5704d16de19a3273d40d5631417e38e80eb7c541512e0e2a2c3dca1"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ea9454466631449aa24824e18a26344d7cb08fa10bf934ff12aa063ed4bdcfe4"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"9e1ce3c80a683dfbf0e87a2c0a13c85d2e14636020f019bb26bfc11c46a61bb1"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"61fa4d56bc2ec25d433bcd6ca6fe91b0a515c71f8f42934419ad2256f535e39e"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ece7fd3e3b1dee7a5518cc9060443155496c2a962ad8dd4facbbb538d7f5251e"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"5251eba4c9e1a87570e1ed29008a165ed579fd1290ef5c02b432b1c819c74509"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"b027ddb4cf339ebff9c89cea685e312e50ca9f3bb172b5f51db1eb23098cfc9a"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"fb11a1a1ebddf753cb9273fbbf106e3db289a82d12e2383160a61654a3cafdf2"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"f18ada8fc20fd2c2192fa12d3cc8f7f61a7bc922a3d0833e47835f75705cc65d"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"58b32c3cf9a1ae43100e5befdc082c36c786d4e1add91b82bc9360d9eadefb52"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"5eaa9d2a90b11e28a25cb9fc2d6cb2931302ceb93cd89a8743dc09d3eabc25c7"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"6aa3686ba6141218ecd704694751107e7d55409040ded5805353adc4c5ddaa48"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"364da80320b0c49009a5207564979c79cdaed50a3bd6f33226bfc7e3b775f2f1"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ffdac9f94042f0c250a2040b89967a521237043f53b8d1a7fc287a1e0f1a04d7"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"73310cc399ecd2de567c007fe5dbedb1eb6f4d58cbfca2643d8fc212744847fc"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"09753074028a273549b2b453800524a387177c6f905d9ade12b351bc14675bee"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"0f473448354b5f4c1075761b9726f228d642fea26c2c05921eb0445c21146d85"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"cf9d0b80ee1962e363149edb391b5eb5069270909675e40af9d97e6c401d7ef5"},"taxa":[{"id":"CWE-522","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A06:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-6","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"1f28e9e295f3d9869d9c32ef40530fae4b9c0b41dd5596f0ef1274e98fd6c8f3"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"4583917beb84180622b391fb3b6726e4943564272d0795478adeea6b99b684da"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"9cce3fa48cdf879fa43b4cabae02f063e4a0f842bd8fc279f6331b5be783efb0"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"b619fb63536cdcd9f9ca9ca5bc391c585357b326d0433ce9159d9c6fed539dd2"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"57f8a92c62856e40c08e80a5b68e5b64be787dffd49c03c475a7dca0fd2ef1fa"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"86d47ec9c5e3b9f3e63dc247b8c98e3115bdb462764f0f5e5c5895c76579d784"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"b60d91ad31bd633998f1124f59b969a6ea7e99de1515cca17817ec57f3b3c5ce"},"taxa":[{"id":"CWE-522","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A06:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-6","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"f266d439900f711e50bf682d744f526beb3b896496dd4d39e1c39a24cecb48bb"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"c89a74d84d6fecfa3b268fadae0caadb86c365a38c7b48b5fe765832bd4c654e"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"45d8b284c9680c3a4f277a7b41aa4c167512890e781b67b3edf9904ee8ac0f08"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"5316724a4fe09175eb2c4fd051efb9c9cb15d5dfdc3a269eecfb07f3de4b606e"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"7c1a0f1c976df220c34dd9d72a536cfb1046f041b68ac291e3e990c6df6dae2f"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"f7f3975d65e2fc1195f11e5ca081bbea067a1265484e65a4a429a20f800c101c"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"db05d7de6906cbb1ebd4971681c24ad70d70668950b77baafa7e059d554d3b11"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"bbc83dfc850efba9e718e3c1360f62fdb9ddc87ba1d2dce84af257d94e6201d9"},"taxa":[{"id":"CWE-522","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A06:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-6","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"4276903dd64de8e735300e143270cd036a0d3cd23af0c79fd7b05adad1637c47"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"82d05d47e3b565d63a0c9081a6e9112b6829fc7f87ae6981140ee8a45795632c"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"6b7100ec08b2de743066039e62aaea6ef32145ef0a8c71b60f32c116cbc296c7"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"cab9ac0ea8ed5bab9eb9aabc4023b57eee89b7a3b6361a11f71f9d88bacc4b1e"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"1fd2bf069cc0f27ef194f705c314ea666322162bba98365ec6cc052a43376e38"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"19fcb2c9173074945dd024ad608d567f5e846942572242d81101b69d9b8e72aa"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"a3f6640e2b5f99a4a4f4e4f6524e24649888ec78293557da968c020898b84aa9"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"2489d5a26dc5a96c0e97505fff9ec667f330afdc1c7d49f3ce1c24ba0f4291b8"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ced591e2b5c77b366a0d397040f149499c149b3e1da06bc50a4a4dc45887cb6e"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"2032f025cea922271c249469979372f5e51d13dac4730aae711ca07a498ec33e"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"721b4fa984c7358abc34bb78d40775c65af59e1dee481467c8bcc1fba97f70df"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"7eebf43ea92767c02bb8e5f9a4ceeb547dc9984963cd451abb4524ca76b223de"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"85e146c8d8709cf27e06c3a530325c4ded4aaf353594c282645804caf86cca50"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"7ba5a02adfdc0adfb197ebc50337bf9db38ed7d442295bc02cb226dbd935ebaa"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"550f7c74930d6f22c7d61fd5b5fef4d0f169e993d29dc2f7db656f882119ca51"},"taxa":[{"id":"CWE-95","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"3a988498a5ff5878cb0a11f43089404d1086213b3f30b2401ff2a536ac935554"},"taxa":[{"id":"CWE-95","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"1faacc778c5f064fd486eff806dc98ef01fcfb4d115b42252a4f0c2e9e721793"},"taxa":[{"id":"CWE-95","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"4a49a42590325d5b3e9cb5109d146b409c0c94219824aed7861b5b66342f229c"},"taxa":[{"id":"CWE-95","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"28c387725b26dfabdff11ecd28ac598f73bacdebfbbc2d166f2a3cea102b21f4"},"taxa":[{"id":"CWE-95","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"0d057b1ec80b777ec609ec3bb02b4c820c954272006edb2fef26950a5c1c2c21"},"taxa":[{"id":"CWE-95","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"b3f96901fa710a5437c5cde552bedcf174b0e960da53f89af4a82a51b419f648"},"taxa":[{"id":"CWE-95","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"232bb2f9a3cea9ce93a0c74c6a851ac7cd4e1fdc6cc25b0480c1548f692f11fb"},"taxa":[{"id":"CWE-95","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"205620d9abb3e975fa20b1086b4765836ec79b60f17dedec981d36d4bc049fb1"},"taxa":[{"id":"CWE-95","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ae2fde8b87484c0046233083504d38de635059c83f7cc5200458d0e988fcb0f8"},"taxa":[{"id":"CWE-95","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"321f6781cb1e9257c83f1413220a48807e48764e324225fea11d921e83c837d7"},"taxa":[{"id":"CWE-95","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"e6ce9785bb7e29bb79d4a728576b9bdf663328565dbdf528c40e3774c1cfe4ab"},"taxa":[{"id":"CWE-95","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"9037c0e5e49cdf826cacee92665bc538695db09a9ef036eb59e8710a3dec082a"},"taxa":[{"id":"CWE-95","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"6b4e289201eaf450064d03aa8a1136f6ad29a8d5cc229cc60f9006d3609833b4"},"taxa":[{"id":"CWE-95","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"71e1f4b038e70af23516a12769916f852b33e089268c94501aa5e4b336f9a282"},"taxa":[{"id":"CWE-1104","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-1329","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-8","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"e213977f25a4b2c45e776b24bcb6ecf083429013df9d56a2346cf122f133600a"},"taxa":[{"id":"CWE-1104","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-1329","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-8","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"3904d21c92414b53744a73cda5d886a4aa16bcaffc1403febda5c5950683c781"},"taxa":[{"id":"CWE-1104","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-1329","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-8","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"540314d7771064d567af99bec3ee330acabdcf2ba7040dac722e6916c431d1d3"},"taxa":[{"id":"CWE-1104","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-1352","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-7","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"b885c1601b83cbcf6dbef77ac07e717809ca2da55e1b08e405ecc011f7ccb77a"},"taxa":[{"id":"CWE-1104","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-8","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"5a4f31eb3c136d23ca5879568b3fb97a500ccd661a85205ee7f04d3c41c9dfc1"},"taxa":[{"id":"CWE-1104","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-1352","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-7","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"6652d332f8ec4e8c8825a1ddc0aed0450afeee1d97c513f37852b1209cff44e9"},"taxa":[{"id":"CWE-1104","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-1352","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-7","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"33c03d12c0231e566ffe65035f103839635a92de1fa6295a5e3531ac13ea8a81"},"taxa":[{"id":"CWE-330","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A04:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"f1e93768ed50a77fcae2d4589b6588fe4d53ba485a1420bdca1fba2a76094729"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"4771dc9e6261f6ab63e31a593a2cca1d883c4c961ba2ddac838a619055649546"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"02caeebf1827a4d850e4d78d6d0b35e60af60b3c322439f680df5a65c6a5154b"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"61a7903dd074586453693610fcef112d13f2877a49fb9eb08c4f29d64c0a2af4"},"taxa":[{"id":"CWE-327","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A04:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"e065421fb2dac2a3988fdeff5ad5af091516de46ecd8e3ffef78ac8d3fbea703"},"taxa":[{"id":"CWE-327","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A04:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"03481fd1469715a26e3e080ef9e7c39883cd0cdb48e298997e33897bd78d4c45"},"taxa":[{"id":"CWE-942","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A02:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"da6774b1f838f48a938ccf0d87a7f8452144224f28411c7fc46daac4f0a16907"},"taxa":[{"id":"CWE-295","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"3b7eaabf8c41a35b76e27c7c58490901e98f3edf97c37fce5a09b4be3ae28ca5"},"taxa":[{"id":"CWE-295","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"33ca12710d6badec3f9cbe2e40a945c57a95ecf27397ab5397796f2119bcaf5e"},"taxa":[{"id":"CWE-327","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A04:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D30","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"6b886346931fdc8e6fe6f13998cd2b76b14fe81cdc73cb4dcbf09827ec15ff44"},"properties":{"dependency":{"package":"torch","version":"2.1.2","advisory":"[GHSA redacted]","aliases":["BIT-pytorch-2024-31580","BIT-pytorch-2024-31583","BIT-pytorch-2024-31584","BIT-pytorch-2024-48063","BIT-pytorch-2025-2148","BIT-pytorch-2025-2149","BIT-pytorch-2025-2953","BIT-pytorch-2025-2998","BIT-pytorch-2025-2999","BIT-pytorch-2025-3000","BIT-pytorch-2025-3001","BIT-pytorch-2025-32434","BIT-pytorch-2025-3730","BIT-pytorch-2025-46148","BIT-pytorch-2025-55551","BIT-pytorch-2025-55552","BIT-pytorch-2025-55553","BIT-pytorch-2025-55554","BIT-pytorch-2025-55557","BIT-pytorch-2025-55558","BIT-pytorch-2025-55560","BIT-pytorch-2026-24747","BIT-pytorch-2026-4538","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","PYSEC-2024-250","PYSEC-2024-251","PYSEC-2024-252","PYSEC-2024-259","PYSEC-2024-328","PYSEC-2025-189","PYSEC-2025-190","PYSEC-2025-191","PYSEC-2025-192","PYSEC-2025-193","PYSEC-2025-194","PYSEC-2025-195","PYSEC-2025-198","PYSEC-2025-203","PYSEC-2025-204","PYSEC-2025-205","PYSEC-2025-206","PYSEC-2025-207","PYSEC-2025-208","PYSEC-2025-209","PYSEC-2025-41","PYSEC-2026-139","PYSEC-2026-1856","PYSEC-2026-1970","PYSEC-2026-2286"],"reachability":{"kind":"production","file":"applications/Colossal-LLaMA/colossal_llama/dataset/dummy_dataset.py","line":1}}}},{"ruleId":"D30","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"16afb4a2b932ef54c871e7158c64ba4eef84ebccfe1b60601246f6b7291379db"},"properties":{"dependency":{"package":"ray","version":"2.49.2","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","PYSEC-2026-2271","PYSEC-2026-2272","PYSEC-2026-2273","PYSEC-2026-2296","PYSEC-2026-517","PYSEC-2026-518","PYSEC-2026-520"],"reachability":{"kind":"production","file":"applications/ColossalChat/coati/distributed/zero_bubble/consumer.py","line":6}}}},{"ruleId":"D30","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"29c78295e44c185a7f186dc857d135e8ffc68dac8a1b75c51c72a42537611f3e"},"properties":{"dependency":{"package":"vllm","version":"0.5.5","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","PYSEC-2025-222","PYSEC-2025-223","PYSEC-2025-42","PYSEC-2025-43","PYSEC-2025-50","PYSEC-2025-53","PYSEC-2025-58","PYSEC-2025-62","PYSEC-2026-2011","PYSEC-2026-2012","PYSEC-2026-2013","PYSEC-2026-2015","PYSEC-2026-2016","PYSEC-2026-2017","PYSEC-2026-2019","PYSEC-2026-2020","PYSEC-2026-2021","PYSEC-2026-2026","PYSEC-2026-226","PYSEC-2026-227","PYSEC-2026-2298","PYSEC-2026-2299","PYSEC-2026-2300","PYSEC-2026-2301","PYSEC-2026-2304","PYSEC-2026-2306","PYSEC-2026-3403","PYSEC-2026-3404","PYSEC-2026-3405","PYSEC-2026-3407","PYSEC-2026-3408","PYSEC-2026-3933","PYSEC-2026-3934","PYSEC-2026-3935","PYSEC-2026-3936","PYSEC-2026-3937","PYSEC-2026-3985","PYSEC-2026-3996","PYSEC-2026-3997","PYSEC-2026-3998","PYSEC-2026-3999","PYSEC-2026-4000","PYSEC-2026-4003","PYSEC-2026-4004","PYSEC-2026-4005","PYSEC-2026-4006","PYSEC-2026-4007","PYSEC-2026-4008","PYSEC-2026-4178","PYSEC-2026-4179","PYSEC-2026-4184","PYSEC-2026-4186","PYSEC-2026-4197","PYSEC-2026-4198","PYSEC-2026-4199","PYSEC-2026-4306","PYSEC-2026-4308","PYSEC-2026-4309","PYSEC-2026-4319","PYSEC-2026-4325","PYSEC-2026-566","PYSEC-2026-568"],"reachability":{"kind":"production","file":"applications/ColossalEval/colossal_eval/models/vllm.py","line":9}}}},{"ruleId":"D30","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"1eb4d0b454201798719a6f7b27349bd1839980663f38981b45e5ae4772600de0"},"properties":{"dependency":{"package":"unstructured","version":"0.10.14","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","GO-2024-3315","PYSEC-2026-1993","PYSEC-2026-3930","PYSEC-2026-558"],"reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"f3fa5dc3064f4988f4dd4207456fce8be8667819079f2d4c0eb8ff10597e1d2c"},"properties":{"dependency":{"package":"gradio","version":"3.44.4","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","PYSEC-2023-249","PYSEC-2023-255","PYSEC-2024-184","PYSEC-2024-196","PYSEC-2024-197","PYSEC-2024-198","PYSEC-2024-199","PYSEC-2024-213","PYSEC-2024-214","PYSEC-2024-215","PYSEC-2024-216","PYSEC-2024-217","PYSEC-2024-218","PYSEC-2024-219","PYSEC-2024-220","PYSEC-2024-255","PYSEC-2024-261","PYSEC-2024-274","PYSEC-2024-321","PYSEC-2025-118","PYSEC-2025-119","PYSEC-2026-1407","PYSEC-2026-1408","PYSEC-2026-1409","PYSEC-2026-1410","PYSEC-2026-1411","PYSEC-2026-1413","PYSEC-2026-1414","PYSEC-2026-1415","PYSEC-2026-1416","PYSEC-2026-1418","PYSEC-2026-1419","PYSEC-2026-1420","PYSEC-2026-211","PYSEC-2026-2178","PYSEC-2026-2179","PYSEC-2026-345","PYSEC-2026-64","PYSEC-2026-65","PYSEC-2026-66"],"reachability":{"kind":"production","file":"applications/ColossalQA/examples/webui_demo/webui.py","line":5}}}},{"ruleId":"D30","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"4d7d7cd36867feae3155488370a75fefb2d2e9739d4b3c732ce47c2db566e48c"},"properties":{"dependency":{"package":"sentence-transformers","version":"2.2.2","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","PYSEC-2026-4164"],"reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ac29150b69c51dbbf134a511f0f29f46ded8eca93dcaf375d98bb19638140294"},"properties":{"dependency":{"package":"langchain-experimental","version":"0.0.37","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","[CVE redacted]","[GHSA redacted]","PYSEC-2024-53","PYSEC-2026-375"],"reachability":{"kind":"production","file":"applications/ColossalQA/examples/conversation_agent_chatgpt.py","line":23}}}},{"ruleId":"D30","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"8146ce491f5d8d88a3a4423564f307d5dd7409b9f5d1ad17a70ba7d51a0c9365"},"properties":{"dependency":{"package":"pillow","version":"12.3.0","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]"],"reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"82e69a23c94f04ec47155be87a4ddfc74399af9dd5817d841b6bbea1e256de52"},"properties":{"dependency":{"package":"certifi","version":"2026.7.22","advisory":"[GHSA redacted]","aliases":["PYSEC-2026-4320"],"reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"54be031d4655ca347ec7e78522522c457a205b9f063f42e9040cc96645b5f0fc"},"properties":{"dependency":{"package":"sentencepiece","version":"0.1.99","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","PYSEC-2026-1909"],"reachability":{"kind":"production","file":"applications/Colossal-LLaMA/colossal_llama/tokenizer/init_tokenizer.py","line":13}}}},{"ruleId":"D30","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"60b641ab175efcd4e109545c4d1c99eef2331cdbf3e2bb68696288e2dab74612"},"properties":{"dependency":{"package":"protobuf","version":"3.20.0","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","[CVE redacted]","[CVE redacted]","[GHSA redacted]","[GHSA redacted]","PYSEC-2026-1805","PYSEC-2026-1806","PYSEC-2026-899"],"reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"57f1d724f3ea0958a9247f519c77841245dcc16deaa91a10592e6bc328329cbe"},"properties":{"dependency":{"package":"black","version":"23.9.1","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","PYSEC-2024-48","PYSEC-2026-2120","PYSEC-2026-2121"],"reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"b4f23cdbcc2898d29e29f6c13a1221888d7206f10c8832ee97e561db3ec7d762"},"properties":{"dependency":{"package":"transformers","version":"4.36.0","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","PYSEC-2024-227","PYSEC-2024-228","PYSEC-2024-229","PYSEC-2025-211","PYSEC-2025-212","PYSEC-2025-213","PYSEC-2025-214","PYSEC-2025-215","PYSEC-2025-216","PYSEC-2025-217","PYSEC-2025-218","PYSEC-2025-40","PYSEC-2026-1977","PYSEC-2026-1978","PYSEC-2026-1980","PYSEC-2026-1981","PYSEC-2026-1982","PYSEC-2026-1983","PYSEC-2026-1984","PYSEC-2026-1985","PYSEC-2026-1986","PYSEC-2026-1987","PYSEC-2026-1988","PYSEC-2026-2288","PYSEC-2026-2289","PYSEC-2026-2290","PYSEC-2026-3929"],"reachability":{"kind":"production","file":"applications/ColossalMoE/infer.py","line":5}}}},{"ruleId":"D30","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"5e033961792a65a69301d3dd9d67e8e03624b7ba9895661adc9245e0e48e2f12"},"properties":{"dependency":{"package":"langchain","version":"0.0.330","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","PYSEC-2024-115","PYSEC-2024-118","PYSEC-2024-235","PYSEC-2024-323","PYSEC-2024-43","PYSEC-2024-45","PYSEC-2026-1507","PYSEC-2026-1509","PYSEC-2026-1510","PYSEC-2026-1514","PYSEC-2026-2192","PYSEC-2026-2555","PYSEC-2026-2556","PYSEC-2026-2560","PYSEC-2026-2561","PYSEC-2026-2582"],"reachability":{"kind":"production","file":"applications/ColossalQA/colossalqa/chain/memory/summary.py","line":15}}}},{"ruleId":"D30","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"59a34153897c167b61a806cae72a4b53e44555c32f815ecf7f55c3f7dce6538c"},"properties":{"dependency":{"package":"pypdf","version":"3.16.0","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","PYSEC-2026-1827","PYSEC-2026-1828","PYSEC-2026-1829","PYSEC-2026-1830","PYSEC-2026-1831","PYSEC-2026-1832","PYSEC-2026-1833","PYSEC-2026-1834","PYSEC-2026-3004","PYSEC-2026-3005","PYSEC-2026-3006","PYSEC-2026-3007","PYSEC-2026-3009","PYSEC-2026-3010","PYSEC-2026-3011","PYSEC-2026-3012","PYSEC-2026-3013","PYSEC-2026-3014","PYSEC-2026-3015","PYSEC-2026-3016","PYSEC-2026-3017","PYSEC-2026-3018","PYSEC-2026-3019","PYSEC-2026-3020","PYSEC-2026-3021","PYSEC-2026-3022","PYSEC-2026-3023","PYSEC-2026-3024","PYSEC-2026-3025","PYSEC-2026-3026","PYSEC-2026-3027","PYSEC-2026-3610","PYSEC-2026-3611","PYSEC-2026-3612","PYSEC-2026-3613","PYSEC-2026-3655","PYSEC-2026-3656","PYSEC-2026-3910","PYSEC-2026-3911","PYSEC-2026-3912","PYSEC-2026-3913","PYSEC-2026-4153","PYSEC-2026-4154","PYSEC-2026-4155","PYSEC-2026-4156","PYSEC-2026-4157","PYSEC-2026-4158","PYSEC-2026-4159","PYSEC-2026-4160"],"reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"e18f895da0ddaefd5da7bce5ce2c3487561f26db6583db724e30072e3b4a1160"},"properties":{"dependency":{"package":"modelscope","version":"1.9.0","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","PYSEC-2026-2663"],"reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"3be9797c430e37f35a322a1a920ac62064f0b1856cadb28e91f1189357cf7a25"},"properties":{"dependency":{"package":"filelock","version":"4.0.1","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","[CVE redacted]","[CVE redacted]","[GHSA redacted]","[GHSA redacted]"],"reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"7ba5c121b84289a0ff33b73ce2aa61eba41c4e5c84a394b8475b45eddc94eeae"},"properties":{"dependency":{"package":"diffusers","version":"0.35.2","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","[CVE redacted]","[CVE redacted]","[GHSA redacted]","[GHSA redacted]","PYSEC-2026-2446","PYSEC-2026-40","PYSEC-2026-41"],"reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"030fac92bf9a8f34dd671a491d763865906dbfb002866bd9b12115f04364fdd2"},"properties":{"dependency":{"package":"transformers","version":"4.39.3","advisory":"PYSEC-2025-211","aliases":["[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[GHSA redacted]","PYSEC-2025-212","PYSEC-2025-213","PYSEC-2025-214","PYSEC-2025-215","PYSEC-2025-216","PYSEC-2025-217","PYSEC-2025-218","PYSEC-2026-2290"],"reachability":{"kind":"production","file":"applications/Colossal-LLaMA/colossal_llama/dataset/loader.py","line":13}}}},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"39479fe65fb24d10277355733fbd1dee4f2bc2715c21c6b0e2011d8bf204998b"},"properties":{"dependency":{"package":"transformers","version":"4.32.0","advisory":"PYSEC-2025-211","aliases":["[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[GHSA redacted]","PYSEC-2025-212","PYSEC-2025-213","PYSEC-2025-214","PYSEC-2025-215","PYSEC-2025-216","PYSEC-2025-217","PYSEC-2025-218","PYSEC-2026-2290"],"reachability":{"kind":"production","file":"applications/ColossalEval/colossal_eval/models/huggingface.py","line":10}}}},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"dc29bb7877af04ef95d4cd8cf5e0096306ecdef34fc3cd3cb5d008d8ceb61bb6"},"properties":{"dependency":{"package":"torch","version":"1.8.1","advisory":"[GHSA redacted]","aliases":["BIT-pytorch-2025-2148","BIT-pytorch-2025-2149","BIT-pytorch-2025-2953","BIT-pytorch-2025-2998","BIT-pytorch-2026-4538","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","PYSEC-2025-189","PYSEC-2025-190","PYSEC-2025-191","PYSEC-2025-192","PYSEC-2026-139"],"reachability":{"kind":"production","file":"applications/ColossalMoE/infer.py","line":3}}}},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"26874fe49a87ff97aa31d93f3e3ee6e43e5295e7d82c22cf570a06aaf3e54d2b"},"properties":{"dependency":{"package":"datasets","version":"2.13.0","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","PYSEC-2026-3716"],"reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"67cc3790e2f3136d63d9e2b6a78bad74c187bc50b7d22f7788d1f4cfe3a425d1"},"properties":{"dependency":{"package":"pytest","version":"7.4.2","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","PYSEC-2026-1845"],"reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"a737aa14d3704c5ca5d930580ad063a4ab8dbc9fbc61dc5ff8c040a89fd0e294"},"properties":{"dependency":{"package":"requests","version":"2.31.0","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","[CVE redacted]","[CVE redacted]","[GHSA redacted]","[GHSA redacted]","PYSEC-2026-1872","PYSEC-2026-1873","PYSEC-2026-2275"],"reachability":{"kind":"production","file":"applications/ColossalQA/colossalqa/local/colossalcloud_llm.py","line":27}}}},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"7fa17bc061a41d711139317134ca0903871bba45251d696253f94cd2dbf05632"},"properties":{"dependency":{"package":"transformers","version":"4.20.1","advisory":"PYSEC-2025-211","aliases":["[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[GHSA redacted]","PYSEC-2025-212","PYSEC-2025-213","PYSEC-2025-214","PYSEC-2025-215","PYSEC-2025-216","PYSEC-2025-217","PYSEC-2025-218","PYSEC-2026-2290"],"reachability":{"kind":"production","file":"applications/ColossalQA/colossalqa/local/llm.py","line":23}}}},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"cfbd2d8a74a84422ecc0b3b8435ffd774b6e799cf84cf390d79c3ea4408ed1f2"},"properties":{"dependency":{"package":"tqdm","version":"4.66.1","advisory":"PYSEC-2026-1976","aliases":["[CVE redacted]","[GHSA redacted]"],"reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"01f86be83a818b1ac8600fb06ec35029638fd79eee514a266020210db91608d8"},"properties":{"dependency":{"package":"pytest","version":"8.4.2","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","PYSEC-2026-1845"],"reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"8b60f82f69409cfbe652c00491cc72addbba7c501d6f120e59ed5558c642dd7a"},"properties":{"dependency":{"package":"setuptools","version":"81.0.0","advisory":"[GHSA redacted]","aliases":["BIT-setuptools-2026-59890","[CVE redacted]","[GHSA redacted]","PYSEC-2026-3447"],"reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"496ba602f1765e79eeeb7e8a2fad7ff3df66915f009406b26a3e401de67369f4"},"properties":{"dependency":{"package":"torch","version":"2.11.0","advisory":"[GHSA redacted]","aliases":["BIT-pytorch-2025-3000","[CVE redacted]","PYSEC-2025-194"],"reachability":{"kind":"unknown"}}}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"a675accfa51ffe68938de74a23186115c7c6062fb4fbdb8401dcf48afa9de0a9"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"0a13c6e6eae780f3f689e0ec3f9eca38726cb69d07607796f5a01f8dc1346106"},"taxa":[{"id":"CWE-321","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-6","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ca7c9010f49e58d09724c539c1f01514bb8df5c5face3d1904d8c0f8ef7a2c19"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"b5ed00132fca903dae81ba51fcf0bb7c515548e33a79611d96746bfcce53b617"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"f9deb0b3e9568df1171bacf908174d514cb7e71041f1c1975b38340d1bde8fc0"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"7692b35d2eef60ad71436777be07a8d68072e0233771144d4f4bcdb4e22b2d3d"},"taxa":[{"id":"CWE-321","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-6","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"c2e1c33b058c005e6250f1c0f084e946c06ff1870f1bdd4ba3f17649dd503141"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"be33ba3b69f7727946f11cd10b5c027088726fe40cb628f60133fa6d0c839585"}},{"ruleId":"D31","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"f18838f218e38f3a9ed38136b7294e5f48088cf7bd184f871cf0feca6013df00"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D31","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"e7069e2d91d184f5657a03a2417efff5ddf71fa5ec557ef3e2e51907217926ec"}},{"ruleId":"D31","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"d03271665854bdabc939c52a1d2932363822637ddc79f5c282d4618e92b8a181"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-3","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D31","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"988ffe7630e8c3199259c2847fcb1da2d281dde8ebd0a40c27858b73fd9e2e2d"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-3","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D31","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"001a9d69f7c8e1385686070b62fc0a74b0b0428a334028baef22e2de492621dd"}},{"ruleId":"D31","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"3aaf4b3df48548a273fa06d6faef141baa68626b9e8b6070b53555f75c7249e1"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-3","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D31","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"456d2c3f511799653c765ed1632fec68481d07b1aa9db4d76a6f5dab8c714fd8"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D31","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"c12b8fb2039a09c581358b5b0049787f58f5f6288177d7512063d4aad852aa81"}},{"ruleId":"D31","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ace39eb0ac22a1971061fe86734382a32f04651720e85671ed087b440e8b179f"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-3","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D31","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"b12e0146a9d91bbf7047d59393045e9ef5cb899fcf3b1a7f76e06fede958a8db"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-3","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D31","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"59eb02e4aa1286801c1be83d3a8036ad0759242fab61c2f6fa836bd2221acdce"}},{"ruleId":"D31","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"f74f98e4764203be0308dc40e0cb3594110e74086f703e8e2481f3bfd014583b"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-3","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D31","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"be1c7daa6e7d9b23792fbba01c891c1837e39ae810ec4e9a43761ae749e5e8c1"}},{"ruleId":"D31","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"17721dbe07ef4ec690baf2065e35ba5d871246c812e33573a376a86e29c5b278"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D34","level":"note","message":{"text":"Concentrated knowledge decay: 541 of 599 significant files have no living knowledge, while the repository is still being changed at a low rate (63 commit(s) in the last 90 days) \u2014 so this is one repo-wide knowledge-decay state, not 541 separate risks. Counted over 599 of the 1024 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over. The code moved on without the people who understood these files: document them or schedule a read-through before the next change lands in them."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"008bd8d3156a7f5206da709f59f1f87af76671c6b9becea72c8c9cffbcbd4f8e"}},{"ruleId":"D34","level":"note","message":{"text":"Most significant orphaned file: One of the orphaned files carrying the most lost knowledge \u2014 ranked by size weighted by the file\u0027s role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/pipeline/rpc/_pipeline_base.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6753818c2741b7eca99996235bb82cb09f6fb248d5000dfd473b027693f20641"}},{"ruleId":"D34","level":"note","message":{"text":"Most significant orphaned file: One of the orphaned files carrying the most lost knowledge \u2014 ranked by size weighted by the file\u0027s role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"be05f5a881f60175ca046c5a5a7edeaa9fa35bcb98c466bd7e64983f4fb2b9ae"}},{"ruleId":"D34","level":"note","message":{"text":"Most significant orphaned file: One of the orphaned files carrying the most lost knowledge \u2014 ranked by size weighted by the file\u0027s role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/attn.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1830590805b11be44b978369266c4ecbfd271375c18ad1784a48d32f7bbcb13c"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/qkv_fused_linear.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4e935f3bd50f31e92b2c3998dc9568294b49353dab90df0ad8f2c2cbf28519b"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/bloom.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"28cfbd78cb9881813a5c56c85e8dd3d3f4b2a5dcda55030e60a1e21a040b4c2e"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/_operation.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"52b02f50ccb845fafaa593010216ee5c634e7cae9e8e3bb4749c06d2822044a4"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/openmoe/model/modeling_openmoe.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5491ec1ca67cb24a01ac15afaf3bb541a89eeeacb15d734aead36a292392cbb"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_3d/layers.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfa7439c6c7de2f492d37ef78119e41c6f2aa5ebfb35e2d38750536270af3564"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2p5d/layers.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"68a79af589225d1722c4d2c1a4ca924f961c63f826c24bb5a3795fcf797ec0f8"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2d/layers.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9b52f2c53726051cf08e21eff1dd67d41aa25cbee6220c236e9ff77a68492e9"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/gemini/gemini_ddp.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"803f1b00fae3acc919a952d0fbbdf621fcfdf0ea811431698092dd486b5161c8"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/codegen/activation_checkpoint_codegen.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0387f88f1feba6dfb94b3f21ef7feb7b3f82b8dc01a48b1b09b2353ea953d62d"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/gptj.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8df015b2074e002ce26539994fbdf97197bc0bf879581f70da5206819c2fcab2"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_1d/layers.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"405d01ba9cceceaede4e3753bc0786132230f78ce560d1eb8d926ebd5c435f07"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/opt.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1acf0dac336815d55bdb883c34e36c9469a5ffd54c5da846a8d28763b9492a91"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/pipeline/schedule/zero_bubble_pp.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c5e866ab0648928bf63e7f5864ae7e27b0baa76589823c9158eb5432ca3e12a"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/gpt2.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5a838beb70c372bae5ae812787c6afd88f8aeef2982ab757788d1c7a1ca6c77"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/matmul_strategy_generator.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd23d64aaa30316bdb8f1a73c921a571b8d964a90f009114b79ff64f667626d9"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/t5.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"463c45e3793875d3f69e9c0cd91d050594bc97d636741c7a89cb3578fba97941"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/engine/schedule/_pipeline_schedule.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"94a6b7930776afc11b2c8b4fe2558850de92175c53ca9971c87e895661e6409e"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2p5d/_operation.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"de86683d83fcc35fef27d44bcd95cae06f3b4916ad3f72a83b4ad9cd5441eb56"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/gemini/gemini_optimizer.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f52ba1f757f0d11507c6d6b6d32c5d2c029d7832c9d475edc80a2a6eef07e0c4"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/falcon.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd96b0e82c7c2b53bcac62cb34634e1e5b7aff0d7aded3b6826ec4cda6bc5853"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/t5.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb848a4f4d645084b2c016793c066ea3fc543115cfc1f49094dc3ac5719fb4b2"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/tensor/shape_consistency.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bbffd9b07298882c7f8e5d427e06394abdd2b7b33066eb3bf92c0f79d583526"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2d/_operation.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1a8b951b30e8cceca0cbb89a03523bcfecc23ff51ed356acfaee6cccfcd66c5"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/autochunk/trace_indice.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"362620568ac16442b32f13a09363b7ae3d850525a0f87e20a67e555f6229effd"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/quant/smoothquant/models/llama.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"25c72eee8ef540ed258901eda3e6e8f73b1d8b820246600b0100c7e9cd8d46eb"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/core/llm_engine.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d20d0f3a7fbcaff4c2871e5d93556395d4f418306102d38f2d668995606055b"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/plugin/gemini_plugin.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"78d6b1d2392e0e5f89d98d8ad89376bbc831389739214894f44822320e491eb4"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/dpo.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f02025dd77ec1f20bcaf76ebeac166d4c4070024e063b0cbf1aec9c810d5e0c7"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/linear.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"10ef99ade14f6d94c3bfec1a8b0739a4848d8e73f8a0c92bb176afbfb2b10a74"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/evaluate/gpt_evaluate.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"983bf0f9ec93c9981560664b488348afb66727e9dbbca0b83fbbeda93de4cd3c"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/pipeline/p2p.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"86517c682697a74cae6896355d9ff699fda5d3afee7b47a7b79bd663c27733f8"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/pipeline/schedule/interleaved_pp.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a2f4bc995a79920b92f1388b79ead805b62cecf3cd310de55b55359522c998f"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/kv_cache/kvcache_manager.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7f90450e20af1148e493943fb83e989fdf692796bf5c70a0e601778e70440ed"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/zero/sharded_model/sharded_model_v2.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"36db4ee746b849f7cf26bbff27e6f01f6479d61f27941fd9cdd59a7e3435863e"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/chatglm2.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed22294e2b05aa096d57306f879b5b0ede36f01cc7016af1ac3acc908317fcbe"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/gpt2.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0cc421345696a6860b08eb873afc244a23c122b032dd29d3060f3dc2dd76db0"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/distributed_came.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"83d7ba3a4f0bf190c2593f37a4028d7dea6651c71643386ae3aef16af0a06eb7"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/mistral.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c25ec2f978585bb2683b128ac0e20636bbb4dc0d5420245689fbfb984c7d7e0"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/parallel/layers/cache_embedding/cache_mgr.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"66c4ab974fdbe2ffa564317d2944cc53b03f3945946d6c9fac005fbe61d85768"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/tensor/d_tensor/layout_converter.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7733d8418ecef0c781e97a244538e76df3b1342eb04421927052446f33fe0f99"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/zero_bubble/grpo_consumer.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d340cf6fb19bf9b5b705b1409945289e5974c60ec9cc43461983dca142fa03d"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/gemini/chunk/chunk.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"05d25cb795c977a0d130f3656344c8be614c129e3f5229c179f05f6bdf6c1a1b"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/amp/torch_amp/_grad_scaler.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d884306730c60341f5c561817512d9acfdbaea03b03f4c6033c18df72732d23e"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/context_attn_unpad.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"32eeacd4c0669cc1542ec0d0a09bf04b7e5fcee97ee073615d61a65dafc81726"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/models/huggingface.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cafc2ab95db95ff8ed7848bc007f7a0419ea3e8b4f2b493187471b477a5280c"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/experimental.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3ebb31a1e2c41a7816a82f08be2e9b86a4ca6d6d7bd83811754e8386eb5454c"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/batch_bucket.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"45708b2250611a6a06c638828b1c49eec30a9466578d736695a113cbc7789187"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/modeling/layers/distrifusion.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"848281fc64dd50304d63e86c09d66fe8743245f38b594f5dec96b2a894538908"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/zero_bubble/producer.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7808014c58570cd5dec880017f4102e410e0225ca6534b335bef2603c2778411"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/autochunk/autochunk_codegen.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c83003150e372d5caa0dfba5b06f32b624c371867fbff8876f5951a32fd8177"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/bloom.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"38cb01455a004052af03cd4365acf41ad7db71640873448cfe0bb29a756f2b42"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/tracer.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"74f45976303129221b3b4b957c8214d90ba7cd004f1bbcd35366dc742096a5bc"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/meta_profiler/meta_registry/linear.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"21c2495bd3e0662c85a8c0a3a456cc91963437081ab31e41800c8ba054171b67"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/context/parallel_context.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"37803b8785e620e27f3d2ba591f971273c28c7935eaeeb81879f74c7e4ffe1fd"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/producer.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3d13006969e95d0e0bed6bf1e0e4a5861dd5908420714a7d4730122514e85a0"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/conv_strategy_generator.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cc2fd06fa51bd3d7a1009a075773646fb2e2eb1b1b33006fac74ff67195479e"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/falcon.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"87c8ac324665e1f2410684a1867f0fae6657872b76272d52cfa6032488fe77a7"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/openmoe/model/openmoe_policy.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c01f8eee44179a16c1b9eb750c0ccfee11ace7424b64dce540a9cd7329c3d75"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/tensor_parallel/modeling/bloom.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e7c8a01b7331c0f8b70b2d98d1ab0d9d7b5afe137cb7bcba931cd9e6dd94748"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/device/device_mesh.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"671a5c18bd0a0fa28e17586cd35e693ca565c61c7c28e05afd4565ba8b0f3726"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/plugin/torch_fsdp_plugin.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b86171fc21e4d1cf78cfe186178ef3edc45c9619e6ee248492536f4479fb57a9"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/sam.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"22ebcf337501273ee6fd626ba91a486cee5cd6c9914cdf75cd021f7c07449c59"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_3d/_operation.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca52c5d81ad2885dcab602e15841d2a44ec83ee08859bf23c500e523f8bf519c"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/tensor_parallel/modeling/chatglm2.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8000126de199bd38b391a0704571390708a6a12eab3e32869e8eb85692f1d481"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/train.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2635516aff52d1311bcc2ae5423eea09a4e900134894d45abc5c9848d6b0ea1"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/benchmarks/benchmark_ppo.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc3db6ace37fc996629842315d2ef6e14aba08a7dfb8050ac4df211553fcdd12"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/passes/runtime_preparation_pass.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"05485389e8c5e048651fb5c850e110c064ecdef664b08721ab76378f28313b21"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/config.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"124e1d8fd085bd255df3fe7d1dbd6c4248a1d51573382600183774ba7d9de972"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/consumer.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9052f7307a9a78172ce9560e6520f473c40b2cfd0ceda96fbcb519cb175b5b3c"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/hybridengine/modeling/llama.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e46328877486444e1b51d7e75f7b829637704ff701121009ff7bbce9d5d8eec0"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/booster.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a707243a754c06d12a0bb07dbdec40d397dcc4186c5740cbc2eb9b2fc609952b"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/models/vllm.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"39af748ed272f88e8e1aa53b431642026ed77f8e94ee264a5883c87359fb82fd"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/tensor_parallel/engine.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"96d3e55dbecf4578e4de23decdcee457702d873febd4982a292a83566ecf3c11"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/distributed_adafactor.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2299f3489ac584ab5085e516c92e349ecba348fd7e1c958afc98d654d43bea31"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/pipeline/schedule/one_f_one_b.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5323f58a7f5e367f06beedfb90251bb82876db27fcb7c9caf2d895456538996"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/_subclasses/_meta_registration.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc48a93319d0e81031ccb9b3d6492b2179a3a537f95882dc4614f2e9ea399a48"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/deepseek.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"700b6ee54529f8f31f22754c495698fbff50d1ecf3e6d88d357b883f0a44e44a"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/no_pad_rotary_embedding.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"741df180fb750017d90fbaab20851d01102eb1155dd65b0d590683333815a30c"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/autochunk/trace_flow.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"78432eee086a0a1985b13f0c93e250ef510fd7572a63af1b67897ff764d7228a"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/utils.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5621bdd74ca43194aa746dee94720812365231e74f1005cbecb50c91ba2d34fb"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/flash_decoding.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c23ee2d5a867a4b162afd193b9bdcd7c1c0d3885c7425ed530564f2505f3ba84"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/matmul_handler.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"cea323f8c023f73ae80dc2fa04f38e766304828c2df67c2eace8e5131918bc40"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/mistral.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a89e1bbf38eaaef7d9e21a50de7a9360415e68e6453220f398cd7180a0a80ac2"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/dataset/loader.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"004dba08d5939c518f73fcfcfd37a040d17da863961bd579bac964990d55cc71"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/models/generation.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"26f89f4520726e58e84b15db5348ea47cbb3411af01fb43b1e9609a0477b70c4"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/solver/solver.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b5e06414fe64450f86d6c02ed11eb508bbba0afcd090f4562caf93be5024310"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/gptj.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"acadf3fbaacf77350eba86a449b0c273b3b6d4615c6c57b44ca93a875679ad9f"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/offload/region_manager.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d10dd17e0185168eda83ea9f2c91c26ea20c5d3e5b827ba68d16670a44839fb4"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/pipeline/schedule/generate.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5d892f073bb400a9b72874a2ed2f722049cee3ff00932eec3c32df87a746cb2"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/quant/smoothquant/models/base_model.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a820a8f6844d0cfd0c891956c91e693a5d952767b83a9cdfa4ecb7ab4185eaf6"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/checkpoint_io_base.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9fe96ba925ea512d98ed558af5329b6cb3b030fab28feb09ac0ff36d40e166c6"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/initialize.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e350bc671cd52c4d0d525ee997cb8c3e79b9078a6a82c9ccd161d0feba83445b"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/rl_example.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"28f4b0cf0a73ac0936343e56bd73e51aec071e76abdc563598e6afcdb5088cc1"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/_meta_regist_12.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"bede98a4aa9f87b108de0106bf5c0aea0157929719e33b24dd9cfd39136932ad"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/pipeline/schedule/v_schedule.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"70626cde52aff1e3e62befcb7fa8b1d75343ccf3e029fcb4f3e12b34edc4fb0a"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/fx/codegen.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7382382c6ab95c5d5ba8e2a7b0e7c1d79f63d5db6a6b44bd6eba98c1d84db346"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/zero/sharded_optim/sharded_optim_v2.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6742dc516141a69e63c30aa73b9b6548c178d66bc2f3bd0824b60aae07499305"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/reshape_generator.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb94450ad5ce908a85c2f107cad52b88d4985d407837cf246d930b3a6df70c99"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/_subclasses/flop_tensor.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1dc80a6d289ec8e5f1fd61633856e359f406d201aa815606b19b6d437886ff3"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/tensor/d_tensor/api.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"514e21b07ea5c6ff7e517842fb271bafe365074cd1463f820ef7cfbde39ec68f"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/checkpoint/ckpt_solver_rotor.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5eac8512dccfa816cd244e00adb81152258f66a5fd45df3aebe18f5ec3ca4f4f"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/zero_bubble/consumer.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"931db7ae907706609b7caf24cf0e1d57be6272b5058bc77aa2087b313cce7920"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/offload/solver.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"004ba5953b10db64c80a3248ac5f06f501de9733aa37ebf351a5add418d095cf"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/ppo.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff985ec400dce8a43c5294b78bc0378d00507ebc63a9131f057930a1a9eb67d0"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/core/request_handler.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a4dfd83bdbbd367ea8e973f49e885d77c820b90d9c35fcf39df8188183cd9fb"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/load_balance.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e2b994787ce99d40e320ecb77dfe61d49ba73767739165b1bd0c4d52118fce8"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/offload/training_simulator.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8b2be1bf745fa87f5aa4229d2f4e54de6c8d2213529e928f35b14b2569e6a4e"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/tensor_parallel/modeling/llama.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"78e636ac290cbacf9e842312432fbeee567d632041d88c3bb1ebce3db32c9e58"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/parallel_module.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"615be44cc3932297157b96aa54cd52e3888bfab016523c5f34ba42915a3d5727"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/grpo.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6e00b9a44331da0e0d84f4f0d0b5b7efae27f4969071dd744b93b6713107fa7"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/communication/p2p.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ce1c9ac44bf329540d8655984047fa58762e95c90316badd5d9f9a464b3f50c"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/device/alpha_beta_profiler.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cd329cb18fe8b5b2bba18f464c32a0cbfee66370e36011e58b14c96a5c521d5"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/rl_example_zero_bubble.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9002821eb770c857a9acdf0923028352bea33884cd1fda86fef6ceab21c3e14c"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/modeling/models/glide_llama.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b00c2f0b32a7518ee8b2e3368c3ea994cfb9c9644f56277fa41fb47b01725f7"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/chatglm2.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a5da6c940522d0e7f813a8970b5d20c3c65d177ce29ef32d463a6f984e316ff"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/initialize.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c080c981b6d923a5677b74d2ae1857a62a5788d3b61c540abcd2582868b122ee"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/utils/common.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd7050b04c682a4ef89b855df2a5f96d9bb1d0375093dbd49d906c61f01e57ef"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/layer/layers.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c27107d974b21a9002681c7b74dba286c5d12c34b5b40fabcce1f7e5004e5fd"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/dataset/tokenization_utils.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5dc87211349f416b863d83681741b49dd19992c3becd199d10c2b8bd985f7163"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/node_handler.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"535cc70107eb2a6d38f69d9cc14ecff25e44b46bd99ce16b76732fcd39d320ba"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/trainer/hooks/_metric_hook.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"06e9bea6371e77e3509df05079f13401d4ba03db0bd41983ef0eb4098acc5bc8"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/embedding.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2197fc99938d6f4fad987390ca6835af39b633c919b286c04a1458ee0cd438bd"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/kto.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7afdc88416fadf349af204a172a1b010aaddc1086ead247d1321fa791242a6a7"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/fx/tracer/tracer.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6540b42919bcb37d5772572dd12aa0c91065e427fdb167cc5b27b58df6908ad2"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/loss.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8556f58f85cb31ea86f74a2c28bfd80737154df5992d66a57cc6d53c2696148"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/profiler/profiler.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"83a55ef7e28ce457b4066637da9fb642ce6d679d37b06dd5d54328871e9e40e7"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/orpo.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9c209dcc491151a30230c7f00d3e050d545b0b41059679964385d1831c80af5"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/evaluate/dataset_evaluator/dataset_evaluator.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ea7a21829b1be195c277e25ad3948f9472191e3844a6ffa9585d4fcf9ece85f"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/pipeline/rpc/_pipeline_schedule.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9205fdc7d439ece290611bc4dfeac62e7f2a7322e13b1d5fdb53ea802b49ecb4"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/trainer/_trainer.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e94ed964001534e46c672ab9dd69e8c41e969c6e666ec7f9b3cbdb3b162b6d4a"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/vanilla/layers.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c78ee339b7244d00c2a9245a6592fd6a3f88959784aef21b806081bc0a4c7fcc"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/models/lora.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"88b3093ced8ef720258bd01e107b172429c3ae3a2365fa390efc24f5b145dc3a"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/batch_norm_generator.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b59714eacdfa3e4c66f90d8f1f481830755cb02602ee455d858d97bef0b452b1"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/experience_maker/naive.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ecd75e8c125151adc80989f3ff41608cef1c3f995ed3f37497f3987fc042be20"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/passes/meta_info_prop.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"89de7cf79bc492fdad4eef121dccd08acef28a2ff7fa7b36e959964229a4a160"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/openmoe/train.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe763e05ae95eb4c46ca37d65aeb31597c1cc54d73974347ee75457ec672c2a2"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/quant/gptq/cai_gptq/cai_quant_linear.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cd8f647724d564fc02c60d3b4eda16ce041864443adbcdc073f98d9c233482a"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/models/chatglm.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b4fa1240cce4f692a8378316db1ca40640617fc7a27408e2b5704371b08e694"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/passes/split_module.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"dac218de1732fe7e1947b719b76ce6c5bbd7695ff502aabeb3834f9b827655c2"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/modeling/layers/attention.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ae80296865ea5ec986ce98f319df0076d208487ac3cf5c095cd4d95e7442129"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/linear_handler.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"039d2be3cf441ca91584f5f18dfb5db3da59ee4a549dc393e890c35ba7afb4b3"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/launch_zero_bubble.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fda9d6b1f2b3b0f871c5ceef2f4ac27b70104cfc939011f70b9a85bc72b99db4"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/passes/adding_split_node_pass.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"861b066ceae38eb203fb779e6dd1ab776d9c6974dc7701f0ff5ee26eaeaa9272"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/amp/naive_amp/_fp16_optimizer.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4d4b79f30af8c919384fe22af5ab35ca19ff27529175798ae5b490fb3c44a87"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/quantization/bnb.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8ec00e6e4e73d3541d27764cbcf7ba27cc8fd43cfc71421ec23eda9771ff697"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/context/process_group_initializer/initializer_3d.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"009a4d038dab569cf2471c1698c795c54f510573783cea4182542a799b007914"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/profiler/opcount.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0e1dc9e602800837155dc0c458402676a94fd1f03a9ff120cf38dfd6ddd35fb"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/trainer/hooks/_log_hook.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b26d423c399b179bf4059964b805682c85a9fa9610f975d4b34625387d956898"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/strategy_generator.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6beea78730a2041f6127f1b56941847f9f02c9679843b59f31eed5fbb86ce59e"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/normalization.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a29458f98298de6badec824ae8d54f4c815cd886d8cf306fe68dbd9761a031a2"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/context/process_group_initializer/initializer_2p5d.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e72d0e7331270228c6ce4732f8b3f5a2e5da5541b3e36741a33cb858ef7c1ae6"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/core/async_engine.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d184c1c3ae9b4a520c3010f8dc1ee5d0e394fb5683593f29757b998298a3164a"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/gemini/chunk/manager.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"62c3c0acb79023f9d40017e8f70b317e929e024f3bbd1645ddedbd2651f6d624"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/distributed_galore.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fae7f994317f6760dbc08d48152668943387a5b85cb84152760df9822431aac6"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/fx/passes/graph_profile.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd1b39234e55f90ec52683d1b0db80847eccc4de8512992552359046511be16f"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/colossal_llama/dataset/spliced_and_tokenized_dataset.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"04cfb90523c96190e3d6ec44d591c094fd0908253c13ad6069e5a9e36f167648"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/executor/rpc_worker.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c9a575bc83c0b9faa28be83c33339f44de13c706d6c656d77819560952d5eab"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/passes/concrete_info_prop.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"842aa3c9ef24387b0694a0c2baf519a68ec896d154584c6301a83db173753134"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/inference_backend.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"14fe62e9013a1d9d16d7d368b563ef28dc419994c3c778c03ef4dae20c6d75ed"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/galore.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"76619845a4fee97b49d51958bd946511707f5ee54565180894380b380531375b"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/embedding_generator.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5f6c4dfc3e3bb46a5799c64363785b2ed19748d334a35791038d5b99c0aca68"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/core/rpc_engine.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"14333821323266fe8d003d7a39308790bdbc1957ff8b00efad2ccde7c20a3524"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/gemini/placement_policy.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b5993fa1efa0d76b8c34e46db53cfb9fbefdca449ba668a3df56e56baf0f32e"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/plugin/torch_ddp_plugin.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f7158fcf64dc146b4591fa7076e3a850960317ca6d99d4b86a47cea80df6619"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/ray/experience_maker_holder.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9b53d580f994e40343766a78539f21e40cd1b978e02db38ccaa5a200823719d"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/autochunk/search_chunk.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8b02f612868b510b0b0b314647a81e66bf7f39029d95fa558c67476912d2a9d"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/manager.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e8d89d9cf0d04cee28c1f3fcc1a0722f9a6287a64a7c081c4c89612fd228570"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/cluster/process_group_mesh.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd6cde177e3f2b02ad392da01ae9f6241197528903683e4482d55b9ae3268304"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/pipeline/pipelinable.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5bad1390fbb2bc4056e6fbbc86a44ce5e978eff0e805a1000fcd7a04486e3450"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/models/loss.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1833ca8c7a5a44c03e03df6b7411c0bdd26aea071cb5388b6bb48d4af484657"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/embedding_handler.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e2abccb94441129ac22baa26f5408fb27396aa75096e7711ae139bb60f97915"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/communication/collective.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"62d43e2afc7474f3645a8a06efcf251352532ac889d0bb80f7bb00ece6f10b0e"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/utils/checkpointing.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4b9510366e742ee0d0aa6a97a3849e117027e92f9b9dcdade4702a3207e23e5"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/passes/runtime_apply_pass.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"54817aa65988d571795693fd469643d063a8bd7fd788a6f9c0c56d5b0d454d24"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/zero/init_ctx/init_context.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"802452cace4240c2ba58a6145590536181caa925b33e7797130ecdc52d47969e"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/openmoe/benchmark/benchmark_cai.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a01e60a51c39312480d39c080477d327b45d3f7999988c113a52fec89ea3270"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/rm.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e8b3fed1f4bed5b4a23fefb45de856ccb5fb7f438f1b5f2a127af601fb45c57"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/sharding_strategy.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cdf88c9a3be0946d8a83d7a18149a0d643d9c6a7f950be4b70c9229cbb26aa9"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/colossal_llama/utils/stream_chat_patch.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"81ddb103d832230a45896ae7b4041d9e2e54cfcd18630f4fc97d45e5a4222f2a"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/cli/launcher/run.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"be5f6022b5253a89a3a09120af0acb06f1d40ad8baf96b4a8172b77e8ad144be"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/kvcache_copy.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e412ff116d0ed68b33cf112c9dac740dacdf931bc6aad25887da9eddb43d64a"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_sequence/layers.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fff5ae8c864833eab7624cb57906aefe875e2eaaef6048b6834caf92cd8374b9"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/shard/sharder.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c999f641488d752256ce0faff40bd59f12da8bfde96eed2545fef94bbddf7c20"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalMoE/train.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"877dc1a6a9c116d3135c18b9ffbbf45ab33823e32742070967e4f6081ccf9466"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/tensor/process_group.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"25a5a455752f9b5b38e0c4b5c44b19945717edf919703699313ac445a7ab0e40"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/utils/profiler/legacy/comm_profiler.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e008bcfeec69c9121075f6ba15eab5500c65ae7d2e3f5d9af0dcb680a5dfdec"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/sft.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"50d3cf8b68935cbe281b14055d931345904a4b9345d175155ceff5fa0597ffc6"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/dataset/agieval.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7c262922580e80ef5ef4ddb3159aa0d63c01009db16ecd2786ab88c9fb400ca"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/engine/gradient_accumulation/_gradient_accumulation.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2261bf0a20a10e24a4245fe310bc6f7feeacb909622a42a936886f1208f25b9e"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/accelerator/cpu_accelerator.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b006559a4af6cb360c8c84b5cea2ecaa9e60d04feecaa527444735a8324af0ad"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/solver/cost_graph.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c77474174d580ae60403087fa16cc2663d92201c98b4ad5adeec86ab3daf2acd"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/parallel/layers/cache_embedding/parallel_cached_embedding_tablewise.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"854a34eccfad78746669fc5d7ebcd691585db769b6fd89fee13d8c2258dae833"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/fx/graph_module.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b01124bf5832ae0c187564e336e1fc560c05bfea65943c93db97ad15a47a194f"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/fx/passes/shape_prop.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"464580eeb70ddfbf629368610693955bb33b334af2511deeef695c6f3dfb4789"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/offload/runtime.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e6309df1c3493b90bddc5414148efb96a7bc1ba802b2c134fdbb21a1b1da993"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/init.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"363a17fe6e40d9cd909678dc0c30eef8bc25b2b0dfd46b1d2a7e701da07f1241"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/accelerator/cuda_accelerator.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7949a399d2af61093d55669a46daac8d3c41ec64e98f14f38337e5790809235f"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/accelerator/npu_accelerator.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"252f1ee1660184dde8bc6fd97001599226f1fcc67abf9340533ce98cf1e6c762"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/accelerator/base_accelerator.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba86c3808dd7e1ab681cc11f1c6d8110b825beb2eaea1dce87e61c641f07f649"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/utils/conversation.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a54778b1b0ba5a704e24b9f683bcd2305dc7378f32bbc265cff7d749862fddb"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/meta_profiler/meta_registry/norm.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b776b364f0078f8850deedf47df4ab6f6d5fa41971c4ffdc7853247dccd6ae85"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/autochunk/estimate_memory.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e57bb9442dc10f45f24456344e0e59653003e31df7c8a32b7186c7b3fe02d28c"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/testing/utils.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e69a21c9a71d690b341a1458a77f67bae57f3bc6000b84ebbf8545880542788d"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/layer_norm_generator.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"243c26073ca70132d578d070bd9d5beb7e043a3d9f641e2be758151dbbda7f65"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/pipeline/stage_manager.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a94ed0e4c899fd4699c290e6e71aab2cbbfe8772d43af68ff8b62f812de5977c"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/openmoe/model/convert_openmoe_ckpt.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"29051064b67d35716cbcb5882dee8ccd51c866485b1c407621d729ef4b67dda1"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/utils/reshape.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d3353c90c5e2c561e19a91a299ec53cac4e578b57c42fd39fbf1575e4790964"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/fused_lamb.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f961bcae5ffd88b6ed55f25d6eabf868ae9a9b031d8016be7bc5f74a91858be"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/communication/p2p_v2.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3062834d0cbdb3031578c3516ba5eddd4975cb4864b2dc89b8a9fe8449c7a80c"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/pipeline/microbatch_manager.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfb29dcafa07dc06c144623fe87b5f1243f27310b071dd84ad9bacb700257813"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/pipeline/utils.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a44678ccd274f0398a6c170ac693cbb1fe6c8b18986016e7a39ad89bc941c15"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/cpu_adam.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b815060e5d32e988f8b3870fe522467d0312185bf4b39900fcf045986b18ab60"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/base_policy.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f3ee002c635187bdc036af929fc61cc5dd115a6c7328007758fdf25bbe498df"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalQA/colossalqa/chain/retrieval_qa/base.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc4bea9ee31b791ec16ea6afbb94e1e9a72fbb5fa7036ddbfdc8b7608ce27414"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/ray/detached_trainer_ppo.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4de9fb547d1a14c0037f72f22e638f1da3a9ffd78ffff452ccf14061a44f2d93"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/parallel/layers/cache_embedding/cached_embedding.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e64144a39ac47d8fe787ecdbd7b186b6a3ec2d2a20f648c8c3621aa296e5c318"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/tensor/dist_spec_mgr.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f9e917cd03d46ffc5722c13afa042ac52987c4d8efcb16cfa66b50f81afbb20"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/_ops/_utils.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a17c5204c1bfa16d1d72635c09a5aa77a9e248faa70ad622934675a2dbfa5ea"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/low_level/_utils.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"28ed960f5b42d7099fb48306f9f30898f3706f390f7c66ca02ba2ba9e13917bc"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/ray/callbacks/performance_evaluator.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"76329bc2e576f7aaa3588e2f9fddb5120296d76eeb11e2100250f996b7ecb0b5"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/fx/node_util.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8942ccc4131e69a8b20fda074e07476b0c610cac51d963e06819e9d904738b61"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/solver/strategies_constructor.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f387d18cab40602c37f5e72d7a0247f1e56aebf5991da4a6b0f9025ffe625261"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/utils/profiler/profiler.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea9cf38a3f63f9e4a6b3dce9c491bd2505e787152fbb3c307fba798f6a60b20d"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/cli/check/check_installation.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e28746da6f39333a0324d463f397641727f780abf473aab4a9c32d4e79616f34"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/tensor/utils.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4eaba3f9c987b68c4004e7950029f518e7b6fa9a1f5e4c567efb6df018b1958c"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/amp/naive_amp/mixed_precision_optimizer.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad8ec47483779b949a8279c9b45aa6f14201c41109dafcfd8de1c8ffdc653bb9"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/utils/tensor_detector/tensor_detector.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ff1777c9d0f692b38a52231d3bb3d409e24aaee07ef1aab60a7417678c0623e"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/server/api_server.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9013c11aa15fae6993d981a537bf41ae1adde1d80280001037b49bd4ed24032"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/utils/factory.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4468d3fb13fa2c4e7bc3b9e407509058f93942f5e4106b58b64f91b17ba7e701"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/zero/sharded_model/reduce_scatter.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4beebcb622060495dbef959a2142d15b9075eaf42a459ea41a88711933453ce8"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/serving/torch_serve/Colossal_Inference_Handler.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7acee0224080e4e511659ec4d2af9696b46e825602b7308d15f07333d90f6849"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/dataset/longbench.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d2b3cb53ee8893b79e570e3185e8e49fa2bf55462f3b89e3dc6009a2fbe2e38"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/autochunk/select_chunk.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"93bd67dc2d85d4d8d22d298ee52f2a2a8b830961af6162db37c02ff3a5bddd1d"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/benchmarks/ray/mmmt_dummy.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3323da9b48c28ebf8e10672f10cd04b810a0507fef79dd63f7da95e339975518"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/hybrid_adam.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"dba0631de6525e3a9de714820f5980304555cbe5503d74061879af8d9d0fa67f"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"extensions/utils.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d1692bf78e3c1bd4268d350927ab4b94c12ee7f222a6213ad223765f76eec8f"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/engine/_base_engine.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e8dbfe60b9c04855d485763a62c33649cf978218872618674b179f47cf5f77e"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalQA/colossalqa/memory.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb1dce06c5dc68b79dd179c9e86b23c13dec5c7164c5735cff590d664c896810"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/core/diffusion_engine.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad88228ab61fb65d3f0249fdb9188372801f7d82547f73255176421912010e9e"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/lr_scheduler/delayed.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"48b2ee9e3563fb19033b3bf3b4c6153fccac8b40ee3976a54d3fd289bcb85177"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/checkpoint/ckpt_solver_base.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9489c77df037a90a5ea5fab5ec15bfe93f5855120285c105ba3c14220b39be57"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/distributed_lamb.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff828172044dfac04b47ec315de07675cd923e7805be7def28fd34050547f163"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/gemini/gemini_mgr.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"054173ee21a7c953edc8baa404d39ebc550b7c7526e19eaadf3fc815d85d470f"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/meta_profiler/meta_registry/conv.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"14c3059db38b9fb3e6e51d3889efe8a29c4c2095f76b64e3d49222de8bda79bb"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/launch.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c567bf746fcf1c198da6f38a049462c4a88e664473e85c3b2b421ce59f544321"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/_subclasses/meta_tensor.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b07e83c1e681c03f6a92066e72c6d96a6f739ab852cbc37fefbe3cb13ad597f0"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/callbacks/performance_evaluator.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddb0fa0c6137e53092cd0d9c7539ddb5984b58ddace4cae0093d2a3692ad96f2"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/utils.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"75d8b625ecdf5e07142f6998a332d59aa19046b9c29448a4f3abe9db4e6bf21f"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/graph_module.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2687339fba3ed5f36f5fa94aa6e44c7bb24d59402b7e5110b13d492e4e72bc3"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/benchmarks/ray/1mmt_dummy.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0be2e62282888e499c5463be8935a7b80d4ef2293da6a08ec3e42d3ddd772bb6"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/meta_profiler/meta_registry/pooling.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"81dee44b962a451d47e86ef98ff440146c385ecfe72ea23326d705e2aca30448"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/getitem_generator.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"27095f169eb3d5ba2dc33265566573055671194fb2fd81bd5d8e9088b7a3ea08"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/zero/gemini/colo_init_context.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"523dc2c8614073bfcf123f0801a68e5ff0438de6b9605f71b14dc63e267a60ff"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/dataset/ceval.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8dcd97ff910b640f42d97b5bed5184931c6a4a8e4a8c14d9afc8216e6ea60d73"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/utils/safetensors.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb4f02c15408159d8135bbcd953caf44e49f24e2def5bf37c6be0e61faf82458"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/cluster/dist_coordinator.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e815518e1cf58e9b528ce3e716eaa0c7715456f7508423bbae6d34b097b01c9"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/autochunk/utils.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb34d72edafc2ab388d4e76da345dff52178e394f7fcf5afd83d195438d7f4c4"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/adafactor.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0e50210072fc32de785fc6aee2a9aa88f6975e5a58f248baa61aab27550bd73"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/parallel/layers/cache_embedding/parallel_cached_embedding_tablewise_split_cache.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2aac86a591ed5d6591fa9d41108df279a8937c9ec4a3d98c38dc0ca82e9eb90"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/engine/schedule/_pipeline_schedule_v2.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c31405b43e49a03ab1c1ec4c5c56024f954b8a7c6614f481a774c4633a9a0f5"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/base.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b8c20087dfe4a9adc651a9f9d4453e36bcd0f8a993820f37406431a45cef37c"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/profiler/experimental/profiler.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"73cb102455276c56c2cd032683b97deaf7022ef42920b759e3383ee87a9391aa"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/ray/detached_trainer_base.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9610e6687a5f9dc4bbe7ace1c3234f9e7d366b3857ab9d9ae292b217d5ede718"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/hybridengine/engine.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b310e0792a0799a76f48c769f3988b35be3a2da444ef589355428db30dea0593"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalQA/colossalqa/retriever.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"499e9a93e949b33c40981e7c59955e029a4c8ef2cf01e93024bfa3dbe9fdacb3"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/zero/gemini/stateful_tensor.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"829b1c657b9b07861e38edec7b7737ac64c763235a9cbcad5883b46e8e5c1f8c"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/utils.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7094c335c1e7ea8f3e74bf05f7e059de37bd97ade0c7360c8b36d6e10e1cd295"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/passes/shard_1d_pass.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"089a11c8b576b88743fd216a6553d1c72a1adffefdf951c3671fb934b4cae59d"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/llama_act_combine_kernel.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"20cb1395a7a5ab4f33c7e4fea5e039252958d9ecf47e30e98c1e7e1a60c2069a"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/offload/amp_optimizer.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6dc150d20fe4a28ec58e9e80d51cb0204f68f62bce36f287e7cc199f6225dc87"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/pipeline/middleware/topo.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ef930c8ac8b55c8816b3ec401a33fbb7b8c39168ce78fa3952ad9f92425cbf5"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/meta_patch/patched_module/pooling.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ff8ad48364d6f2bc4f235d95ff9e77200066fd3d363c484a202c1934b3f75a2"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/nvme_optimizer.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce61d13eef8ad9b14ced7318e0ffa62b5b4702c1cb4120ceebed487b7636da32"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/modeling/backends/attention_backend.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"748b4f1453504d8b0cec897f40b49b7bbfa7396bcf0f824d13b58d45687e14bd"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/layer/scaled_softmax.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"523ae4fc504da246666ef21a28f9ef7ec852da04e09468c346f19df5bd09f4f2"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/utils/data_sampler/data_parallel_sampler.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"236e15a0919c7d05fef94b8c3569ed6e9127731bc9573399514901a7ea1030ab"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/initialize.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c7b38bdfeb1973f01ac590019e248063228af784d14c4aa644288a36cb409f5"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/logit_processors.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b834fbc6e125076b34927fb4dff3001334733aa3c1ba5fb8e6fa51c4547f42ef"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/colossal_llama/dataset/loader.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"79fabf3ee358485a23c37acc22bfb7d45e4facdb826d80fe4b39f0e311e04227"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/dataset/gsm.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"80afe7d52798e8db84d55882d90419b3445c8f7ae07838363e433776b14c97a0"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/dataset/utils.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd8d392fee58d8a4eb607e52a065096f9cc8e4779a12e0888732bda22e013f46"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/interface/optimizer.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"212f5e25afa4321a37b4f8c1c5aa66858c586b7f23af24881ffcbf26eac2d374"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalQA/colossalqa/local/llm.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae5f8081f10594b2ae52e9a681ff9a478b6ab7747682675a59f232ef10369e8b"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/fused_adam.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb6c0fbb1f552b48f71637d5d5167327536f21ea91db1374305995067cfd106a"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/parallel/data_parallel.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"51a66aff35d45f053874b81ed3fe5541823a8a10175b3ab2eada9ca9862251a9"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/dataset/conversation.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d8391be30c01660a9e45a60f28bbb2ad430206598f5f83344e58b6918818391"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/loss/loss_3d.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"00c1f45c017f073a8e8d10b3fd464e409b904044426bdf5a1d86940a723f7f2c"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/utils/memory.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1555022e6434853d8f2cb377fea884f5d87098fa23932e1c37c5e44a217488c6"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/pipeline/benchmark/benchmark.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1619ba7fbf45527b5a9e82537b869d21f1569a6f95fccd2ad1a89d96858202e9"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_sequence/_operation.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"de611179bf6afdcc48e23f0f458ebf1a1cc0ec562a04bded25b0a021af0e7f03"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/zero/gemini/tensor_placement_policy.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"af9533cde33ecae5c465aa2fd75acddf8765d47b6e27e0e3c7231cd87aeb6e54"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/dynamic_batching/ray_dist_init.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d13f4304cf6c51604c28afc897404a0e8f7d58163537107be5353b76983a07b"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/gemini/chunk/search_utils.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"83f7a17ee1e35068e5baebc30bd2580ed14708c7f27bf2ac4bafddc6ebd4e398"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/profiler/dataflow.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1693785d3ef905317fa97ac188176b8d25ea7517779c2dcab898516fdf8a7fa"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/context/process_group_initializer/initializer_2d.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6652da24765f205dbb2dd8634bdcae8861ac7a42e1bf9440ad864254df95eef2"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/quant/smoothquant/models/linear.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad43c62afce7606df8d452cadacd253eae22b3e176d74917baa07359c1c7c4c3"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/layer/experts.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"edd1e8dc96b70c0475c846419b3432d93eb931ce0033a8c02b09a77474c280e2"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/layer/routers.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e9b157151bbd1157e9323598d73016c93e8a506823b8dfc9ce86f4ebe052ac0"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/passes/utils.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"512fab91231ac80a3661fe33ced9c4af5b1108db2ec791d6a9d594b6cebe3f8c"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/shard/shard_config.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c6635a68aa5071192faa69c9535d6184222070a25b3dda06474b2cfc51c8167"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/colossalai_layer/embedding.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"77645408e47a22be8627d58e6a6fc90e62b12572fc38956cebadee37133d4335"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/pipeline/middleware/adaptor/fx.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"21a19e72eb6183ee7c2b752941de4745d225ffa1aaf11058b4d38c3bb1b040a9"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/logging/logger.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d51a810efbb7811d2384b02fe50af9090ee2a1817494d0bcce9aa2d4dbe144d1"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/manager.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"13777914ce4d3457198f423bf780197081667b47be08b62722cd1ab8830aadd2"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/amp/naive_amp/naive_amp.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e2986885cd1ad6804942e5350983f8736ca570442a4cfc148d7c6664ebcda1d"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/passes/meta_info_prop.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b25e8d20d580c3a21857c9b96e2d6a8b8f70518c38c044d13b5da03465ae00e3"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalQA/colossalqa/retrieval_conversation_universal.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d57c7503b7ec4d00ba45df75c093e5e041bacad9c0a6578c13feeb09062cfca"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/fused_sgd.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7bb4a5dc4ede463d910f8a490deca701d13aa01c4586eaccaa556429a480591a"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/dataset/prepare_sft_dataset.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"01bf4b6090a7b0f3423bb572b627626f630ca7d094bf165011605fd561d1e9a4"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/came.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"885d8738c3db28dff8c08057c9bb8e62435f18791edbf35bbe48e5bd40f4051c"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/comm.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6509d0a514b75b79aa5732ea41727098796653e98fc0c57d65e19f7a17c53b1e"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/async_manager.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"883e34bd8e89ee44b45372a05546ff60d9c7435fb627428c6ae3115824c52114"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/utils/broadcast.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"35b43bd86d2447949a88545ec66bf43f0e920e3037bba6b4d64014f19d29af2f"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/dataset/prepare_pretrain_dataset.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b434a5149a844c894ae56df9b0c9b76db37b973f91da3265c954f4eab5ef83e"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/zero_bubble/distributor.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd67f4879045d46af5f4361da852c7ee3bb72c11346b103b1b637074c0ff92f0"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/server/chat_service.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"aabf082641745b5e90c920fa18478fa4a15f5480ed46dfba10ac47522a46225a"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/serving/ray_serve/Colossal_Inference_rayserve.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e71c255b8e3a2135535a247236bb1525b5d59cbb7344998381a1ce354783db94"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/lr_scheduler/cosine.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e556188f45b046a1ea6b534dacdcd273d7129ba612978f04b145aa8f660efb84"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/fx/tracer/symbolic_trace.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a80a82d5bb5ad8f74aae6bca26224e9a1975ad132121cda7619e9d2bc8610364"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/utils.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"054247b8be8767a50a047c7f9ac40da9fe9f94eecd1c670213215d4b90c44b9c"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/engine/schedule/_base_schedule.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff8b05c9394777a39c9c0f0ff3e7227e4e161d0bd4a5275e0df5c5b43763f77c"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/solver/graph_analysis.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a111754d217af8c56ad850f4e74c92817e038e62cb3c34a91c80400a0865737"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/pipeline/pipeline_process_group.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9f8ede8ca6924915dcff2b40f5cf2a9b9c54245d98a0f9a62d79132a91444e4"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/index_file.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"58facf60b8aaefe77fdb8804605bea20f64c0572b0c5fb858b62529684948381"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/core/engine.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"61552b9c6d129fcad3fbe060e673c12ab95db6b8770357fec738787c5d8c919a"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/loss/loss_2d.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"66f940c1672cf184fa9f9dfbf6eb68429d49847a3246559c5326dd4f3c1bdaf4"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/meta_patch/patched_function/convolution.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b0a4be051fa6ea1c9ac7e5e9626b31bca2eab27b16f48e39288fcf3fbb7e778"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/modeling/backends/pre_attention_backend.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7d94883ba418f034f23c62ab930f3b450ec42e77a710b5ef0c0746145a58cd7"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/parallel/layers/cache_embedding/parallel_cached_embedding.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3108b857d0ca232dc83314d09aa8c1935aee52a95e34154a1e8b4759f606fb0b"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/device/calc_pipeline_strategy.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d85380218bf24fc35ed91ac9539057fe98a88be0b7a4fab3237c7213f4769198"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/meta_patch/patched_function/torch_ops.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"834dd6b5ef1f1daa18afdbec8733bcc9335bd926784742a99bd7db2645fde8c6"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/dataset/safetybench_en.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bcdfaa266f6e3739ca70b53fd7738b03bcca4ae409de4bf92e75da55fdf254a"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/dataset/safetybench_zh.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a31249f9d557080324f306e7aabb17e58ae317feb70d7f3e5d853b7b2a43f158"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/conv_handler.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"bddd483a463f44c4c7c65d10878d127f985ef46708493bc40fd7270514f2ea13"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/core/plugin.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"61e6c65b31c40a3d7c1e458b0e962a9aeab3d4d38499d32a3d2f6e7b6a90298d"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/dataset/cmmlu.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"574325a0b1929725aaeb20df9e7af292ca430295d56bc7b726186cc03ae90f5d"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/loss/loss_2p5d.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"df64e146715e7833a400fd7313dcc4b8d8c0d237f77a93598eea4e32611ab9d5"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/normal_pooling_generator.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a501b7db670c695bf4b9c4862ad9edb4fd8e2463f67e5a6df182358d33f18da2"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/struct.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a482e9ea2d509cae06ba2450d07ed3977e4150768b7840d609633c18984c2974"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/hybridengine/polices/llama.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d84f6d65cc9aaac68c72ee71f1ecae476b9863516b5d7ee4d97bd7d7ca2be5f0"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/utils/rank_recorder/rank_recorder.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"826d84d22c63026e8773fedb5176f935996987be848ad247eb35bdf43608c379"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/fx/tracer/bias_addition.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"af2dc32fbb7c6660add7334ae8bbc00a3eac4fedd0aef52f10eebfdad141a7e9"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/testing/comparison.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdf08f20cf495bfb654ede883d20bf5940a2c9f94a9a1b50f87184afa51f8b63"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/tensor/param_op_hook.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1697f672dd77883e3e7ac1f94c83b47c96e8e00c9cde8b21478c9e0e2db841ba"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/ray/utils.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"392a86481d4c1652b40deb0233b1e910ac03010448aca07d80ce3868145cf1c2"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/pipeline/rpc/utils.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1bab4473319237e4a43a902666f172f3a3a5c4e219026422350d961c08e70475"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalQA/colossalqa/local/pangu_llm.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"446d668af3662a1b5f755cf2857d3dbfcaeb0f0b000aeed9701f55bc045e3e5e"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalQA/colossalqa/prompt/prompt.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f574c650c319df770be668eb75f3ed999ef8431a4a2f13cc2d9c51832fd108ab"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/utils/checkpoint/module_checkpoint.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"efe897bc3feb579ff2d6e9f1d0f4fc1a685a6b4c339718f67c70d36db45c495a"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/models/utils.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fcca2fbedb956e8cbec457772f1c01d4b8c7613c1a8fdb7477176f33edfb1caf"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/trainer/utils.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f68b1f6bc077cfc616d7c066410c20d5260ee5f3b2269077eeafe414c6119290"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/quantization/utils.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe1a07b7f720e7bcfa5433b2af09fd9a01d86ab8637719dfe7ee185411dd107b"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/colossalai_layer/linear.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d02934a02052cec07d0e54ceade3a82cfc83316be7196b140d6a4e09c3d78cdd"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/context/random/_helper.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"15b243c5e26cb6f18d574151d352aa50589d36ee21233af6697ce4b53d66253b"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/offload/region.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c764ce2067782e11ae5be57860edb461bc180aeba5720767c9023563c7e95c59"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/binary_elementwise_generator.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"154e2120ee709c87a2963fd3e24e3702d9b711a8f9d83dc89cbe0247990af14d"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/communication/utils.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff4f1ba2631d4f9824e0979c1bae9f07ac563b331082ed9574f3972ee9e41154"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/passes/comm_metainfo_pass.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"aead66317b1e753fe4658a9b3722aae5ec9b034327dac3b09e73beb1e37b4c2a"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/zero/gemini/ophooks/runtime_mem_tracer_hook.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbc69c0feb8c71def536f4d69d225612bf9e4a9de4d58119167aec1fb410d1cd"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"extensions/cpp_extension.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"32bdc6835326a8d60da00c9b9a98c4dcae3824434b4b94f2fe6ad49fd6e74aef"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/blip2.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7d76f81a0c6eaeaa663ead0eaa1dcd5c58d3bb5a147a2648bb17f5fb7b71d33"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_1d/_utils.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebdf59562f7e072537270d51caa3d77a22903798ecbe4619f9c98eb2db8a2709"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/lr_scheduler/onecycle.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f27b0c0e496dbaae8eb9a10d77d81cc61aee7f59289930fb63de0abb4f491aad"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/interface/model.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5226d16f7cadd3b14b22325ffd75b3b531c91f3f8344c7e74f9c6f9299cb820b"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/profiler/tensor.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"191e135bc5f1fe95b1bf76c5f9a7e2f8f377ee793087d6bab5849e1127da0b76"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/binary_elementwise_handler.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a5eed120a15690d21af789ce9f7add7112bb066d2b7f997c0adf64e13f09185"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/amp/naive_amp/grad_scaler/dynamic_grad_scaler.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0eb2a6c86302a30c04e54678b16c2deadf3e1edc1e5c7ae25134fa9bef25357c"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/qkv_matmul_kernel.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f94db5fb9e0a12ec5be9d5988ed63291aa0399c0a66fb7c2a5486a78afde2989"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/sum_generator.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7bde7aba1c14d046082bfa78e4998d0daf46f0778b1aad2f0cc41c1d3823bd2f"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/checkpoint/operation.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb3e04a8c7b8f15c725a21791e91a3cd4fa20e5b2839b979d8c8faa5c034f56f"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/wrapper.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"47ded977086589d4be4c541576684d1095865f37305ff2b2597ac8f13dd2190a"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/tensor_parallel/policies/llama.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6c976d9b2674691553fd532a611abc2c7b5377eb55b2920a319338f28b53005"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/rotary_cache_copy.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a4119a96ba6ef627c30998e3c78ad7934086466645300b28c3aa7757d697840"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/mixed_precision/fp16_torch.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"48129f18c2f7dbc466bbe66ca1e26d83291d47979858cdbf67c80be77ada864f"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/zero/sharded_model/zero_hook.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"704cdf929d3bbe27866dfb2485d2c5f1786ce5894fb18c34282af5b69a858778"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/utils/profiler/legacy/pcie_profiler.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"82b0d772335ff1c2c5ca0690d69d404ee55f90b4b086cfe0af19d7f194b7edcd"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/fused_rotary_embedding.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa57037803edbbbdeb5c5597a70385909f2c793aad182cb6c018f2c38ff39d6d"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/_meta_trace.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea3fc6c51537887502d077ae0e3505f328c71d0b7e80a91ae4a9cfe664ddc5a5"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/modeling/policy/nopadding_baichuan.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fee9a31df80d2b75acfad438295fe6e7c821cd665112066542ae1191b93c4e25"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/bmm_handler.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9398f17598d614f137bffcecca3e850af09fa1e0a11a9621f6e99b48ec530c5"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/parallel/layers/module_utils.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"020eb9e1fc29e6e40c72d35b79795f22945e1e7c1b6010d732bf0a51549465c8"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"extensions/cuda_extension.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ea86ca3fd8f08d6b9c1443edf68ae2a17c15a7d3afc8a813e5815409cf865cd"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/autochunk/reorder_graph.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"045f1aa8a2c045cd7011f68071cb69a0b7a94e3d4e4bf98d7c85db25fd324882"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/meta_patch/patched_module/convolution.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b792ffe067c5a784b2e08a35f87b69752f8d59c5ea96c6da1b53558acd1eea7"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/passes/experimental/adding_shape_consistency_pass.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebe2a1cb5958c53f1d9ee79207cc7761b78cced78638de4fcafed0f04e3f1ab6"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/meta_profiler/shard_metainfo.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea2bbbb3bb94b0894503685c1b1a17497c10215f0087d68dc9d8c134c15c4fee"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/low_level/bookkeeping/bucket_store.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"802389b294eb26acaaf60e6c4be24532e2b37aef6b0c83f02274de56d19a5ac2"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/modeling/policy/nopadding_llama.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3762129a15ebc3e3f167b027d67f79736e079936c3e540b797873387ed0acbf2"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/zero/gemini/ophooks/utils.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"88b70669af960e0124618fb00b7e9c8c80a176eab057bbc64e803c754473c71c"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/softmax_generator.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec16ed9aa104107b4255a64a6f409ee8cdc6b7ce0b31bccdc94f76e3f9dde75c"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/dataset/gaokaobench.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc9959f5d6df665333143a31b2025f05a9ae39f2ff5eea1f168fb5736722b819"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/tensor/moe_tensor/api.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d06dbe2ed9f43532b275ae1b347ec5bd98e1837839a03da5c6f2840820939f49"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/openmoe/benchmark/benchmark_fsdp.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bf392e79944548214f9fcba38a0666f90b8b829038ab8eb3b434c6d1743f859"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/loss/loss_1d.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"92e85f5624d3de7733fd1b9f42c54fc2ab7423786e77b3f4e92ffa53f1684be8"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/async_engine.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4f71602c99cffe38ee540d63e3dc08ba05e6676df33997512dc96c876bfde3c"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/output_generator.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cb69d90345c578c016444de66d11d9a80f63d3919d039217adc5f67d454424f"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/tensor_parallel/kvcache_manager.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"85c220275d6c58b327f1c68100df96fbc149b3dfb33b3364fce8c8712c3a0829"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/rms_layernorm.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"28cf648c6362f6fed31fe4cc47b8783bc3a5f12d006e79b8e82602cd5cf0affe"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/lamb.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a4b3994892f9758ba3795d29cea376ea8f526fc0c66b3684939ab824ce27237"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalQA/colossalqa/data_loader/document_loader.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7a3ed889ca1a08a4450b842a2fd1bd0eacbe341b39b56dd67cad86d8698d86e"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/tensor_parallel/batch_infer_state.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c1bf07497303918708d70f9b00e098cb31bb5076f3f395c93b884ce3f725751"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/bias_addition_patch/patched_bias_addition_function/bias_addition_function.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5386be623baad668526e2ef8cfa6802eb363b6e8b8b524deb8650e6f30725b88"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/tensor_parallel/policies/bloom.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa813d1f733b3b7f507f84cb32eb1669699dede555e62fb4ee91c14ec2f0a26a"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/utils/sharding.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b206f2a6d137227fc9cd7756b470665c6c6fa1305a1a9911f61f5090e37a9665"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/low_level/bookkeeping/gradient_store.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e28a4b06da568fff37fc577c51f827be5105272bc75ed33c5215ce11edf92eef"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/quantization/bnb_config.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3659b1c33bd905d0f5e56c3501c95fe7d1d2b5a4db005d14fc51611aa385388"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/bias_addition_patch/patched_bias_addition_module/bias_addition_module.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"51cfe4d90b80f9948b74c8b43c34b74dc491b22e1cd8db8d9fd716f31bcac2c0"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/evaluate/evaluator.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b334cbab4b3f77aa0b752ff5cc57773414349277b5c6dd2e63f969ff368b50c2"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/cli/launcher/__init__.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3308ff92685facf580a6932cf866f1bae9ca73ab579d20b71c2ce2d266b48965"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/sampler.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cdaefe1cc1c46ada121497cfb8152b7a47edbf71d8f7ba929fab5df36a333f5"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/utils/timer.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6de709aeefb5570d5851dfc1c872fff044ca300ff6623b74e2f4ccfcaeabd6c"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/gemini/gemini_hook.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"939f5b6be99bf07236e426117fdde81c218d57c2557ae27431708b4092b4e79e"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/cli/launcher/multinode_runner.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e9c6ac473e2197d11a8e07db379f37d8b5270091933f86d7bc5bff685cda688"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/colossal_llama/model/init_model.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ab85721e7eb1ca786d2ec318ed666dd83bb5e754d252c7ea7556cb995c3ecb3"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/cluster/device_mesh_manager.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"77a34b83d6f3dbc22058992bf377a730f63f47325b2dd41c7c8dfa1cbbd0ae1f"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/profiler/shard_utils.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"98093787867e639a571bf94901bcf7287677ae526202e8075ea8d07bd030abcd"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/gemini/utils.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a85d0640d8384c698502483758da0335f4881bcfcca1e64880b3fec5fe83523"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/ray/lora_constructor.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"07f1a0d28f99491d94e321dc827b2fcb51957cbf2c54d94c92b380d9a14318c3"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/context/process_group_initializer/initializer_sequence.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fab3c29a2e12fe52d1fee925bdd9b7b0812f86408a560ea2fe4e0895ab235db2"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/openmoe/benchmark/utils.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd8069c10acd22aabf438e891f34313dcf9a44881120255eaf42dc87968dfcc4"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/where_generator.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"981d942a1f4278a2c36549db4eb0a824ed7bc8ce4117f66e7c7456bc36b148bd"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalQA/colossalqa/data_loader/table_dataloader.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9cf50b10a3d9526dfd69b032b63267ebfce9c71fd34e058d50bd22aa8661a86b"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/gemini/memory_tracer/static_memstats_collector.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"287ec3ae664600f50aff7fd074b4dc9d070f651d3eec690f2495c3da569ff534"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/gemini/memory_tracer/memory_stats.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f9d0d7120b7d8e9d1b768bc680c5dda8ec1de960e5938d99bbeceb0eabd661e"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/gemini/memory_tracer/memory_monitor.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6676956d45cfc99779ad597f99cfa8da33260037f8e12b2f59351997555e766e"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalQA/colossalqa/local/colossalcloud_llm.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"716658e17dd69382471021f628dbdf9e937fb9ab49c01725e7f52b94b5523b3c"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/utils/profiler/stateful_tensor_mem_extention.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"33da29c48925ba17ba2c32cfd8a63b4a7de9d43aac9378d77265362e50e30b5f"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/proxy.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d375cd7ccaeb12ca4fa8889cccf5aeda73a46b560a5b68f8f17d310af1f91825"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/unary_elementwise_generator.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"97cc313a27d974f15395f0aecdaad2f455eea6f88e7d0ee9b52b6a38fb264954"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/zero/gemini/stateful_tensor_mgr.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c40bcc5a3f92580980107c43767a95f7eddea45391a339eb6b25622f303c4d7"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/meta_profiler/meta_registry/activation.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5712c83c54e0668efd3c0d13c85a781725449525382fe6d5f377e95fa61f52d6"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/utils/model/utils.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"52893f0c74f90468bbd6d960e5117efa125da77af321709a5e00820b41ea12ce"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalQA/colossalqa/chain/retrieval_qa/stuff.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"344f1a76a83227d63a9c2f2fca5d9b4add92f366e63c3cc83cdf1017be1ec420"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/parallel/reducer.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffc0e35013187f58980798b1dfd38bbc3cd3abe4d1e8ff662a69b1dcdc1915d3"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/zero/sharded_param/sharded_param.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"549b9fbc02a60d1408fe6a3d00a845f0dc2ef1b6a8a5f9efe5aaea3f6f62cfa6"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/utils/misc.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"474ae6ecca5225f767551b5916b912ad9325ca94e614c154f365f1d0d25b3570"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/kernel_loader.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"68903e8234b891b896282edac31bdc4c7e5c3d6a33f63433c2fa20106c7fdb7b"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/engine/schedule/_non_pipeline_schedule.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"650371e8ace85ba2d2320047796a86866b7d11e8b13d2c859160fcee21759b4d"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/zero/gemini/tensor_utils.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d1c8e56c521f526e1707032d4a3d9f5f2d50e0b7a8db79a6122354dcb5eb8fb"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_1d/_operation.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"499a4caad8d66420fb2de57a3fe5a5dacae6e4c828d5748b8d0d978613b6135c"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/graph_runner.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"79e5d46ba4d81d53bb6a8e370cc6eee1aa1d9bfc872b2fbf77921c726ac10e5a"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/utils/profiler/legacy/prof_utils.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"57e1cc8d270c3a333f8b2178a622ca4d9ac5b99b6d4f412c4d59d306faf4e899"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/shard/grad_ckpt_config.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a948b5494fe5a26c48dc549b8ab29d82db687a2c80b5f6a4ed5830ca047a32a6"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"extensions/pybind/flash_attention/flash_attention_dao_cuda.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"120288641d1fd3294d2b988d18ff03fd08072f6f1bcdd8995c23f59ec72d5fcc"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/gemini/memory_tracer/runtime_mem_tracer.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a450c637767c566489b0b33ea776f7db658ab86b2fbab7e2c8bc09583d004730"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalQA/colossalqa/chain/memory/summary.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"66a08f4428e11c14dfd8a4e9a431b9b9b8aec7d0e1b8a368509266fef6b4a2ab"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/softmax.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b53098145a384d6b387e03f59f8142e5ac49ed187d5c2c6a7734a2adacc82d3"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalQA/colossalqa/retrieval_conversation_zh.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3d5bc0fa53fb446a2fc677181e5db5805a14fe2f60479d96441ef0de1f7d6c1"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/addmm_handler.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7c55aefa2e1aab3d84ee2bd2a8a3e9e680b9cc0f00d216dcb058af87e058812"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/placeholder_generator.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"bbc7c25bf6b7457d431fee00dd2a87f3287b5316d84059c7ae8339f337400489"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/tensor/padded_tensor/api.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"49ddd3f177a1c84f4d387f7bfafe786ea0a7d2284097efb36576568c94f8a025"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/strategy/getattr_generator.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e586b8f51043f4f539b0402242194a00bcdf7f3a6f5281b7c8398d327b4bd79"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/jit/option.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"49cbee72e603ded55ed9fd3c0f4a835b55f1c43d68e7d75ed4de1a2f176d49dd"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/gemini/memory_tracer/memstats_collector.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2d71024afb5410b2ebb47904c4f812223d5e02cda3752a054039ddd602ddba9"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/offload/base_offload_module.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd48fdafae542207df666cf4457bab68c9ead053f5afc3b9096a61d429c1970a"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/tensor/colo_parameter.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"613ed796281b899d05679252914246ed032dd06bfbdb2cdc5b339d1b559619eb"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/fx/tracer/proxy.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f2d52752eb4233fb4276568503ce217d48049406fd054935735cb80ddc6f9f6"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/lars.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"62cbe9c06b47017b811d9f42b0806abf92150cc27ca4d66ba0eda1c0103a0714"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/where_handler.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"433240f171e5490fd47dfed92ade15b7263cabdd6ce79ef5463c9ade581ae86e"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalQA/colossalqa/retrieval_conversation_en.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"df39130f6f1aa4d122de1597662532fae3d3d619ffc3145fadab6125f8a795ba"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/benchmarks/prepare_dummy_test_dataset.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"56cf9c4fe7dd209eab10e9ef582232bc6297afd42ee8a7753417272d0745cc87"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/dropout.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8ce218b357e37bd5bb4af965b18d115631b7d9a932cb702cfc9de3b507eddb4"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/lr_scheduler/torch.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"abed7f48d7885cceed0ddded96c10dbdbf2cf7881cf5a737d4ab872c35dbc1d7"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/zero/low_level/bookkeeping/tensor_bucket.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1acc0aac46f4d016f19c15ee326aa0417bee9bcb71c03ab90b834bc62da99d35"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/checkpoint/ckpt_solver_chen.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"42c63b998d15126c286f60a02328457982c20e38c59fe84474076e23acbb3836"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalMoE/infer.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a776c9683e3f50f35d938ffa50a4eaf66d5bf8c7d789f57feba7cd16d92c3528"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/context/random/seed_manager.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b64e4cc84a4abb46b66187ce6f4413cf86a36a8d5ae95a88ce6bbf320d7f5d1"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/colossal_llama/tokenizer/init_tokenizer.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ae41938a2d5de96d7589bb02bc352ee757fe7ffca3ce97fded2591fb9ad65ee"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/amp/torch_amp/torch_amp.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7d01afa4345146948b52db2e4c44f36002857675c713eb8f87359967c6a0cf4"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/tensor/colo_tensor.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ab56815c9d03dbf0862a1bb04b85592994b77f8a5cca3d290fa8b7a417687f5"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/colossal_llama/dataset/conversation.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec4e3d90ba7946f4ff6cc19c4279ec57ec496636507349ea515827ca35c8f8e7"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/tensor/d_tensor/utils.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"db45737b21cc25e1a9cb162f5b061a4e7b8dd20ec4a8ec34de8d450ff3b13639"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/meta_profiler/meta_registry/tensor.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"18785a9e26a5909ae7200d6987a17cfaac9c919ab374b363d8760a0771471ffc"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/trainer/hooks/_checkpoint_hook.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3673138e2532b25a102c2aa9c8d12ab68ce4b4a1dbb311181796fab4a434d27e"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/mixed_precision/fp16_apex.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ca6fbb059ecf9599694f5baecaa9988d074fe8d873b9a241122bd7faf3b9812"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/cli/launcher/hostinfo.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"91688f04b2456c0f10680f31390c0a48347ada48d08d56b6d8c9241bd64f12a9"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/meta_patch/patched_function/arithmetic.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b73e4ae4749d75b30b5d48900817e05a231068157fe48eeb400671c21592ef1"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/utils/common.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"69527d6fad4b7c74b73e5aedded06506937a2bcc0d8eafed459d3f7629335602"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalQA/colossalqa/chain/retrieval_qa/load_chain.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"dcda2a928b97a1a83ef414c4b5781e2cd504df5849dc558632b7a7374788cf98"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/context/config.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"13eef3d0f46d73821def1c708694b3983cb1963e416855e8628f8470b52a21ea"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/flash_decoding_utils.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f36eb0db8af7b0326e14b5381045007013ff3b7e5ab599b1898de97ae0688905"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/plugin/dp_plugin_base.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4205a08bcd99145af9707a6ab8417a68ecc90693ca614ab791e01deda6e9ae3e"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/inference/inference_example.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d708ca76840642e225f84c90e91258f57651a743f9a15ca28b78249930fa718"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/batch_norm_handler.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b82ba2630b7a681fb8a1c35bdc080c9fe697247c448282e4fb298486745d1a4d"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/sum_handler.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1c331e797f2010474956710251d41cf396dc32b00e7fb342898a64a726804c8"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/registry/registry.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e205a4fe49172a1c52b79e604738027720931151f8cb072f9687775fd58ed2e"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/modeling/policy/pixart_alpha.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"28e303581367fd74366ea7cefe898c89967555f9b50b65b3f5279c9a3e0099c3"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_3d/_utils.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"151233f3dd65046b843fc9d4d6904bd33463668c0e04b0b053a29bccc9488d76"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/visualization.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"689c74cfa8d7e914bed3d9d0b6e77f9d0d287484db64f01eae03eb00c2f58a82"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/builder/builder.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f74ad0b329cad95a004f32e2de9fd6f732e6398a3a238968910c4651cb11cf99"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/profiler/experimental/profiler_module/rnn.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2dbdc92983e49e620ac4dcfbbccec7252a52ea5e717683e83c38bd011a2c06b"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/core/base_engine.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"55f85e6de61a8c76d4449cf2259fa069a6b4dcd1e02fec698662b288ec50ef77"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/zero/sharded_model/_utils.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5f9a0bd14c96a870a5bf764d5d8179e05fb2685b1cb80ecace2d7e705d5d09f"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/permute_handler.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"167286605731b96d7266359dfb5f7037adb633c02e38355ecf129ba08b32c13e"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/tensor_parallel/policies/chatglm2.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2cb805d0b6ee3c155c9fa94b2bc3e3c69becf13c13d9617f4b46cca094a254ce"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/modeling/policy/stablediffusion3.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e6bc39671e448a8761fead1a9b456fe9f2f070a381ab5c438ad13af93e20318"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/experience_maker/base.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4b7430237b3bf452748e336904c54b0d9eaea3a45cefcd2421812cda68f8613"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/utils/ckpt_io.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f94f1fc6b7245457320a49b41e6c16c44b3e914dd2b945b4f658cbe518d7b60c"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/meta_profiler/meta_registry/binary_elementwise_ops.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"571aa7fcdf4856f69a560792890ceb4ed220df7e3ba387d578fb90c0c90f68b4"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/meta_profiler/meta_registry/where.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"da716d7274c6d23296cded6c570e21c07e30acf6ce052de3f565bf00e2d5e835"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/base_layer.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"41fae712323d770567e86888dd6cf09abbb74720822d919edcbeb3b54ca92ec3"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/constants.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"26d993b70095cb34a066ff1297cb856abffeff78138d98e81325db642ba3ccec"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/bias_addition_patch/patched_bias_addition_function/addbmm.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0315ebc8ad7810b8ecf0f7bcb32585e90c27c6ea980f22a643099d7f9d6feee6"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/default_reshape_handler.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4279a742680660074ef0a3b9b05c024d216c79b68684b573f1a0598aa0195246"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/offload/util.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"091bed1e62d26b9b99c77699c73d990e9017b2a9eecbbf6a608d940ea1e9498e"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/dataset/mmlu.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"99b1143471ae688d21532ed763a14f3f87db47a745893aa2e4168e622bd9c909"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/tensor/d_tensor/layout.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cb1f7115e028fb75e1af8da58c104c2ec85df10ed59c8bc632edac6f318e28d"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/colossal_llama/utils/ckpt_io.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"84025d6a58493ff1882aaccd0af9eb3623a60933edb81b58a837f4410d25e353"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/utils/reward_score/utils.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"de4faa73756306846e8c8c60d568c8344128fb63a3e71a97f3777588278935d7"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/zero/shard_utils/tensor_shard_strategy.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cea12577a9183181c89b8037123279a0f3a6d552d5c08b9aaa49ab3fd17909d"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/trainer/hooks/_base_hook.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3d87ed28bb74fe30d67d6bd0dc74b8f54472a1bda72dc3d258ffe7392e3183f"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/tensor_parallel/modeling/_utils.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5812072bcfb405569cc94b15b5eb8039ab39e83833a9baa39e0fcd181027526e"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/hybridengine/modeling/_utils.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"766894f12588065a680f24d118d89642675af8afa88335d6c7f60191c2a9ae4a"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/amp/naive_amp/mixed_precision_mixin/fp16.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5f2bc6e5dc29df7793322ea7dc7f3b3e9a4a45a355d1104304c69f1dc255c49"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"extensions/base_extension.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"91802699c28433b30bf616bd76b070ee0b9291216533a16e86e714528e31fbfa"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/lr_scheduler/multistep.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3235fab69b86109e15f20fc162faa19e88fae55ea1920e1b4be2e2e4d30ec3b2"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/colossal_llama/utils/neftune_patch.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e4049167d7da3a22005ff7d06771b5c85e9e32aabf447d1bef90e41d30990ba"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/context/process_group_initializer/initializer_pipeline.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7598e365883e072f87ff9ebf9451e412950e48f0c6751d362a533d5df96ec14"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/experience_buffer/naive.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfe9f93b28e04e54631dc60ef864a426c8039ca14ada06ac6d0e06468dda3f54"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalMoE/utils.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4221fa76e85d52790c1976d009eb279fa947cad2134a790dab02215b26b819e7"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalQA/colossalqa/mylogging.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"79156503775ea69eac400f6a35eb0707a0c5de99d3ba25f4cb13d9694e362cc3"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/engine/gradient_accumulation/__init__.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0681b7a45ea299637745809fb90689e807ae4641d912a293ae7b37bfc9f37382"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/amp/naive_amp/mixed_precision_mixin/base.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9a77adc9568887405250bcc0b4a5ccd1d44b1b6383f3781b5b829105c3ef98a"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalQA/colossalqa/text_splitter/chinese_text_splitter.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5046433c3c49c12208f1d53be757f804e42ab3207dc46b7a402b72ce6e10537"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/ray/detached_replay_buffer.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9d4e29a123e3127595696bee8cadea0e63e933a3a5864bda64755e11b2e7de6"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/modeling/layers/baichuan_tp_linear.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"be3f8f463b8c8b0ab4ac2ddd68531b23f9a9ec9319db6acb9ac4d10f8d7dd3ce"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/dataset/mtbench.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9523add578f82c5621a1a76d12cd9c00069851d17a463cc439bf41141f7e8868"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/meta_profiler/meta_registry/embedding.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cddf66eb2c2485f159cf8a899c545f32407ba8b3666835356757b8ae5b9b569"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/layer/layernorm.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a97998577a70abd6e35b31d06d7c731e3bafe129470f08f9659d2221c1b00523"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/engine/gradient_handler/_pipeline_parallel_gradient_handler.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4f4a9c398a44c64d085edca56989c15e7bcc72823f2538686808dc8d339feef"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/plugin/plugin_base.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6963fe99034d723dc0600d5b35eafe0ae5362097248034bb90ef0ebba0366da3"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/utils/memory.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfe688b935a58fad73b2891b71733dff96d51d873c7b5ab4a127d5d9ddbee5da"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/lr_scheduler/poly.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca23532b535cdf1160ad0b3d3dc62d5f065b59315bcef7dc803531548e7b04a1"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/amp/naive_amp/__init__.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6bd7d2200acd4dba45bcedbe2194ddd7697a92d207b411d5eb9e5548ae22dd8"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/Colossal-LLaMA/inference/stream_chat_example.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f4265724edda24bdd9aad694b93adaa62c952b2aae76417c6f4f50a1dfad87c"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/dataset/cvalues.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f792a8872586a03af6086300851d289a8f7e904594051f70568dbdb6f0adabf4"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/experience_buffer/utils.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a00cac79cf6225156668c8f3438389be6cf9f195bfcd9284abeac8163a50384"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/utils/common.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"edf4502e54178553591d90c625d2e93435c6dfb92e748fe6e373da2a03a2cec9"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: context_attn_unpad.py \u2194 flash_decoding.py: \u0060colossalai/kernel/triton/context_attn_unpad.py\u0060 and \u0060colossalai/kernel/triton/flash_decoding.py\u0060 change together 80% of the time (8 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module \u2014 a sibling reference still needs an import \u2014 so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are \u0060537a3cbc\u0060 [kernel] Support New KCache Layout - Triton Kernel (#5677); \u00603c91e3f1\u0060 [Inference]Adapt to baichuan2 13B (#5614); \u00602a718c8b\u0060 Optimized the execution interval time between cuda kernels caused by \u2026 \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/kernel/triton/context_attn_unpad.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff22e4b293e82db1f0e309321df322cd13e40a913abbf70da7007a1fd92b9d54"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: deepseek.py \u2194 mixtral.py: \u0060colossalai/shardformer/policies/deepseek.py\u0060 and \u0060colossalai/shardformer/policies/mixtral.py\u0060 change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module \u2014 a sibling reference still needs an import \u2014 so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are \u0060c54c4fcd\u0060 [hotfix] moe hybrid parallelism benchmark \u0026 follow-up fix (#6048); \u0060f1a3a326\u0060 [fp8]Moe support fp8 communication (#5977); \u0060cb01c0d5\u0060 [moe] refactor mesh assignment \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/deepseek.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5cb20389f7f4119b8db0ffc47e1ab654a37e76c1f94414d4ff8f0ae5dda1d11"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: bert.py \u2194 bloom.py: \u0060colossalai/shardformer/policies/bert.py\u0060 and \u0060colossalai/shardformer/policies/bloom.py\u0060 change together 59% of the time (10 of the 17 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module \u2014 a sibling reference still needs an import \u2014 so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are \u0060dc2cdaf3\u0060 [shardformer] optimize seq parallelism (#6086); \u0060773d9f96\u0060 [shardformer]delete xformers (#5859); \u0060d84d6860\u0060 change \u0027xxx if xxx else None\u0027 to \u0027xxx or None\u0027 \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/policies/bert.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"213931c7e3d8f1e70a54ad16fa0ca0d68b7074d737ccc178da36c602e79dc561"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: engine.py \u2194 nopadding_baichuan.py: \u0060colossalai/inference/core/engine.py\u0060 and \u0060colossalai/inference/modeling/models/nopadding_baichuan.py\u0060 change together 58% of the time (7 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency \u2014 the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE \u2014 the registration is the link, and it is meant not to be an import \u2014 and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are \u00603c7cda0c\u0060 [Inference]Lazy Init Support (#5785); \u00605f398fc0\u0060 Pass inference model shard configs for module init; \u0060eec77e57\u0060 Fix tests and naming \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/core/engine.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2d137677eed8f5aca7930a91c04e8eb735c9558cb876cd234b4501166f7cfe7"}},{"ruleId":"D35","level":"warning","message":{"text":"Change-coupling hub: mixtral.py \u2192 _operation.py, deepseek.py, deepseek.py, mixtral.py: \u0060colossalai/shardformer/modeling/mixtral.py\u0060 changes together with 4 other files \u2014 \u0060colossalai/moe/_operation.py\u0060, \u0060colossalai/shardformer/modeling/deepseek.py\u0060, \u0060colossalai/shardformer/policies/deepseek.py\u0060, \u0060colossalai/shardformer/policies/mixtral.py\u0060 \u2014 none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/mixtral.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd7fdb7cdf882771a8f283a59cae343c3560e0893b2675a1d95dcaa4e5a066d0"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: _operation.py \u2194 mixtral.py: \u0060colossalai/moe/_operation.py\u0060 and \u0060colossalai/shardformer/policies/mixtral.py\u0060 change together 50% of the time (7 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency \u2014 the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE \u2014 the registration is the link, and it is meant not to be an import \u2014 and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are \u0060c54c4fcd\u0060 [hotfix] moe hybrid parallelism benchmark \u0026 follow-up fix (#6048); \u0060f1a3a326\u0060 [fp8]Moe support fp8 communication (#5977); \u0060803878b2\u0060 [moe] full test for deepseek and mixtral (pp \u002B sp to fix) \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/moe/_operation.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"82b344bf644d7912d9227f23a85684ad0eb42941f9d690a7eb2602698255d8bb"}},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"1b213f6eedd4b140d0bc37bdf1496f72811a643f34064f12518b32e9e83bcfc7"},"taxa":[{"id":"CICD-SEC-9","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"0e17f71490e4d120a48b2b2881ab866c93b272bef2febb673a3e8e42b2c288ab"},"taxa":[{"id":"CICD-SEC-9","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"eb00976a698a5d68999b7ee6d27206fd374e916853e7ff1ead5eed42386f043f"},"taxa":[{"id":"CICD-SEC-9","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"90f83b4fa27db32740afe9540c905f3c0499caed87f61049a8a903ecc95b41c3"},"taxa":[{"id":"CICD-SEC-8","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"cc682cd7167c2c692b624e54d299d32b2ea2b5b3eb72f5516f0dfab9c0ce991d"},"taxa":[{"id":"CICD-SEC-3","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"f0dc362e4a72c2ff1059599cd4420918d62a1024d4fa5b471afb5e8af2d44d08"}},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"2fdd1e0e69f17f1439dd64fb44dc0c682434722495bd50af945f764abda6f3f9"},"taxa":[{"id":"CICD-SEC-6","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"bab6fdf56691064ad542ecaf4cceada1bfd04d0fc441976c8c0b3fb126665209"},"taxa":[{"id":"CICD-SEC-6","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"4deec39eaeb7046d6d948d4332c48b6aa23fa264f4b84da30e532862deb46db9"},"taxa":[{"id":"CICD-SEC-6","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"bc328cf370a6dec8c67ebcd366195c73dc19932d13dbbad3155bc6330232a9e7"},"taxa":[{"id":"CICD-SEC-6","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"94a3277ba79e567f3ceb4fc941b74991def7547fcde9a23c16ae8c826ce73ee2"},"taxa":[{"id":"CICD-SEC-6","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"9985d26651f0694d3715b19878e5c6127c60c57570855f92344d5237e34152a3"},"taxa":[{"id":"CICD-SEC-6","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"002964a314eaf61ff01343ef49d27c9ebdd4be76f8b58d62172685711dbbefee"},"taxa":[{"id":"CICD-SEC-6","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"d6abcb507538937757922e6439854b1f014f9bab8dcc3485edbe887fbfd6d357"},"taxa":[{"id":"CICD-SEC-6","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"458e2c119bf56a53a5b005a5bd7acbd09ce277fc22710e196a0d726c753a9643"},"taxa":[{"id":"CICD-SEC-6","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"11837db6635064d56465c484a505ea1278c9f24d3bc4a824ee024ba5cdee7e33"},"taxa":[{"id":"CICD-SEC-6","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"c08f95a85cd13d9284db8fd85cc431a1f3a47dd71faa24062b94eee181774723"},"taxa":[{"id":"CICD-SEC-6","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"9ed9120d9a0b5732598b328b8649ca7fd333d973a29c99b0002b3dae349cb54e"},"taxa":[{"id":"CICD-SEC-5","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"de870b19cfdee00e271e1ad7a3bf29a7f080cae13f6d6d6a8f84b72d5b97b46f"},"taxa":[{"id":"CICD-SEC-4","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"18dd9a619741a74a5d0d923ed1e761c58d94e7455d7eb7403718d29ec9ba4015"},"taxa":[{"id":"CICD-SEC-4","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"53464cc6f1230446d580113d349e4aa5d272483861170f6f10e0a975caf87313"},"taxa":[{"id":"CICD-SEC-4","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"48f9406c5284889ca41da041b52eb3f568a919f94c5f7d9ff0f83ce1cad4b6a6"},"taxa":[{"id":"CICD-SEC-4","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"b908636d8496983caa44192d75b09c6e612ef22714632ad740fadd93d4ddd5ac"},"taxa":[{"id":"CICD-SEC-4","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"20b9fac7b7cdafdb38c7fcea98294904604994937c44ef91d8270ad42305cdc7"},"taxa":[{"id":"CICD-SEC-4","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"229ad9e551bf5e5023c820d8228c203cdfea30fa4998ac42dfeed45d68f2ed83"},"taxa":[{"id":"CICD-SEC-4","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"44859ab075b0f87992c68ba052ccdcf1b653b7b9b1ecb1d962e15d7b9129e825"},"taxa":[{"id":"CICD-SEC-4","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"54301afb6a99c08edbc2ec27227bdc76de22a7358339b0b795f9251e82e70316"},"taxa":[{"id":"CICD-SEC-5","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"252aa3df01379f501cb972ff2b4d83edf94ec2c27f1b1e4fd974852c0b44ec10"},"taxa":[{"id":"CICD-SEC-5","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"d657599f6f99da1927d3377533dfc0888b34c4d84aa7d5579841fd72d0e39bce"},"taxa":[{"id":"CICD-SEC-6","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ace515990e7ee0f17b5c17e44dd168a5bdecf90804a3a3dd845cf05540978013"},"taxa":[{"id":"CICD-SEC-3","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"C2","level":"note","message":{"text":"Thin authorization enforcement: Authorization rules exist but no route guard, auth middleware or handler that refuses a caller was found."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"1240e406e864a89e38d5e3fa370dee11971db94808c3db2fda9b41bf2e5b8efb"}},{"ruleId":"M2","level":"note","message":{"text":"No ADRs: No Architecture Decision Records found \u2014 no conventional ADR directory, no numbered \u0060NNNN-title\u0060 documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"670b3d6e36a756d63097d0dfbf90afd5fc761308800b9354894a07c3f4e4aa14"}},{"ruleId":"M3","level":"note","message":{"text":"No src/ separation: Production code isn\u0027t grouped under a src/ folder \u2014 it\u0027s spread across several top-level directories, so there\u0027s no one place that says \u0027this is the product\u0027."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"fdf7f5b24e313364d10170a5c2542959902fe0d26ed70edef3eaa10ec5bcdb1d"}},{"ruleId":"P2","level":"note","message":{"text":"Logging is not universal: Only 5/7 runnable modules use logging (modules with no entry point or server are excluded \u2014 they are libraries a runnable module hosts). Silent: \u0060applications/ColossalMoE\u0060, \u0060colossalai/legacy/moe/openmoe\u0060."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"91a94e21d6d4d0e6a2003f94505b0b02b157176f0b24c4820f3f82b4447a97fe"}},{"ruleId":"P3","level":"note","message":{"text":"No SAST: No static application security testing detected. For this repository\u0027s stack, add bandit, \u0060semgrep --config=p/python\u0060, or CodeQL\u0027s python pack as a CI step. What was searched, so you can tell an absence from a miss: the 78976 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge\u0027s web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen \u2014 if that is your case the row is wrong, and saying so is more useful than adding a second scanner."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6e54424179c892f03ef2fd003130ac4bd43f39bbf3b1ca0a0143e25acb80ec87"}},{"ruleId":"P6","level":"note","message":{"text":"No changelog: No CHANGELOG/HISTORY/RELEASES file \u2014 what shipped when isn\u0027t easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)"},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"dda5aa5aed8cbb292c3ef2b733bc138f614293ae6426c85e98bf31ef330d9415"}},{"ruleId":"P7","level":"warning","message":{"text":"Outbound HTTP without resilience: \u0060requests.post(\u0060 makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service\u0027s request, thread or connection until the call gives up on its own \u2014 or never, for a client with no default timeout."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/reward/code_reward/utils.py"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"b895db523585344c59c78fb48a6d0cfc686527da1c4226c7e057213198c5c0e1"}},{"ruleId":"P7","level":"warning","message":{"text":"Outbound HTTP without resilience: \u0060requests.post(\u0060 makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service\u0027s request, thread or connection until the call gives up on its own \u2014 or never, for a client with no default timeout."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalQA/colossalqa/local/colossalcloud_llm.py"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"af949cbfd747176c45633f2c4e5036a51ed857e95458e8664b325c25305f270d"}},{"ruleId":"P7","level":"warning","message":{"text":"Outbound HTTP without resilience: \u0060requests.request(\u0060 makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service\u0027s request, thread or connection until the call gives up on its own \u2014 or never, for a client with no default timeout."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalQA/colossalqa/local/pangu_llm.py"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"36bef58515e80e68ac4ebb2aa98039703023f5654f18a0eefc6771cd96cdfc57"}},{"ruleId":"P7","level":"warning","message":{"text":"Outbound HTTP without resilience: \u0060requests.get(\u0060 makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service\u0027s request, thread or connection until the call gives up on its own \u2014 or never, for a client with no default timeout."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/serving/ray_serve/send_request.py"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"2dd24f512c5b0915e639cb43c858b0b6e623e18ede45e123ae784b06ed332c83"}},{"ruleId":"P7","level":"warning","message":{"text":"Outbound HTTP without resilience: \u0060requests.get(\u0060 makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service\u0027s request, thread or connection until the call gives up on its own \u2014 or never, for a client with no default timeout."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/serving/ray_serve/send_requests.py"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"617afa04b5d130d496c26dce60280690a52ce67a20977b87374017e372258ab5"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060\u0022bias\u0022 in kwargs and kwargs[\u0022bias\u0022] is not None\u0060 appears character-identically in 2 files \u2014 colossalai/fx/tracer/experimental.py, colossalai/fx/tracer/tracer.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/experimental.py"},"region":{"startLine":626}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f30b34010c97dd329391a05f1cbe079ce56cbc6508f6f4b18db20939d143b9c"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060\u0022bias\u0022 in self.node.kwargs and self.node.kwargs[\u0022bias\u0022] is not None\u0060 appears character-identically in 2 files \u2014 colossalai/auto_parallel/tensor_shard/node_handler/conv_handler.py, colossalai/auto_parallel/tensor_shard/node_handler/linear_handler.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/node_handler/conv_handler.py"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ec3b0eb6a769fe7ef9e4fadf6982220e8b9b8598aad6a174ce88c0a5b3dc920"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060\u0022weight_decay\u0022 in group and group[\u0022weight_decay\u0022] \u003E 0\u0060 appears character-identically in 2 files \u2014 colossalai/nn/optimizer/distributed_galore.py, colossalai/nn/optimizer/galore.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/nn/optimizer/distributed_galore.py"},"region":{"startLine":179}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c8561437b2aeafd7f0c4f56b99e270979faa38eeb86955c8837335be0ee7727"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060(i \u002B 1) \u003E num_warmup_steps and (i \u002B 1) % self.scheduler.order == 0\u0060 appears character-identically in 2 files \u2014 colossalai/inference/modeling/models/pixart_alpha.py, colossalai/inference/modeling/models/stablediffusion3.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/modeling/models/pixart_alpha.py"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdd7f0bb310ba8ec96dd0e37bd234dc19e5b3d2467fb7736e95ca578fdf87ee0"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060(not self.include_last_offset) and (batch_size * (handle_table \u002B 1) \u003E= indices.shape[0])\u0060 appears character-identically in 2 files \u2014 colossalai/legacy/nn/parallel/layers/cache_embedding/parallel_cached_embedding_tablewise.py, colossalai/legacy/nn/parallel/layers/cache_embedding/parallel_cached_embedding_tablewise_split_cache.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/parallel/layers/cache_embedding/parallel_cached_embedding_tablewise.py"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c8cc6d52880bbf6ab2b3530d33d1a3f1f1c3c2879d1a5f3abfa6739949c989d"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060(not shard_config.parallel_output) or force_sp_gather or is_share_sp_tp(sp_mode)\u0060 appears character-identically in 3 files \u2014 colossalai/shardformer/modeling/_llama_tf4.py, colossalai/shardformer/modeling/_llama_tf5.py, colossalai/shardformer/modeling/gpt2.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_llama_tf4.py"},"region":{"startLine":235}}}],"partialFingerprints":{"codehealthFindingId/v1":"404b954316fa85d397c16825934162d006f4e21f644035e9ea50b50331f7a89f"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060(not shard_config.parallel_output) or force_sp_output_gather or is_share_sp_tp(sp_mode)\u0060 appears character-identically in 6 files \u2014 colossalai/shardformer/modeling/_qwen2_tf4.py, colossalai/shardformer/modeling/_qwen2_tf5.py, colossalai/shardformer/modeling/_qwen3_tf4.py, colossalai/shardformer/modeling/_qwen3_tf5.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_qwen2_tf4.py"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9e94a74bb7b2d6e3bada5ed6ee69d61dceb4eebe0e0665adb4609ed1c27956a"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060(sp_size is not None) and ( sp_group is not None )\u0060 appears character-identically in 11 files \u2014 colossalai/shardformer/modeling/_llama_tf4.py, colossalai/shardformer/modeling/_llama_tf5.py, colossalai/shardformer/modeling/_mixtral_tf4.py, colossalai/shardformer/modeling/_mixtral_tf5.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_llama_tf4.py"},"region":{"startLine":507}}}],"partialFingerprints":{"codehealthFindingId/v1":"e24753a293f357af3bd32bff611299b981c0a18b074652368e832962f7314e51"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060H == self.img_size[0] and W == self.img_size[1]\u0060 appears character-identically in 3 files \u2014 colossalai/legacy/nn/layer/parallel_2d/layers.py, colossalai/legacy/nn/layer/parallel_2p5d/layers.py, colossalai/legacy/nn/layer/vanilla/layers.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_2d/layers.py"},"region":{"startLine":555}}}],"partialFingerprints":{"codehealthFindingId/v1":"63a3f4d07c8594190c2e50f4938965a47e07eb581574964a5d431ae361d3e71f"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060_is_from_torch(obj) and obj != torch.device\u0060 appears character-identically in 3 files \u2014 colossalai/_analyzer/fx/codegen.py, colossalai/autochunk/autochunk_codegen.py, colossalai/fx/codegen/activation_checkpoint_codegen.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/fx/codegen.py"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"0003656b6bf5706f1c11e776126243315d9d416b0598230fc1bce801e2231f5f"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060attention_mask is not None and 0 in attention_mask\u0060 appears character-identically in 8 files \u2014 colossalai/shardformer/modeling/_deepseek_v3_tf4.py, colossalai/shardformer/modeling/_mixtral_tf4.py, colossalai/shardformer/modeling/_mixtral_tf5.py, colossalai/shardformer/modeling/_qwen2_tf4.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_deepseek_v3_tf4.py"},"region":{"startLine":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d7e6f21602339a33a34ed411efc7835b18af0351e499bbdb31aa79d67c18c2d"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060attention_mask is not None and not attention_mask.all()\u0060 appears character-identically in 3 files \u2014 colossalai/legacy/inference/tensor_parallel/modeling/chatglm2.py, colossalai/shardformer/modeling/chatglm2.py, colossalai/shardformer/modeling/chatglm2_6b/modeling_chatglm.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/tensor_parallel/modeling/chatglm2.py"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0c804f1ea1e5cdd0cd3702163bfe2cdde665e6c469716a53763c8eccb75937b"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060attention_mask is not None and self.config._attn_implementation == \u0022flash_attention_2\u0022 and use_cache\u0060 appears character-identically in 3 files \u2014 colossalai/shardformer/modeling/_mixtral_tf4.py, colossalai/shardformer/modeling/_mixtral_tf5.py, colossalai/shardformer/modeling/mistral.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_mixtral_tf4.py"},"region":{"startLine":736}}}],"partialFingerprints":{"codehealthFindingId/v1":"c08977efa81bc4e9579008415f7575629b2aae5cdce1b6facb34a4dd3bbf1125"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060bias_addition_module.has(mod_type) and mod.bias is not None\u0060 appears character-identically in 2 files \u2014 colossalai/fx/tracer/experimental.py, colossalai/fx/tracer/tracer.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/tracer/experimental.py"},"region":{"startLine":656}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ebe9567542c39c0f9b2595452e4c238d2ff202f7e53c80f02e69a8bd7ad13bc"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060bool_masked_pos is not None and (self.config.patch_size != self.config.encoder_stride)\u0060 appears character-identically in 2 files \u2014 colossalai/shardformer/modeling/_vit_tf4.py, colossalai/shardformer/modeling/_vit_tf5.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_vit_tf4.py"},"region":{"startLine":273}}}],"partialFingerprints":{"codehealthFindingId/v1":"e315259bc7cb6dd427b46500265f66dfddd80e39763150c3eb26e49fa925bcaa"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060buf is not None and name not in non_persistent_buffers\u0060 appears character-identically in 2 files \u2014 colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py, colossalai/inference/core/plugin.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":478}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5b7b90395b35161315570b4609325404eb7c817565827df0bf03a53cd49988d"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060buf is not None and name not in self._non_persistent_buffers_set\u0060 appears character-identically in 2 files \u2014 colossalai/shardformer/layer/parallel_module.py, colossalai/zero/gemini/gemini_ddp.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/parallel_module.py"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"de56ce5872778445857adf61d48bf7712679811959c6b3f220084e2016cfec5f"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060decoder_input_ids is None and decoder_inputs_embeds is None\u0060 appears character-identically in 2 files \u2014 colossalai/shardformer/modeling/_whisper_tf4.py, colossalai/shardformer/modeling/_whisper_tf5.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_whisper_tf4.py"},"region":{"startLine":1049}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e6059f8e01f7cfbb0804e40b5b38d7f1147f6fae909fd96c6c3f22e31e2908f"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060disable_pp or not stage_manager.is_first_stage()\u0060 appears character-identically in 2 files \u2014 colossalai/shardformer/modeling/_llama_tf4.py, colossalai/shardformer/modeling/_llama_tf5.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_llama_tf4.py"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cc1a82813664eaeddeaa5eae5b94fd41999f49b28742ae0890d5680218e8dc4"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060disable_pp or stage_manager.is_first_stage()\u0060 appears character-identically in 3 files \u2014 colossalai/shardformer/modeling/_llama_tf4.py, colossalai/shardformer/modeling/_llama_tf5.py, colossalai/shardformer/modeling/gpt2.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_llama_tf4.py"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e978a697f1be93eb7c68704e5bb656b932d0b8b8d7961128d8287803239b25b"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060disable_pp or stage_manager.is_last_stage()\u0060 appears character-identically in 3 files \u2014 colossalai/shardformer/modeling/_llama_tf4.py, colossalai/shardformer/modeling/_llama_tf5.py, colossalai/shardformer/modeling/gpt2.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/modeling/_llama_tf4.py"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad7dd1668cbef83844afd71c4ca2b72de475ddd20aa194175a4117ae27cc83ae"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060distributed_sampler_cls or DistributedSampler\u0060 appears character-identically in 3 files \u2014 colossalai/booster/plugin/dp_plugin_base.py, colossalai/booster/plugin/gemini_plugin.py, colossalai/booster/plugin/hybrid_parallel_plugin.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/booster/plugin/dp_plugin_base.py"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"23c9d3c09972c8f8278c3aa4e640eeb96164c40ec345b3ce5f9ced971be7c4a8"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060effective_group_mask is None or effective_group_mask[group_idx]\u0060 appears character-identically in 2 files \u2014 applications/ColossalChat/coati/distributed/consumer.py, applications/ColossalChat/coati/distributed/zero_bubble/consumer.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/consumer.py"},"region":{"startLine":255}}}],"partialFingerprints":{"codehealthFindingId/v1":"5625e309f65391cc4048c117a97a63568caee32208f9bf74c682d8ad7046fc28"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060episode != self.num_episodes - 1 or i != num_valid_microbatches - 1\u0060 appears character-identically in 2 files \u2014 applications/ColossalChat/coati/distributed/producer.py, applications/ColossalChat/coati/distributed/zero_bubble/producer.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/producer.py"},"region":{"startLine":368}}}],"partialFingerprints":{"codehealthFindingId/v1":"b25e9a56aedd7224d0676a4470ee303e781f55b3f8284b0963e28ee5e9a482f2"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060f_index not in source_spec.dim_partition_dict and b_index not in source_spec.dim_partition_dict\u0060 appears character-identically in 2 files \u2014 colossalai/tensor/d_tensor/layout_converter.py, colossalai/tensor/shape_consistency.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/tensor/d_tensor/layout_converter.py"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"75740a7738b6d2c7d730ec3af961102c5d88dc33da84e315aa7817085422fcbb"}},{"ruleId":"X17","level":"warning","message":{"text":"Recursive walk over a caller-supplied document has no depth cap: \u0060assert_hf_output_close\u0060 is public and takes \u0060out1: Any\u0060 from its caller, and it calls itself at line 123 (\u0060assert_hf_output_close\u0060) with a piece of \u0060out1\u0060 (and at line 136) \u2014 and nowhere in \u0060assert_hf_output_close\u0060 is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller\u0027s document \u2014 not this code \u2014 decides how deep the stack goes. Python\u0027s parsers accept far more nesting than its stack allows: \u0060json.loads\u0060 turns 3,000 bytes of brackets into 1,500 levels and \u0060xml.etree.ElementTree\u0060 parses tens of thousands, while a walk like this one raises \u0060RecursionError\u0060 once it passes the interpreter\u0027s default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any \u0060try\u0060 the worker or the program exits with it. Raising \u0060sys.setrecursionlimit\u0060 only moves the number the document has to beat. Thread a depth argument through \u0060assert_hf_output_close\u0060 and reject the value past a fixed maximum, or rewrite the descent with an explicit stack."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/testing/comparison.py"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5b8838df256f24fe1b7b56ef36f7bbce48e98b878adc449fa6d02f3d95eddb9"}},{"ruleId":"X17","level":"warning","message":{"text":"Recursive walk over a caller-supplied document has no depth cap: \u0060tree_flatten_hf\u0060 is public and takes \u0060pytree: Any\u0060 from its caller, and it calls itself at line 47 (\u0060tree_flatten_hf\u0060) with a piece of \u0060pytree\u0060 \u2014 and nowhere in \u0060tree_flatten_hf\u0060 is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller\u0027s document \u2014 not this code \u2014 decides how deep the stack goes. Python\u0027s parsers accept far more nesting than its stack allows: \u0060json.loads\u0060 turns 3,000 bytes of brackets into 1,500 levels and \u0060xml.etree.ElementTree\u0060 parses tens of thousands, while a walk like this one raises \u0060RecursionError\u0060 once it passes the interpreter\u0027s default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any \u0060try\u0060 the worker or the program exits with it. Raising \u0060sys.setrecursionlimit\u0060 only moves the number the document has to beat. Thread a depth argument through \u0060tree_flatten_hf\u0060 and reject the value past a fixed maximum, or rewrite the descent with an explicit stack."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/pipeline/schedule/_utils.py"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"b849c6413079ed6143cbcd8f531f1c3b4e0574aec76a10789a4e10d7954a57f6"}},{"ruleId":"X17","level":"warning","message":{"text":"Recursive walk over a caller-supplied document has no depth cap: \u0060apply_to_tensors\u0060 is public and takes \u0060x: Any\u0060 from its caller, and it calls itself at line 63 (\u0060apply_to_tensors\u0060) with a piece of \u0060x\u0060 (and at line 65, line 67) \u2014 and nowhere in \u0060apply_to_tensors\u0060 is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller\u0027s document \u2014 not this code \u2014 decides how deep the stack goes. Python\u0027s parsers accept far more nesting than its stack allows: \u0060json.loads\u0060 turns 3,000 bytes of brackets into 1,500 levels and \u0060xml.etree.ElementTree\u0060 parses tens of thousands, while a walk like this one raises \u0060RecursionError\u0060 once it passes the interpreter\u0027s default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any \u0060try\u0060 the worker or the program exits with it. Raising \u0060sys.setrecursionlimit\u0060 only moves the number the document has to beat. Thread a depth argument through \u0060apply_to_tensors\u0060 and reject the value past a fixed maximum, or rewrite the descent with an explicit stack."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/zero/sharded_model/_utils.py"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5c2463432b2303b52fdd204a7e15d0809a79569b5127b24739d14bc79c35a9f"}},{"ruleId":"X17","level":"warning","message":{"text":"Recursive walk over a caller-supplied document has no depth cap: \u0060pyobj_map\u0060 is public and takes \u0060obj: Any\u0060 from its caller, and it calls itself at line 20 (\u0060pyobj_map\u0060) with a piece of \u0060obj\u0060 (and at line 22, line 24) \u2014 and nowhere in \u0060pyobj_map\u0060 is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller\u0027s document \u2014 not this code \u2014 decides how deep the stack goes. Python\u0027s parsers accept far more nesting than its stack allows: \u0060json.loads\u0060 turns 3,000 bytes of brackets into 1,500 levels and \u0060xml.etree.ElementTree\u0060 parses tens of thousands, while a walk like this one raises \u0060RecursionError\u0060 once it passes the interpreter\u0027s default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any \u0060try\u0060 the worker or the program exits with it. Raising \u0060sys.setrecursionlimit\u0060 only moves the number the document has to beat. Thread a depth argument through \u0060pyobj_map\u0060 and reject the value past a fixed maximum, or rewrite the descent with an explicit stack."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/pipeline/rpc/utils.py"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d7c81f2ccef7dfcf7fe033b64080a45a506902e2b16fdbc3a74402743c598df"}},{"ruleId":"X17","level":"warning","message":{"text":"Recursive walk over a caller-supplied document has no depth cap: \u0060pytree_map\u0060 is public and takes \u0060obj: Any\u0060 from its caller, and it calls itself at line 42 (\u0060pytree_map\u0060) with a piece of \u0060obj\u0060 (and at line 44, line 46) \u2014 and nowhere in \u0060pytree_map\u0060 is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller\u0027s document \u2014 not this code \u2014 decides how deep the stack goes. Python\u0027s parsers accept far more nesting than its stack allows: \u0060json.loads\u0060 turns 3,000 bytes of brackets into 1,500 levels and \u0060xml.etree.ElementTree\u0060 parses tens of thousands, while a walk like this one raises \u0060RecursionError\u0060 once it passes the interpreter\u0027s default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any \u0060try\u0060 the worker or the program exits with it. Raising \u0060sys.setrecursionlimit\u0060 only moves the number the document has to beat. Thread a depth argument through \u0060pytree_map\u0060 and reject the value past a fixed maximum, or rewrite the descent with an explicit stack."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/pipeline/rpc/utils.py"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e42a10d62690c9725982e12c3f90a5f3be0a91df0221af8eeaab26b596d1a5d"}},{"ruleId":"X17","level":"warning","message":{"text":"Recursive walk over a caller-supplied document has no depth cap: \u0060flat_list\u0060 is public and takes \u0060inputs: Any\u0060 from its caller, and it calls itself at line 77 (\u0060flat_list\u0060) with a piece of \u0060inputs\u0060 \u2014 and nowhere in \u0060flat_list\u0060 is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller\u0027s document \u2014 not this code \u2014 decides how deep the stack goes. Python\u0027s parsers accept far more nesting than its stack allows: \u0060json.loads\u0060 turns 3,000 bytes of brackets into 1,500 levels and \u0060xml.etree.ElementTree\u0060 parses tens of thousands, while a walk like this one raises \u0060RecursionError\u0060 once it passes the interpreter\u0027s default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any \u0060try\u0060 the worker or the program exits with it. Raising \u0060sys.setrecursionlimit\u0060 only moves the number the document has to beat. Thread a depth argument through \u0060flat_list\u0060 and reject the value past a fixed maximum, or rewrite the descent with an explicit stack."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/autochunk/utils.py"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"af44ad436e0ef092bdbd418e587a35003ae70f9fba688df5b7fd3e83d038e854"}},{"ruleId":"X17","level":"warning","message":{"text":"Recursive walk over a caller-supplied document has no depth cap: \u0060pytree_map\u0060 is public and takes \u0060obj: Any\u0060 from its caller, and it calls itself at line 92 (\u0060pytree_map\u0060) with a piece of \u0060obj\u0060 (and at line 94, line 96) \u2014 and nowhere in \u0060pytree_map\u0060 is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller\u0027s document \u2014 not this code \u2014 decides how deep the stack goes. Python\u0027s parsers accept far more nesting than its stack allows: \u0060json.loads\u0060 turns 3,000 bytes of brackets into 1,500 levels and \u0060xml.etree.ElementTree\u0060 parses tens of thousands, while a walk like this one raises \u0060RecursionError\u0060 once it passes the interpreter\u0027s default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any \u0060try\u0060 the worker or the program exits with it. Raising \u0060sys.setrecursionlimit\u0060 only moves the number the document has to beat. Thread a depth argument through \u0060pytree_map\u0060 and reject the value past a fixed maximum, or rewrite the descent with an explicit stack."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/tensor_shard/utils/misc.py"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2b534ee83445c62bd022796b88d117d60c867940ebab06845a939922c9b73dc"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"extensions/cuda_extension.py"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"4db5e6ac221fc66daf5ae6110ea27e44d68cfafd421741d6cd96d09001f198f7"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"extensions/triton_extension.py"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"9cee987848cfa63598581217ce9bfe92f60b06135b203e315813b79ea93456b1"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"extensions/pybind/flash_attention/__init__.py"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"8200ad954530706bf59ce70c59ba899308bd0cf4045303164a359ae97afc44d7"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"extensions/pybind/flash_attention/flash_attention_dao_cuda.py"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"84c05a72b3d8b2877c33706f89ce3f7ddd5ecbffee7d4222dc2d87acb1e7f439"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"extensions/pybind/flash_attention/flash_attention_npu.py"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"2141a6d009034ec83097919195226ff516d81560ef0c54064bc9d45cd5da614f"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"extensions/pybind/flash_attention/flash_attention_sdpa_cuda.py"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"397e792eb6742e76fee8ee2de5c25ae52cec93a9c9061f6464ebe11e3d62e736"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_compat.py"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"512e67c44de92895bb2c343d39ce00e85c24d9f64c8c0d84aca40b5cdd472b2a"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/_operation.py"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"b51c8541d0868e8d9aaeb1a35f4aa778298cc9cbae98c467339b7fbc6cbfd2c6"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/shardformer/layer/normalization.py"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc458efaf24ec45d6d2d6c433a85af8de7e066336ca2c5d6fd875296e5e95d86"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/quantization/fp8.py"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"163fc221e21a7948c08c19a44908e1558c83aba8b9d8ecba424ec090817283fe"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/zero/gemini/colo_init_context.py"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e263f5abd68c72950d321f4ac72d085e0d2ebb524934577c015c0b19131655c"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/utils/common.py"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"677b3e906dc7eeddcd71a86b5675a24fe81e699447b43c730caa5db8a8b1d46c"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/nn/layer/parallel_1d/_operation.py"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bb48f6acb8320150f0c232e949576e81232fc17a815a798fa37dcfdd5e2b1a3"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/moe/openmoe/model/modeling_openmoe.py"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ed6659bbe26c8fdcab1dccf241d70350af9a179a7103fa4e258f55709bd686a"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/tensor_parallel/modeling/bloom.py"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf883ffaada66263411108d29cd6cbe49985f4c9df71e9bb608e74aa36aec55d"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/tensor_parallel/modeling/chatglm2.py"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"294348740dc55d24729a7b9bd2735aab1b4437fa23396c1e95254097a39827d8"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/quant/smoothquant/models/llama.py"},"region":{"startLine":541}}}],"partialFingerprints":{"codehealthFindingId/v1":"561f4611019925eb35a688594d7ad49715e6a3f2608fa2fa49e880e2085ad5ee"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/amp/naive_amp/_fp16_optimizer.py"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae6170a9924879107c83c91d79fe1f458eca9f3c98fe951a5b4c23f1c5466669"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/utils.py"},"region":{"startLine":183}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a23752b0f95c346e6709b4dc9e9253711bf94496ee4f0c60153f9a0f5359ada"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/utils.py"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea166b2f755d63af3981b7fbea2d404630036b22db3ad9f7f3952d3b1b42d568"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/core/request_handler.py"},"region":{"startLine":326}}}],"partialFingerprints":{"codehealthFindingId/v1":"85c9ee20fb3755406abbee8ea184f961dd344a921683b63ec8f691dfd024a932"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/_meta_regist_12.py"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"92b730dffe2b71bd99732c46a0e4e0aaacc54af24363e32c1c484cb55073ef71"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/graph_module.py"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdf24f87b6b71304e3cdb84d4bc9cd85755dd40caa6f9f142bc731fae153f176"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/fx/codegen/activation_checkpoint_codegen.py"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef7c77b5f84b92cd55cebee44844312f4d4c11bb47f2415d9a8443d779b9a68e"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/cli/check/check_installation.py"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"138cf783c7ead038689014a932bd5d76e5fc12b131bc61be1a27483579a47755"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/cli/check/check_installation.py"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8f9a90e18a89f6a5046b5f1560e4c6a51e5e0462d6c77a77e6bb79b44e6ed80"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/cli/check/check_installation.py"},"region":{"startLine":211}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cd491cf981164e66416117b8e0eab4cb14eddfb00765465cd2797f13ee184ee"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/auto_parallel/offload/solver.py"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"9088bb766abe485714852eb8a1db755c2c3b2ee8678938dc2009bc10ee09c828"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/accelerator/api.py"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c0ba7c0be6de6681684d5ff93d6d93fea3ec95c368c8a21d837b2007c45c879"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/fx/codegen.py"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e8000f472100e14efb2a02a32ad633ff072190e0b5fac8508b5224c140764ce"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/fx/tracer/symbolic_trace.py"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"87458e57e2de924d89676e213949f426c4877c9bfbdad876b5c66e7e8922a7e6"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/_analyzer/_subclasses/_meta_registration.py"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc7898e862db50d463845c52ab536af0ff31254f1c287e6ac5af0484528ebf5c"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/evaluate/gpt_evaluate.py"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1c356b1f6da5510caa83ac04705795621c02b66a4a212f2856b73f4d343b0c2"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/evaluate/gpt_evaluate.py"},"region":{"startLine":690}}}],"partialFingerprints":{"codehealthFindingId/v1":"a67c44a621e01dcffe016fbf65aac8fa65b29ec060cf714f61266d73936c98a5"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/evaluate/dataset_evaluator/metrics.py"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"2947b306348908d174ef9bf9acd6e95c6ecb16636bc61eb624a1391e4f0b9ee5"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/evaluate/dataset_evaluator/metrics.py"},"region":{"startLine":248}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfd5288f9cc6cff6d11540afc4dc8571a66a37da260051826644585db422c7af"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/evaluate/dataset_evaluator/metrics.py"},"region":{"startLine":357}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc5849646ea881b16b203513b01dd774811b16c97046f021e33a5ef4bdaf0b4e"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/evaluate/dataset_evaluator/metrics.py"},"region":{"startLine":432}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2f640b51263d68d1995e2bc3138f233143a5152add29cd4c6f2142935aeba1b"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/evaluate/dataset_evaluator/metrics.py"},"region":{"startLine":612}}}],"partialFingerprints":{"codehealthFindingId/v1":"de0213287e187b6e5d3b28250f3b23c91fbb31fc2f53f5a162df7fba4ad73043"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/utils/reward_score/gsm8k.py"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"75814af8aca31de2542e9336b181e9d9ee6c024413ed45417af07862fc71f52e"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/reward/reward_fn.py"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd58aae47ffb9c02e43b7c5f5cec54c9984c471f3696236f421d548b6e6f6e66"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/reward/reward_fn.py"},"region":{"startLine":283}}}],"partialFingerprints":{"codehealthFindingId/v1":"1baa0d972056302d8c0dc64ff3b165371e43fe109c98069716dd9064bdc57ad1"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/reward/reward_fn.py"},"region":{"startLine":289}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a651f713d3d57ca87fbbfd7805d52cfd1a200a08b1037dcd78c9932d8c00894"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/reward/code_reward/testing_util.py"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"a29dc61de19d879b3d922056f4f43a502c45eace330188ce999ea6e9c91ba005"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/reward/code_reward/testing_util.py"},"region":{"startLine":256}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb7f5848e9145ffd09329e9854b057c4562c379407956d1f6df204942df0f63c"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/reward/code_reward/testing_util.py"},"region":{"startLine":261}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f294fcf035855cd7725ea3412d545ec664a80a0ce4445f1bd38a713011c9af2"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/reward/code_reward/testing_util.py"},"region":{"startLine":266}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d2d40fbd4b35e2380bb3a6237e79aeff64e6e1b80d8cfe68a9783a3e0b606e1"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/reward/code_reward/testing_util.py"},"region":{"startLine":295}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e6551bc7927cda0a88f34ef960179401d578aeb28c45f9e05a0f47f4dcea77c"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/reward/code_reward/testing_util.py"},"region":{"startLine":469}}}],"partialFingerprints":{"codehealthFindingId/v1":"57a381b0cd8f89fcb0f69d7b7ebb750a8fc7e9b5f201864d9e1d1323c54c61d2"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalChat/coati/distributed/reward/code_reward/testing_util.py"},"region":{"startLine":487}}}],"partialFingerprints":{"codehealthFindingId/v1":"18f275e882c47a67ea181c545f08fe750b355319c6098b56b81047fe3f38bfa4"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 100 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/quantization/bnb.py"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c76bc349a6f074a0474ef52b38ae06f8ab68d3554be39d0a87522dfd3b8cba4"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 60 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/serving/torch_serve/Colossal_Inference_Handler.py"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"61c2ed6f2ab5a6cc3a0ca06cdbb70042c1997486afd137cc2b2b11d3fa0d0303"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 61 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/serving/torch_serve/Colossal_Inference_Handler.py"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"1439308b4b53ad9d6ace00e366d03ad18de9ed428ccdfa10df2169d711e3b14e"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 67 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/serving/torch_serve/Colossal_Inference_Handler.py"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa44e6fe4b7c2cfd0b3fa6534208774147a043e81f11bde91ca9b76099c47bf5"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060warning\u0060 at line 79 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.warning(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.warning(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/serving/torch_serve/Colossal_Inference_Handler.py"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"97fca699b6a0a6b7dd68692010476d7be50f39c4cc2e0a6ff35eb4774842adda"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 92 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/serving/torch_serve/Colossal_Inference_Handler.py"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"567fc2662e458502aa51c5f3e0a80fed0b5b88d1700c7643c63fb76c926e7ef2"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 182 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/serving/torch_serve/Colossal_Inference_Handler.py"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"45d243c849c925ce2576f5df0a03164e8c45a7e79ffd67285199d202267a9aee"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 33 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/serving/ray_serve/Colossal_Inference_rayserve.py"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cba8c661dcfa9a89ba510e11020f150cbfd797c6acacd7dd5f41af3640aee08"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 34 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/serving/ray_serve/Colossal_Inference_rayserve.py"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"63955eb153ae392c1a2852049b564d29e9e85e762812c83b4e6707c123036d33"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 38 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/serving/ray_serve/Colossal_Inference_rayserve.py"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"eea429ab7bfe103a4d14d1aee7dbc202adc188a20766006d983e23f9a3161f93"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 42 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/serving/ray_serve/Colossal_Inference_rayserve.py"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"45f67ace332480aa7b3fd0e6a0b6c9a1a82c48db73c9f1c25fe40a7315392e35"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 60 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/serving/ray_serve/Colossal_Inference_rayserve.py"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"d24842f5a3d6d92db41defca6e9a92e9a4568ae3113453d5ab2bea6b8fd15544"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 83 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/serving/ray_serve/Colossal_Inference_rayserve.py"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bb847327c75791667ae14ef61674c7e7780f9ca7c18eb540d95eb487179bf75"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 86 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/serving/ray_serve/Colossal_Inference_rayserve.py"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbfe3e5caebbf8ec70b8b89654ee0f1f62c18e7b49b60a8e6fd644108c6bb93e"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 91 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/serving/ray_serve/Colossal_Inference_rayserve.py"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce32c6e399f999201c65f08b3cda7e5ed25d8762fbeb573942f04f5525460259"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 139 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/serving/ray_serve/Colossal_Inference_rayserve.py"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"495f314001cacc65ae69e05a05ed4eb42cbc77390099009e11df253d803d5d36"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 24 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/dynamic_batching/ray_dist_init.py"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdc58a4e3fdb856d615b65a2dd1f748bcc91b574be6323f4c11b9f3879cea458"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 25 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/dynamic_batching/ray_dist_init.py"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca8810c127f49a64df669ed8f7034032cd6448f4a6bc8c50e2c216a2965a9f5e"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 29 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/dynamic_batching/ray_dist_init.py"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5198f6980a19bafd6047bfde9ac0d21d075b9a0241f49cf3c2ccfa11a046345"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 33 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/dynamic_batching/ray_dist_init.py"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"867c9b5ce7fe7320f4435701a66cc2b810cd45cf54f94629235b828e4e753374"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 60 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/dynamic_batching/ray_dist_init.py"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc1991eef85eb7025dc14efedac6b0a1bfba60f2a6dd321880566d3eb7fd2023"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060error\u0060 at line 51 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.error(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.error(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/dynamic_batching/ray_init_config.py"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"95fae81da4a08a083ff2abbe55c1a4f40da64122c34e72311f8b71030c657092"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060error\u0060 at line 54 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.error(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.error(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/dynamic_batching/ray_init_config.py"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8d2c482cc00689921d03b67a2cfbc41e62aa09e51628485e8bbe2e086164810"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060error\u0060 at line 57 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.error(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.error(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/legacy/inference/dynamic_batching/ray_init_config.py"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"0208214ab46d0db18812c855bc356e164b5d086e0d5bb84db8473c3108097766"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060warning\u0060 at line 184 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.warning(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.warning(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/logit_processors.py"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c91c8d02c679999f9dabd8ed0c07242490dadb0d47256aa5cf88878f0514c14"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 138 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/server/chat_service.py"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"54a6fcc0abf77641a948cb848aa358787f93c35d862434e345e08c545130c373"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 140 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/server/chat_service.py"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc96d505596aba388ed0dbdaf2db91a4f98b89d7d48aa83a16ddfce00d153c8d"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 107 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/core/async_engine.py"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc660c201ab233cbbc58fa0c4f3411ac9fddac945a7acebc94c208ea9769528a"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 116 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/core/async_engine.py"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcea5b1d01f4af6a0b4d4eaa5a454a028e701e8d8f4f629f453bdddcc71366b4"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 108 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/core/plugin.py"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa70745f0a0be48126670fbcdadd181bc24eb0d29712be12eb6526ca15c0735f"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 129 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/inference/core/plugin.py"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ba7909dc3f7fea5e8f2660ee36a1a11653d0e583b6cedaf1fde0ad97a37f521"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060error\u0060 at line 123 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.error(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.error(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/general_checkpoint_io.py"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"31bf7f90dbeba7a265eacf01f53c22db00dc70539e89d993487d96fc64f1822d"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 169 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/general_checkpoint_io.py"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbb770f47c40642a1f62910c8ea02cae7674cee51b4d0867afdb462c436ab421"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060error\u0060 at line 227 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.error(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.error(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/general_checkpoint_io.py"},"region":{"startLine":227}}}],"partialFingerprints":{"codehealthFindingId/v1":"43ed8d56fa45272d6c5f54f214d754c73b2e80d850923b3c33a0432cfe47490e"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 265 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/general_checkpoint_io.py"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"8613b81c2a2a8092de6856f22f327dbb554c99f44a1d0e1161afb2c350c6db6f"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060error\u0060 at line 286 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.error(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.error(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":286}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0fddcee42b5f00c99c77a58e12580987744c6a6b06b98d5980ca4640a4ecadc"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 336 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":336}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa452547be1cc30b14112bfe2db4b1f0793a56964a3aa9fae28c3f4b8272f520"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 402 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":402}}}],"partialFingerprints":{"codehealthFindingId/v1":"6201192cec1f14ab1e99cebef75c4600f8a36de9bb7ac6e16672cec4c7d9f058"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 493 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":493}}}],"partialFingerprints":{"codehealthFindingId/v1":"03148f638719459f903b23ca8f8b569a7c99149c579d79bbefdfcbb1942c0c94"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 514 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":514}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb1798aee9e9841798cbcac4cfb1a7c92ced20b50101d349cd4cf7b7a100689c"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060error\u0060 at line 543 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.error(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.error(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":543}}}],"partialFingerprints":{"codehealthFindingId/v1":"54f95616378e894e0db9af910ec16a14cdd8d4b2ad43615fcaa4cc5202ac74a7"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 609 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":609}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8935a20e13105f45dde3cf388e341981e5ed8791dc211e40a4d5100fd4b75d3"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 688 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":688}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1211dc7cf691ee776351c0ed42f03f8bce5befabea90bf2a4062ed511e0cb23"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 782 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":782}}}],"partialFingerprints":{"codehealthFindingId/v1":"897431f7eff65ac909e87c59703b04cf619e7d8d79c5f3da53132779272d4711"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060error\u0060 at line 1192 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.error(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.error(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/hybrid_parallel_checkpoint_io.py"},"region":{"startLine":1192}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a9336c963f033a2a1d54526f0fc9c3701b2a823bcf9e7477e4ed619a5f8dac6"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060error\u0060 at line 177 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.error(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.error(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/moe_checkpoint.py"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0c467eda7ce97f424c86f07dfc81abf24b2751e5d96618435f06f5d41a023f8"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 227 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/moe_checkpoint.py"},"region":{"startLine":227}}}],"partialFingerprints":{"codehealthFindingId/v1":"51664b1dcf3ede53d54343c53c3963bce5ffaef2b4aa23363637181999c8b3f5"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 284 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/moe_checkpoint.py"},"region":{"startLine":284}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1a7c8e1440777304367038c1ff50836a8a6a03724acff095d11ae692fd47a03"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060error\u0060 at line 458 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.error(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.error(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/moe_checkpoint.py"},"region":{"startLine":458}}}],"partialFingerprints":{"codehealthFindingId/v1":"1dcb83fac1cb2e30ceab452add427a84a941af0b1b0c8970ad65ec7aa2223234"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 509 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/moe_checkpoint.py"},"region":{"startLine":509}}}],"partialFingerprints":{"codehealthFindingId/v1":"b508f2165fc025fbae07deeab0d56b2d7a4021a9e9c2b38d991a7d82c40e31c6"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 572 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/moe_checkpoint.py"},"region":{"startLine":572}}}],"partialFingerprints":{"codehealthFindingId/v1":"2308aee8f1d47716ad031dfe59677cb6d565fa9e841e4b2901b85de0d77e940d"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info\u0060 at line 686 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.info(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.info(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/moe_checkpoint.py"},"region":{"startLine":686}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc270318a33798129b3ca86c54a71ea1c2e108ad219ca703d9223db5d7be25df"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060error\u0060 at line 1020 is handed an f-string as its message, so the logger receives one finished string \u2014 the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: \u0060logger.error(\u0022order %s moved to %s\u0022, order_id, status)\u0060 with the standard library\u0027s \u0060logging\u0060, which keeps the message and its arguments apart on the record, or \u0060log.error(\u0022order moved\u0022, order_id=order_id, status=status)\u0060 with structlog."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"colossalai/checkpoint_io/moe_checkpoint.py"},"region":{"startLine":1020}}}],"partialFingerprints":{"codehealthFindingId/v1":"65ddea2432bf3d3be9a413019d2ce1394e1fb25c7e437314feb4f7800dde9921"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060rouge_score\u0060 swallows every exception into \u0060return 0.0\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applications/ColossalEval/colossal_eval/evaluate/dataset_evaluator/metrics.py"},"region":{"startLine":612}}}],"partialFingerprints":{"codehealthFindingId/v1":"c16158e654b56e38bc483631d5f65d3289fcc5e2d92c16cffeddeb87bac9c872"}}],"taxonomies":[{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d","organization":"MITRE","informationUri":"https://cwe.mitre.org/","isComprehensive":false,"shortDescription":{"text":"The MITRE Common Weakness Enumeration (CWE)."},"taxa":[{"id":"CWE-1032","guid":"5f21e517-68aa-a650-9a25-5771ef024637","name":"OWASP Top Ten \u2014 Security Misconfiguration category","shortDescription":{"text":"OWASP Top Ten \u2014 Security Misconfiguration category"},"helpUri":"https://cwe.mitre.org/data/definitions/1032.html"},{"id":"CWE-1104","guid":"4c918cb5-b2a6-6c55-9963-a44ee464305e","name":"Use of Unmaintained Third Party Components","shortDescription":{"text":"Use of Unmaintained Third Party Components"},"helpUri":"https://cwe.mitre.org/data/definitions/1104.html"},{"id":"CWE-1329","guid":"f70f1c3f-4ccf-cb5e-bdd3-03ba4868d36d","name":"Reliance on Component That is Not Updateable","shortDescription":{"text":"Reliance on Component That is Not Updateable"},"helpUri":"https://cwe.mitre.org/data/definitions/1329.html"},{"id":"CWE-1352","guid":"5257f322-5cfc-6b52-bedd-0b9a526b4c7d","name":"CWE-1352","shortDescription":{"text":"CWE-1352"},"helpUri":"https://cwe.mitre.org/data/definitions/1352.html"},{"id":"CWE-1357","guid":"e4d2e772-757e-0a5c-bd7d-77052949d866","name":"Reliance on Insufficiently Trustworthy Component","shortDescription":{"text":"Reliance on Insufficiently Trustworthy Component"},"helpUri":"https://cwe.mitre.org/data/definitions/1357.html"},{"id":"CWE-1395","guid":"800e09e7-c11a-8654-9fa6-86f398995fed","name":"Dependency on Vulnerable Third-Party Component","shortDescription":{"text":"Dependency on Vulnerable Third-Party Component"},"helpUri":"https://cwe.mitre.org/data/definitions/1395.html"},{"id":"CWE-16","guid":"659db3ea-affc-8453-8add-c1218fbfcb92","name":"Configuration","shortDescription":{"text":"Configuration"},"helpUri":"https://cwe.mitre.org/data/definitions/16.html"},{"id":"CWE-259","guid":"ae9ad959-fbb6-9d5e-892d-3dca66da0b69","name":"Use of Hard-coded Password","shortDescription":{"text":"Use of Hard-coded Password"},"helpUri":"https://cwe.mitre.org/data/definitions/259.html"},{"id":"CWE-295","guid":"a706c4e2-1232-8859-ae2e-17aa2d41f8e2","name":"Improper Certificate Validation","shortDescription":{"text":"Improper Certificate Validation"},"helpUri":"https://cwe.mitre.org/data/definitions/295.html"},{"id":"CWE-321","guid":"0ce564a5-a44c-3358-b3db-317712e6e019","name":"Use of Hard-coded Cryptographic Key","shortDescription":{"text":"Use of Hard-coded Cryptographic Key"},"helpUri":"https://cwe.mitre.org/data/definitions/321.html"},{"id":"CWE-327","guid":"e51910ff-67b5-3c51-aa3d-92837d9eab90","name":"Use of a Broken or Risky Cryptographic Algorithm","shortDescription":{"text":"Use of a Broken or Risky Cryptographic Algorithm"},"helpUri":"https://cwe.mitre.org/data/definitions/327.html"},{"id":"CWE-330","guid":"f811ddf9-2e54-865b-9c76-f97905849790","name":"Use of Insufficiently Random Values","shortDescription":{"text":"Use of Insufficiently Random Values"},"helpUri":"https://cwe.mitre.org/data/definitions/330.html"},{"id":"CWE-353","guid":"09d7e902-d4ee-f05d-ae6c-0a1554d0c18f","name":"Missing Support for Integrity Check","shortDescription":{"text":"Missing Support for Integrity Check"},"helpUri":"https://cwe.mitre.org/data/definitions/353.html"},{"id":"CWE-494","guid":"b8a65e0d-e459-4a55-a931-fc1136482375","name":"Download of Code Without Integrity Check","shortDescription":{"text":"Download of Code Without Integrity Check"},"helpUri":"https://cwe.mitre.org/data/definitions/494.html"},{"id":"CWE-502","guid":"f7d3b296-aac0-5c5a-b706-e07faba26c36","name":"Deserialization of Untrusted Data","shortDescription":{"text":"Deserialization of Untrusted Data"},"helpUri":"https://cwe.mitre.org/data/definitions/502.html"},{"id":"CWE-506","guid":"401d6455-56e3-0552-9a39-f77461673e3f","name":"Embedded Malicious Code","shortDescription":{"text":"Embedded Malicious Code"},"helpUri":"https://cwe.mitre.org/data/definitions/506.html"},{"id":"CWE-522","guid":"71fb233e-ce6a-ae57-9419-ef8373540b09","name":"Insufficiently Protected Credentials","shortDescription":{"text":"Insufficiently Protected Credentials"},"helpUri":"https://cwe.mitre.org/data/definitions/522.html"},{"id":"CWE-732","guid":"1da27e8f-b330-7650-ab63-bd61953eae5d","name":"Incorrect Permission Assignment for Critical Resource","shortDescription":{"text":"Incorrect Permission Assignment for Critical Resource"},"helpUri":"https://cwe.mitre.org/data/definitions/732.html"},{"id":"CWE-77","guid":"332c8ade-6612-9f56-a06b-d8d90b1a8750","name":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/77.html"},{"id":"CWE-78","guid":"2e31ceaf-c7ae-2e5e-9661-cfb1362789cf","name":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/78.html"},{"id":"CWE-79","guid":"fd45580b-e8c4-fc5e-8c2f-aa8fab0b4dbf","name":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)","shortDescription":{"text":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/79.html"},{"id":"CWE-798","guid":"5e8f057d-fee3-995a-a0cb-9fc5b0d174d1","name":"Use of Hard-coded Credentials","shortDescription":{"text":"Use of Hard-coded Credentials"},"helpUri":"https://cwe.mitre.org/data/definitions/798.html"},{"id":"CWE-829","guid":"13c33925-97fb-5a5e-b40c-56d328b8a4d7","name":"Inclusion of Functionality from Untrusted Control Sphere","shortDescription":{"text":"Inclusion of Functionality from Untrusted Control Sphere"},"helpUri":"https://cwe.mitre.org/data/definitions/829.html"},{"id":"CWE-89","guid":"6d08fdad-37eb-c150-bbf0-d7d946863407","name":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/89.html"},{"id":"CWE-937","guid":"16f316ae-415c-b354-a59b-1f7905f756e9","name":"Using Components with Known Vulnerabilities","shortDescription":{"text":"Using Components with Known Vulnerabilities"},"helpUri":"https://cwe.mitre.org/data/definitions/937.html"},{"id":"CWE-94","guid":"75e7f50c-6c2f-dd52-bf40-bf6c52b861fd","name":"Improper Control of Generation of Code (\u0027Code Injection\u0027)","shortDescription":{"text":"Improper Control of Generation of Code (\u0027Code Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/94.html"},{"id":"CWE-942","guid":"a5e9f9ae-e5c1-215b-b5ef-9b85aa6b4828","name":"Permissive Cross-domain Policy with Untrusted Domains","shortDescription":{"text":"Permissive Cross-domain Policy with Untrusted Domains"},"helpUri":"https://cwe.mitre.org/data/definitions/942.html"},{"id":"CWE-95","guid":"400bba4e-483c-5c50-a695-114fa9168003","name":"Improper Neutralization of Directives in Dynamically Evaluated Code (\u0027Eval Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Directives in Dynamically Evaluated Code (\u0027Eval Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/95.html"}]},{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61","version":"2025","organization":"OWASP Foundation","informationUri":"https://top10.owasp.org/2025/","isComprehensive":false,"shortDescription":{"text":"The OWASP Top 10:2025 web application security risks."},"taxa":[{"id":"A02:2025","guid":"668dee9e-41bc-6354-97d0-fdf8f40c50c1","name":"Security Misconfiguration","shortDescription":{"text":"Security Misconfiguration"},"helpUri":"https://top10.owasp.org/2025/A02_2025-Security_Misconfiguration/"},{"id":"A03:2025","guid":"168e227c-7735-2e57-bc6e-997affe644c5","name":"Software Supply Chain Failures","shortDescription":{"text":"Software Supply Chain Failures"},"helpUri":"https://top10.owasp.org/2025/A03_2025-Software_Supply_Chain_Failures/"},{"id":"A04:2025","guid":"6a9f5bfd-1a56-6453-beec-a7eff0ba3007","name":"Cryptographic Failures","shortDescription":{"text":"Cryptographic Failures"},"helpUri":"https://top10.owasp.org/2025/A04_2025-Cryptographic_Failures/"},{"id":"A05:2025","guid":"87e86033-3231-8458-8e4a-5cb82743553a","name":"Injection","shortDescription":{"text":"Injection"},"helpUri":"https://top10.owasp.org/2025/A05_2025-Injection/"},{"id":"A06:2025","guid":"491554d7-b8e4-9652-91a9-53700dc92ece","name":"Insecure Design","shortDescription":{"text":"Insecure Design"},"helpUri":"https://top10.owasp.org/2025/A06_2025-Insecure_Design/"},{"id":"A07:2025","guid":"334ddd78-539d-d35c-83dd-253647eb7eaf","name":"Authentication Failures","shortDescription":{"text":"Authentication Failures"},"helpUri":"https://top10.owasp.org/2025/A07_2025-Authentication_Failures/"},{"id":"A08:2025","guid":"84b0c297-710e-9a5f-9335-936ecb260c36","name":"Software or Data Integrity Failures","shortDescription":{"text":"Software or Data Integrity Failures"},"helpUri":"https://top10.owasp.org/2025/A08_2025-Software_or_Data_Integrity_Failures/"}]},{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35","organization":"OWASP Foundation","informationUri":"https://owasp.org/www-project-top-10-ci-cd-security-risks/","isComprehensive":false,"shortDescription":{"text":"The OWASP Top 10 CI/CD Security Risks."},"taxa":[{"id":"CICD-SEC-3","guid":"458c83a6-ebf7-cf55-8cc3-b4d949bbf271","name":"Dependency Chain Abuse","shortDescription":{"text":"Dependency Chain Abuse"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-03-Dependency-Chain-Abuse"},{"id":"CICD-SEC-4","guid":"c859d8ea-8b24-a157-9406-94929c10397a","name":"Poisoned Pipeline Execution (PPE)","shortDescription":{"text":"Poisoned Pipeline Execution (PPE)"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-04-Poisoned-Pipeline-Execution"},{"id":"CICD-SEC-5","guid":"cc7f4610-8859-e654-9029-d5f97d992220","name":"Insufficient PBAC (Pipeline-Based Access Controls)","shortDescription":{"text":"Insufficient PBAC (Pipeline-Based Access Controls)"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-05-Insufficient-PBAC"},{"id":"CICD-SEC-6","guid":"f2ee2486-b260-2952-a41f-6b67fa713940","name":"Insufficient Credential Hygiene","shortDescription":{"text":"Insufficient Credential Hygiene"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-06-Insufficient-Credential-Hygiene"},{"id":"CICD-SEC-7","guid":"4c4af28d-49e3-2d51-b597-e1396c49658b","name":"Insecure System Configuration","shortDescription":{"text":"Insecure System Configuration"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-07-Insecure-System-Configuration"},{"id":"CICD-SEC-8","guid":"b6b2dacf-a168-4957-876e-a8c73ee00eb0","name":"Ungoverned Usage of 3rd Party Services","shortDescription":{"text":"Ungoverned Usage of 3rd Party Services"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-08-Ungoverned-Usage-of-3rd-Party-Services"},{"id":"CICD-SEC-9","guid":"b3d36727-0395-5b51-94c4-5e173d62eab3","name":"Improper Artifact Integrity Validation","shortDescription":{"text":"Improper Artifact Integrity Validation"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-09-Improper-Artifact-Integrity-Validation"}]}],"properties":{"codehealthPublication":{"public":true,"notice":"This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings \u2014 which rule fired, in which file, on which line, and how to fix it \u2014 are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.","securityFindingsRedacted":209,"secretScannerRunsExcluded":0}},"redactionTokens":["A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."]}]}