Selected changesmerged Sep 16, 2026 – Sep 22, 2026
core/validation: keep stored ResourceQuota values out of update checksGo · 37 + / 19 −
Introduces 3 new declarations in pkg/apis/core/validation/validation.go.
Adds new systems design rather than adjusting what was there. Tests changed with it, with code of their own.
pkg/apis/core/validation/validation.go ↗ · 2 files
@@ -8528,21 +8528,48 @@ func ValidateResourceQuotaStatus(status *core.ResourceQuotaStatus, fld *field.Pa } func ValidateResourceQuotaSpec(resourceQuotaSpec *core.ResourceQuotaSpec, fld *field.Path) field.ErrorList {+ return validateResourceQuotaSpec(resourceQuotaSpec, nil, fld)+}++// validateResourceQuotaSpec validates a spec against the hard limits the object+// already stores, oldHard, which is nil on create. Nothing is mutated.+func validateResourceQuotaSpec(resourceQuotaSpec *core.ResourceQuotaSpec, oldHard core.ResourceList, fld *field.Path) field.ErrorList { allErrs := field.ErrorList{} - fldPath := fld.Child("hard")- for k, v := range resourceQuotaSpec.Hard {- resPath := fldPath.Key(string(k))- allErrs = append(allErrs, ValidateResourceQuotaResourceName(k, resPath)...)- allErrs = append(allErrs, ValidateResourceQuantityValue(k, v, resPath)...)- }+ allErrs = append(allErrs, validateResourceQuotaResourceList(resourceQuotaSpec.Hard, fld.Child("hard"), oldHard)...) allErrs = append(allErrs, validateResourceQuotaScopes(resourceQuotaSpec, fld)...) allErrs = append(allErrs, validateScopeSelector(resourceQuotaSpec, fld)...) return allErrs } +// validateResourceQuotaResourceList validates every name in values, and every+// value that none of the stored lists holds under the same key. Nothing is mutated.+func validateResourceQuotaResourceList(values core.ResourceList, fldPath *field.Path, stored ...core.ResourceList) field.ErrorList {+ allErrs := field.ErrorList{}+ for k, v := range values {+ resPath := fldPath.Key(string(k))+ allErrs = append(allErrs, ValidateResourceQuotaResourceName(k, resPath)...)+ // A value the object already holds was accepted when it was stored.
kubectl explain: add auto completionGo · 265 + / 5 −
Introduces 7 new declarations in staging/src/k8s.io/kubectl/pkg/cmd/explain/completion.go.
Adds new systems design rather than adjusting what was there. Tests changed with it, with code of their own.
staging/src/k8s.io/kubectl/pkg/cmd/explain/completion.go ↗ · 4 files
@@ -0,0 +1,252 @@+/*+Copyright The Kubernetes Authors.++Licensed under the Apache License, Version 2.0 (the "License");+you may not use this file except in compliance with the License.+You may obtain a copy of the License at++ http://www.apache.org/licenses/LICENSE-2.0++Unless required by applicable law or agreed to in writing, software+distributed under the License is distributed on an "AS IS" BASIS,+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+See the License for the specific language governing permissions and+limitations under the License.+*/++package explain++import (+ "slices"+ "strings"++ "github.com/spf13/cobra"++ "k8s.io/apimachinery/pkg/api/meta"+ "k8s.io/apimachinery/pkg/runtime/schema"+ "k8s.io/cli-runtime/pkg/genericclioptions"+ "k8s.io/client-go/openapi3"+ "k8s.io/kube-openapi/pkg/validation/spec"+ "k8s.io/kubectl/pkg/explain"+ "k8s.io/kubectl/pkg/util/completion"+)+
Don't set nf_conntrack_max if it's already larger than neededGo · 43 + / 30 −
Introduces 5 new declarations in pkg/proxy/conntrack/sysctls.go.
Adds new systems design rather than adjusting what was there. Tests changed with it, with code of their own.
pkg/proxy/conntrack/sysctls.go ↗ · 2 files
@@ -128,39 +152,28 @@ func getConntrackMax(ctx context.Context, config *kubeproxyconfig.KubeProxyConnt return 0, nil } -// detectNumCPU returns the CPU count used to size nf_conntrack_max. That limit+type realConntrackConfigurer struct {+ sys sysctl.Interface+}++// DetectNumCPU returns the CPU count used to size nf_conntrack_max. That limit // is host-wide, so it must be based on the node's CPU count, not runtime.NumCPU(): // runtime.NumCPU() honors the process cpuset and undercounts when kube-proxy // runs under a static CPU policy. cpuset.NumCPU() reads the node's online CPU // count from sysfs instead, falling back to runtime.NumCPU() if it can't.-func detectNumCPU() int {+func (rct realConntrackConfigurer) DetectNumCPU() int { if n, err := cpuset.NumCPU(); err == nil && n > 0 { return n } return runtime.NumCPU() } -type realConntrackConfigurer struct {+func (rct realConntrackConfigurer) GetMax(_ context.Context) (int, error) {+ return rct.sys.GetSysctl("net/netfilter/nf_conntrack_max") } func (rct realConntrackConfigurer) SetMax(ctx context.Context, max int) error {- logger := klog.FromContext(ctx)- logger.Info("Setting nf_conntrack_max", "nfConntrackMax", max)- if err := rct.setIntSysCtl(ctx, "nf_conntrack_max", max); err != nil {- return err- }-
sqlite: add virtual table support via createModule()C++ · 826 + / 0 −
Introduces 7 new declarations in src/node_sqlite.cc.
Adds new runtime rather than adjusting what was there. Tests changed with it, with code of their own.
src/node_sqlite.cc ↗ · 5 files
@@ -1012,6 +1015,483 @@ BaseObjectPtr<DatabaseSyncLimits> DatabaseSyncLimits::Create( return MakeBaseObject<DatabaseSyncLimits>(env, obj, std::move(database)); } +// ---------------------------------------------------------------------------+// VirtualTableModule+// ---------------------------------------------------------------------------++VirtualTableModule::VirtualTableModule(Environment* env,+ BaseObjectWeakPtr<DatabaseSync> db,+ Local<Function> rows_fn,+ std::string&& schema_sql,+ int num_columns,+ std::vector<int>&& hidden_col_indices,+ bool use_bigint_args,+ bool direct_only)+ : env_(env),+ db_(std::move(db)),+ rows_fn_(env->isolate(), rows_fn),+ schema_sql_(std::move(schema_sql)),+ num_columns_(num_columns),+ hidden_col_indices_(std::move(hidden_col_indices)),+ use_bigint_args_(use_bigint_args),+ direct_only_(direct_only),+ module_def_({}) {+ // Initialize the sqlite3_module definition. Each VirtualTableModule instance+ // gets its own copy to avoid thread-safety issues with worker threads.+ module_def_.iVersion = 1;+ module_def_.xCreate = VirtualTableModule::xCreate;+ module_def_.xConnect = VirtualTableModule::xCreate;+ module_def_.xBestIndex = VirtualTableModule::xBestIndex;+ module_def_.xDisconnect = VirtualTableModule::xDisconnect;+ module_def_.xDestroy = VirtualTableModule::xDestroy;+ module_def_.xOpen = VirtualTableModule::xOpen;
Fix non-deterministic encoding of syntax contextsRust · 87 + / 59 −
Introduces 4 new declarations in compiler/rustc_span/src/hygiene.rs.
Adds new language design rather than adjusting what was there. Tests changed with it, with code of their own.
compiler/rustc_span/src/hygiene.rs ↗ · 5 files
@@ -1337,58 +1381,51 @@ impl HygieneEncodeContext { h_ctxt.borrow().latest_ctxts ); - let mut mut_hctxt = h_ctxt.borrow_mut();- // Consume the current round of syntax contexts. // It's fine to iterate over a HashSet, because the serialization of the table // that we insert data into doesn't depend on insertion order. #[allow(rustc::potential_query_instability)]- let latest_ctxts = { mem::take(&mut mut_hctxt.latest_ctxts) }.into_iter();+ let latest_contexts = { mem::take(&mut h_ctxt.borrow_mut().latest_ctxts) }.into_iter(); - HygieneData::with(|data| {- for ctxt in latest_ctxts {- if !mut_hctxt.serialized_ctxts.insert(ctxt) {- continue;- }-- all_ctxt_data.push((ctxt.0, data.syntax_context_data[ctxt.0 as usize].key()));- }- });-- drop(mut_hctxt);-- for (idx, ctxt_key) in all_ctxt_data.drain(..) {- encode_ctxt(encoder, idx, &ctxt_key);+ for (idx, ctxt) in latest_contexts {+ let key = HygieneData::with(|data| data.syntax_context_data[ctxt.0 as usize].key());+ encode_ctxt(encoder, idx, &key); } - let mut mut_hctxt = h_ctxt.borrow_mut();-
Fix startTime and shutdown delivery of forwarded Turbopack trace spansRust · 154 + / 33 −
Introduces 5 new declarations in turbopack/crates/turbo-tasks/src/message_queue.rs.
Adds new framework internals rather than adjusting what was there. Tests changed with it, with code of their own.
turbopack/crates/turbo-tasks/src/message_queue.rs ↗ · 5 files
@@ -59,58 +88,93 @@ impl CompilationEventQueue { history.pop_front(); } history.push_back(message_clone.clone());+ drop(history);++ if deliver {+ // Send to all active receivers of the same message type+ if let Some(mut type_subscribers) = subscribers.get_mut(&EventChannelType::Type(+ message_clone.type_name().to_owned(),+ )) {+ let mut removal_indices = Vec::new();+ for (ix, sender) in type_subscribers.iter().enumerate() {+ if sender.send(message_clone.clone()).await.is_err() {+ removal_indices.push(ix);+ }+ } - // Send to all active receivers of the same message type- if let Some(mut type_subscribers) = subscribers.get_mut(&EventChannelType::Type(- message_clone.type_name().to_owned(),- )) {- let mut removal_indices = Vec::new();- for (ix, sender) in type_subscribers.iter().enumerate() {- if sender.send(message_clone.clone()).await.is_err() {- removal_indices.push(ix);+ for ix in removal_indices.iter().rev() {+ type_subscribers.remove(*ix); } } - for ix in removal_indices.iter().rev() {- type_subscribers.remove(*ix);- }
fix(asr): warm up Numba RNNT and TDT losses before trainingPython · 116 + / 1 −
Introduces 7 new declarations in nemo/collections/asr/parts/numba/rnnt_loss/rnnt_pytorch.py.
Adds new core implementation rather than adjusting what was there. Tests changed with it, with code of their own.
nemo/collections/asr/parts/numba/rnnt_loss/rnnt_pytorch.py ↗ · 6 files
@@ -552,6 +583,51 @@ def __init__( self.sigma = sigma self.omega = omega + def warmup(self, device: Union[str, torch.device]) -> bool:+ """Warm both TDT and RNNT CUDA branches with float32 contiguous inputs before allocating training activations.++ Preserves random states and the configured loss; returns False on CPU.+ """+ device = torch.device(device)+ if device.type != 'cuda':+ return False++ def warmup():+ # Non-singleton dimensions preserve the contiguous production array layout.+ labels_count = 3+ frames = max(8, (labels_count + 1) * max(self.durations))+ vocabulary_size = max(2, self.blank + 1)+ label = 1 if self.blank == 0 else 0+ for omega in (-1.0, 2.0):+ # Force each branch even when random.uniform returns an endpoint.+ loss = TDTLossNumba(+ blank=self.blank,+ durations=list(self.durations),+ reduction='mean',+ fastemit_lambda=self.fastemit_lambda,+ clamp=self.clamp,+ sigma=self.sigma,+ omega=omega,+ )+ acts = torch.zeros(+ (2, frames, labels_count + 1, vocabulary_size + len(self.durations)),+ device=device,+ dtype=torch.float32,
Always materialize the causal mask in Doge so sdpa stays causalPython · 85 + / 2 −
Introduces 3 new declarations in src/transformers/models/doge/modular_doge.py.
Adds new core implementation rather than adjusting what was there. Tests changed with it, with code of their own.
src/transformers/models/doge/modular_doge.py ↗ · 3 files
@@ -449,7 +450,61 @@ def _init_weights(self, module): class DogeModel(MixtralModel):- pass+ def forward(+ self,+ input_ids: torch.LongTensor | None = None,+ attention_mask: torch.Tensor | None = None,+ position_ids: torch.LongTensor | None = None,+ past_key_values: Cache | None = None,+ inputs_embeds: torch.FloatTensor | None = None,+ use_cache: bool | None = None,+ **kwargs: Unpack[TransformersKwargs],+ ) -> MoeModelOutputWithPast:+ if (input_ids is None) ^ (inputs_embeds is not None):+ raise ValueError("You must specify exactly one of input_ids or inputs_embeds")++ if use_cache and past_key_values is None:+ past_key_values = DynamicCache(config=self.config)++ if inputs_embeds is None:+ inputs_embeds = self.embed_tokens(input_ids)++ if position_ids is None:+ past_seen_tokens = past_key_values.get_seq_length() if past_key_values is not None else 0+ position_ids = torch.arange(inputs_embeds.shape[1], device=inputs_embeds.device) + past_seen_tokens+ position_ids = position_ids.unsqueeze(0)++ mask_function = create_causal_mask if self.config.sliding_window is None else create_sliding_window_causal_mask+ causal_mask = mask_function(+ config=self.config,+ inputs_embeds=inputs_embeds,+ attention_mask=attention_mask,
model : add support for HrmTextForCausalLM (DFM Mimir 1B)C++ · 281 + / 1 −
Introduces 5 new declarations in src/models/hrm-text.cpp.
Adds new runtime rather than adjusting what was there. Tests changed with it, with code of their own.
src/models/hrm-text.cpp ↗ · 16 files
@@ -0,0 +1,213 @@+#include "models.h"++// HRM-Text: alternating low/high transformer stacks over the same token stream.+// Reference: HrmTextModel in transformers, DFM Mimir 1B.++void llama_model_hrm_text::load_arch_hparams(llama_model_loader & ml) {+ ml.get_key(LLM_KV_ATTENTION_LAYERNORM_RMS_EPS, hparams.f_norm_rms_eps);+ ml.get_key(LLM_KV_EMBEDDING_SCALE, hparams.f_embedding_scale, false);++ ml.get_key(LLM_KV_HRM_LAYERS_PER_STACK, hparams.n_hrm_layers_per_stack);+ ml.get_key(LLM_KV_HRM_H_CYCLES, hparams.n_hrm_h_cycles);+ ml.get_key(LLM_KV_HRM_L_CYCLES, hparams.n_hrm_l_cycles);++ // prefix-LM prefill is not implemented (causal attention only); kept for round-trip+ ml.get_key(LLM_KV_HRM_PREFIX_LM, hparams.hrm_prefix_lm, false);++ GGML_ASSERT(hparams.n_hrm_layers_per_stack > 0);+ GGML_ASSERT(hparams.n_hrm_h_cycles > 0);+ GGML_ASSERT(hparams.n_hrm_l_cycles > 0);++ // the GGUF block count is the expanded cache-slot count+ const uint32_t n_slot = hparams.n_hrm_layers_per_stack * hparams.n_hrm_h_cycles * (hparams.n_hrm_l_cycles + 1);+ GGML_ASSERT(hparams.n_layer() == n_slot);++ switch (hparams.n_embd) {+ case 1536:+ type = LLM_TYPE_1B;+ break;+ default:+ type = LLM_TYPE_UNKNOWN;+ }+}+
[CB] Add pause mechanismPython · 178 + / 43 −
Introduces 10 new declarations in src/transformers/generation/continuous_batching/continuous_api.py.
Adds new core implementation rather than adjusting what was there. Tests changed with it, with code of their own.
src/transformers/generation/continuous_batching/continuous_api.py ↗ · 4 files
@@ -137,58 +139,77 @@ def fail_and_deliver(self, state: RequestState, error: Exception) -> None: class BackgroundThreadStatus: """Tracks the status of the background thread locally and in its TP group. The status is an int that can only- increase, representing how soon the thread should stop."""+ increase, representing how soon the thread should stop.+ Through this object, threads sharing the model can also pause the generation loop. Any number of threads may ask at+ once, and the loop resumes once they are all done.+ """ + # Stop statuses, in increasing order of urgency. The local status can only ever increase. DONT_STOP = 0 FLUSH_AND_STOP = 1 HARD_STOP = 2 STOPPED = 3 def __init__(self) -> None:- self._local_status_lock = threading.Lock()+ self.fatal_error = None+ self._condition = threading.Condition() self._local_status = self.DONT_STOP self._tp_status = self.DONT_STOP- self.fatal_error = None+ self._pauses_requested = 0+ self._local_pauses_requested = ThreadLocalCounter()+ self._paused = False def clear(self) -> None:- """Clear the local and TP statuses. This method should ONLY be called by the main thread itself BEFORE starting- the background thread."""- self._tp_status = self.DONT_STOP- with self._local_status_lock:+ """Clear the statuses and the pause state. This method should ONLY be called by the main thread itself BEFORE+ starting the background thread."""
BUG: named agg result depended on the output name matching the column name (GH#63743)Python · 40 + / 4 −
Introduces 3 new declarations in pandas/core/apply.py.
Adds new core implementation rather than adjusting what was there. Tests changed with it, with code of their own.
pandas/core/apply.py ↗ · 4 files
@@ -1902,10 +1902,22 @@ def reconstruct_func( names, and the reconstructed order of columns. If relabeling is False, the columns and order will be None. + Named aggregation is the one exception: when ``allow_skip_normalization`` is+ True, every output name equals its source column name, and every aggfunc+ reduces to a scalar, relabeling is reported as False (and columns/order as+ None) even though named aggregation was used, because the caller can consume+ the un-normalized func directly.+ Parameters ---------- func: agg function (e.g. 'min' or Callable) or list of agg functions (e.g. ['min', np.max]) or dictionary (e.g. {'A': ['min', np.max]}).+ allow_skip_normalization: bool, default False+ Whether the caller can handle the un-normalized ``{column: aggfunc}`` form+ that named aggregation reduces to when every output name equals its source+ column name and every aggfunc is a scalar reduction. Callers that rely on+ ``columns``/``order`` being returned whenever named aggregation was used+ must leave this False. **kwargs: dict, kwargs used in is_multi_agg_with_relabel and normalize_keyword_aggregation function for relabelling
Staticlib rename internal symbols: add COFF supportRust · 183 + / 17 −
Introduces 3 new declarations in compiler/rustc_codegen_ssa/src/back/symbol_edit.rs.
Adds new language design rather than adjusting what was there. Tests changed with it, with code of their own.
compiler/rustc_codegen_ssa/src/back/symbol_edit.rs ↗ · 4 files
@@ -441,6 +476,125 @@ fn macho_rebuild_strtab( Some(result) } +// ---------------------------------------------------------------------------+// COFF: single-pass collection + apply+// ---------------------------------------------------------------------------++fn coff_collect_impl<'data, Coff: CoffHeader>(+ data: &'data [u8],+ header: &'data Coff,+ exported: &FxHashSet<String>,+ out: &mut FxHashSet<String>,+ strip_underscore: bool,+) {+ let Ok(symbols) = header.symbols(data) else { return };+ let strings = symbols.strings();++ for (_index, sym) in symbols.iter() {+ let sclass = sym.storage_class();+ if sclass != pe::IMAGE_SYM_CLASS_EXTERNAL && sclass != pe::IMAGE_SYM_CLASS_WEAK_EXTERNAL {+ continue;+ }+ if sym.section_number() <= 0 {+ continue;+ }+ let Ok(name_bytes) = sym.name(strings) else { continue };+ let Ok(mut name) = str::from_utf8(name_bytes).map(String::from) else { continue };+ if strip_underscore {+ name = name.strip_prefix('_').unwrap_or(&name).to_string();+ }+ if !exported.contains(&name) {+ out.insert(name);+ }