7-day edition

Nov 8, 2026 – Nov 14, 2026

The edition exactly as it was published. Nothing here is re-selected on a later reading.

Nov 15, 202612 reads · 934 merged PRs screened

core implementation

huggingface/transformers · #50513

Files changed →View PR ↗

[masking] Fix packed sequences for abitrary mask formsPython · 49 + / 4 −

Introduces 3 new declarations in src/transformers/masking_utils.py.

Adds new core implementation rather than adjusting what was there. Tests changed with it, with code of their own.

src/transformers/masking_utils.py ↗ · 2 files

@@ -186,6 +190,38 @@ def inner_mask(batch_idx: int, head_idx: int, q_idx: int, kv_idx: int) -> bool:     return inner_mask  +def remap_positions_for_packed_sequence(mask_function: Callable, position_ids: torch.Tensor) -> Callable:+    """+    This function remaps the monotonically increasing `q_idx` and `kv_idx` to their actual per-sequence indices when we detect+    packed sequence format, i.e. several sequences inside the same batch dimension.+    Note that it is ensured that `position_ids.shape[1] == q_length == kv_length` here, so we can never have indexing problems here.+    If this was not the case, i.e. q_length < kv_length, we would need to infer the packed kv_position_ids, since the `position_ids`+    in the argument here are the packed query positions. Then we would need to remap q_idx and kv_idx with a different tensor.+    """++    def inner_mask(batch_idx: int, head_idx: int, q_idx: int, kv_idx: int) -> bool:+        return mask_function(batch_idx, head_idx, position_ids[batch_idx, q_idx], position_ids[batch_idx, kv_idx])++    return inner_mask+++def packed_sequence_compatibility_function(+    mask_function: Callable, position_ids: torch.Tensor, packed_sequence_mask: torch.Tensor+) -> Callable:+    """+    This function ensures compatibility of the current `mask_function` with packed sequence format, by making sure each sequence+    stays fully independent of all others, and the `q_idx` and `kv_idx` positions inside each sequence are correctly remapped to+    their actual values.+    Note that it is ensured that `position_ids.shape[1] == packed_sequence_mask.shape[1] == q_length == kv_length`, so we can never+    have indexing problems here.+    """+    # For packed sequences, we need to make sure each sequence are independent, as well as remapping the indices+    return and_masks(+        packed_sequence_mask_function(packed_sequence_mask),+        remap_positions_for_packed_sequence(mask_function, position_ids),+    )

systems design

kubernetes/kubernetes · #143980

Files changed →View PR ↗

Extract indexedWatchers.allMatchingWatchers iteratorGo · 33 + / 15 −

Introduces 4 new declarations in staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher.go.

Adds new systems design rather than adjusting what was there. Tests changed with it, with code of their own.

staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher.go ↗ · 2 files

@@ -1257,24 +1258,41 @@ func (c *Cacher) startDispatching(event *watchCacheEvent) {  	namespace := event.ObjFields["metadata.namespace"] 	name := event.ObjFields["metadata.name"]-	forEachSelectionKey(namespace, name, triggerValues, supported,-		func(scope namespacedName) {-			for _, watcher := range c.watchers.scopeWatchers[scope] {-				c.watchersBuffer = append(c.watchersBuffer, watcher)-			}-		},-		func(indexValue string) {-			for _, watcher := range c.watchers.indexWatchers[indexValue] {-				c.watchersBuffer = append(c.watchersBuffer, watcher)+	for watcher := range c.watchers.allMatchingWatchers(namespace, name, triggerValues, supported) {+		c.watchersBuffer = append(c.watchersBuffer, watcher)+	}+}++func (i *indexedWatchers) allMatchingWatchers(namespace, name string, triggerValues []string, triggerSupported bool) iter.Seq[*cacheWatcher] {+	return func(yield func(*cacheWatcher) bool) {+		stopped := false+		yieldWatchers := func(watchers watchersMap) {+			if stopped {+				return 			}-		},-		func() {-			for _, watchers := range c.watchers.indexWatchers {-				for _, watcher := range watchers {-					c.watchersBuffer = append(c.watchersBuffer, watcher)+			for _, watcher := range watchers {+				if !yield(watcher) {+					stopped = true+					return

core implementation

pandas-dev/pandas · #72058

Files changed →View PR ↗

ENH: Series.interval accessor (GH#16401)Python · 113 + / 0 −

Introduces 6 new declarations in pandas/core/arrays/interval.py.

Adds new core implementation rather than adjusting what was there. Tests changed with it, with code of their own.

pandas/core/arrays/interval.py ↗ · 7 files

@@ -2003,3 +2013,102 @@ def _maybe_convert_platform_interval(values) -> ArrayLike:         if values.dtype.kind in "iu" and values.dtype != np.int64:             values = values.astype(np.int64)     return values+++# ---------------------------------------------------------------------+# The Series.interval accessor+++@delegate_names(+    delegate=IntervalArray,+    accessors=["left", "right", "mid", "length", "is_empty", "closed"],+    typ="property",+)+@delegate_names(+    delegate=IntervalArray,+    accessors=["overlaps", "contains", "set_closed"],+    typ="method",+)+class IntervalAccessor(PandasDelegate, PandasObject, NoNewAttributesMixin):+    """+    Accessor object for interval properties of the Series values.++    Provides the endpoints, midpoints and lengths of the intervals, and+    elementwise checks for containment and overlap, each returned as a+    Series aligned with the original. A categorical Series with interval+    categories, such as the result of :func:`cut`, is also supported.++    Parameters+    ----------+    data : Series+        The Series with interval or interval-categorical dtype to which the+        accessor is attached.

language design

rust-lang/rust · #165047

Files changed →View PR ↗

Change the span building of paths from first-to-last to chainedRust · 43 + / 4 −

Introduces 3 new declarations in compiler/rustc_parse/src/parser/path.rs.

Adds new language design rather than adjusting what was there. Tests changed with it, with code of their own.

compiler/rustc_parse/src/parser/path.rs ↗ · 4 files

@@ -208,23 +208,35 @@ impl<'a> Parser<'a> {         }          let lo = self.token.span;+        let mut path_span = None;         let mut segments = ThinVec::new();         let mod_sep_ctxt = self.token.span.ctxt();         if self.eat_path_sep() {+            chain_span(&mut path_span, self.prev_token.span);             segments.push(PathSegment::path_root(lo.shrink_to_lo().with_ctxt(mod_sep_ctxt)));         }-        self.parse_path_segments(&mut segments, style, ty_generics)?;-        Ok(Path { segments, span: lo.to(self.prev_token.span) })+        self.parse_path_segments_with_path_span(&mut segments, style, ty_generics, &mut path_span)?;+        Ok(Path { segments, span: path_span.unwrap() })     }      pub(super) fn parse_path_segments(         &mut self,         segments: &mut ThinVec<PathSegment>,         style: PathStyle,         ty_generics: Option<&Generics>,+    ) -> PResult<'a, ()> {+        self.parse_path_segments_with_path_span(segments, style, ty_generics, &mut None)+    }++    fn parse_path_segments_with_path_span(+        &mut self,+        segments: &mut ThinVec<PathSegment>,+        style: PathStyle,+        ty_generics: Option<&Generics>,+        path_span: &mut Option<Span>,     ) -> PResult<'a, ()> {         loop {

runtime

ggml-org/llama.cpp · #32053

Files changed →View PR ↗

chat: allow TTS model to provide custom text normalizer via jinjaC++ · 929 + / 0 −

Introduces 15 new declarations in common/chat-tts-norm.cpp.

Adds new runtime rather than adjusting what was there. Tests changed with it, with code of their own.

common/chat-tts-norm.cpp ↗ · 7 files

@@ -0,0 +1,864 @@+#include "chat-tts-norm.h"++#include "jinja/runtime.h"+#include "jinja/value.h"++#include <algorithm>+#include <climits>+#include <stdexcept>+#include <string>+#include <vector>++// TTS normalization patterns, see docs/tts-norm-patterns.md for the specification+// keep this file in sync with the python reference: scripts/chat_tts_norm.py++using namespace jinja;++//+// character classes+// they are defined with explicit codepoint ranges, independent of any unicode database version,+// so that the C++ and python implementations agree on every codepoint+//++struct tts_norm_range {+    uint32_t lo;+    uint32_t hi;+};++static const tts_norm_range TTS_NORM_SPACE[] = {+    {0x0009, 0x000D}, {0x0020, 0x0020}, {0x0085, 0x0085}, {0x00A0, 0x00A0}, {0x1680, 0x1680},+    {0x2000, 0x200A}, {0x2028, 0x2029}, {0x202F, 0x202F}, {0x205F, 0x205F}, {0x3000, 0x3000},+};++static const tts_norm_range TTS_NORM_PUNCT[] = {

language design

rust-lang/rust · #165305

Files changed →View PR ↗

hexagon: pass small aggregates on the stack when registers run outRust · 70 + / 19 −

Introduces 3 new declarations in compiler/rustc_target/src/callconv/hexagon.rs.

Adds new language design rather than adjusting what was there. Tests changed with it, with code of their own.

compiler/rustc_target/src/callconv/hexagon.rs ↗ · 3 files

@@ -41,29 +68,50 @@ where     }     if arg.layout.pass_indirectly_in_non_rustic_abis(cx) {         arg.make_indirect();+        // The pointer to the indirectly passed value takes up a register.+        adjust_regs_left(Size::from_bytes(4), regs_left);         return;     } +    let size = arg.layout.size;+     if !arg.layout.is_aggregate() {+        if size.bytes() <= 8 {+            adjust_regs_left(size, regs_left);+        }         arg.extend_integer_width_to(32);         return;     } -    // Per the Hexagon ABI:-    // - Aggregates up to 32 bits are passed in a single register-    // - Aggregates 33-64 bits are passed in a register pair-    // - Aggregates > 64 bits are passed on the stack-    let size = arg.layout.size;-    let bits = size.bits();-    if bits <= 32 {-        arg.cast_to(Uniform::new(Reg::i32(), size));-    } else if bits <= 64 {-        arg.cast_to(Uniform::new(Reg::i64(), size));+    if size.bytes() > 8 {+        arg.pass_by_stack_offset(None);+        return;+    }+

runtime

ggml-org/llama.cpp · #26014

Files changed →View PR ↗

Windows unbuffered model loadC++ · 265 + / 35 −

Introduces 3 new declarations in src/llama-mmap.cpp.

Adds new runtime rather than adjusting what was there. Tests changed with it, with code of their own.

src/llama-mmap.cpp ↗ · 3 files

@@ -123,24 +207,159 @@ struct llama_file::impl {         li.QuadPart = offset;         BOOL ret = SetFilePointerEx(fp_win32, li, NULL, whence);         if (!ret) {-            throw std::runtime_error(format("read error: %s", GetErrorMessageWin32(GetLastError()).c_str()));+            throw std::runtime_error(format("seek error: %s", GetErrorMessageWin32(GetLastError()).c_str()));         }     } -    void read_raw(void * ptr, size_t len) {+    void read_raw_unsafe(void * ptr, size_t len) {+        if (len == 0) {+            return;+        }++        const size_t read_offset = tell();+        if (read_offset > size) {+            throw std::runtime_error("unexpectedly reached end of file");+        }++        if (!has_direct_io()) {+            const size_t read_size = std::min(len, size - read_offset);+            size_t bytes_read = 0;+            while (bytes_read < read_size) {+                const DWORD to_read = (DWORD) std::min<size_t>(read_size - bytes_read, MAXDWORD);+                DWORD chunk_read = 0;+                BOOL result = ReadFile(fp_win32, reinterpret_cast<char *>(ptr) + bytes_read,+                                       to_read, &chunk_read, NULL);+                if (!result) {+                    throw std::runtime_error(format("read error: %s", GetErrorMessageWin32(GetLastError()).c_str()));+                }+                if (chunk_read < to_read) {+                    throw std::runtime_error("unexpectedly reached end of file");+                }

core implementation

holoviz/panel · #9073

Files changed →View PR ↗

fix: Keep pn.serve(threaded=True) working after the main thread finishesPython · 40 + / 0 −

Introduces 3 new declarations in panel/io/threads.py.

Adds new core implementation rather than adjusting what was there. Tests changed with it, with code of their own.

panel/io/threads.py ↗ · 2 files

@@ -12,6 +16,37 @@ _SHUTDOWN_TIMEOUT = 5  +_exit_hook_registered = False+_started_threads: weakref.WeakSet['StoppableThread'] = weakref.WeakSet()+++def _join_threads_at_exit() -> None:+    while threads := [thread for thread in list(_started_threads) if thread.is_alive()]:+        for thread in threads:+            thread.join()+++def _register_exit_hook() -> None:+    """+    Keep thread pools usable for as long as a StoppableThread is serving.++    When the main thread finishes, Python first disables all thread pools+    and only then waits for the remaining threads, so a server that keeps+    running in a thread could no longer hand off any work. Waiting for the+    server threads in a hook that runs before the pools are disabled avoids+    that. Such hooks run in reverse order of registration.+    """+    global _exit_hook_registered+    if _exit_hook_registered:+        return+    try:+        threading._register_atexit(_join_threads_at_exit)  # type: ignore[attr-defined]+    except (AttributeError, RuntimeError):+        # No such hook, or the interpreter is already shutting down+        return+    _exit_hook_registered = True+

core implementation

holoviz/panel · #9070

Files changed →View PR ↗

perf: Batch scheduled model updates and combine held events linearlyPython · 240 + / 66 −

Introduces 11 new declarations in panel/io/document.py.

Adds new core implementation rather than adjusting what was there. Tests changed with it, with code of their own.

panel/io/document.py ↗ · 7 files

@@ -365,42 +464,51 @@ def _apply_json_patch(*args, **kwargs):  async def _dispatch_msgs(doc):     """-    Serializes and writes batches of events to the sockets, ensuring-    that the write_lock is not set, otherwise re-schedules the write-    task on the event loop.--    The events are serialized here, i.e. at write time, and not when-    they were scheduled. Bokeh tracks which models a client has already-    been sent as part of the Document, so serializing a patch declares-    the models it defines as synced. Serializing eagerly and writing-    later would therefore allow a message that was serialized after-    ours (e.g. one Bokeh itself dispatches at the end of a locked-    callback) to be written first, referencing models the client has-    not been sent yet.+    Serializes and writes the queued batches of events to the sockets+    in order, waiting for each socket's write lock rather than writing+    while something else is writing to it. Only one dispatcher runs per+    Document, draining batches queued while it was writing, so the+    order the batches were scheduled in is preserved.++    The events are serialized here, i.e. at write time while holding+    the write lock, and not when they were scheduled. Bokeh tracks which+    models a client has already been sent as part of the Document, so+    serializing a patch declares the models it defines as synced.+    Serializing eagerly and writing later would therefore allow a+    message that was serialized after ours (e.g. one Bokeh itself+    dispatches at the end of a locked callback) to be written first,+    referencing models the client has not been sent yet.     """-    if doc not in _WRITE_BLOCK:-        return-    futures: list[Future] = []

systems design

kubernetes/kubernetes · #143979

Files changed →View PR ↗

Extract eventsAfterLocked and checkResourceVersionLocked methodsGo · 40 + / 13 −

Introduces 3 new declarations in staging/src/k8s.io/apiserver/pkg/storage/cacher/watch_cache_history.go.

Adds new systems design rather than adjusting what was there. Tests changed with it, with code of their own.

staging/src/k8s.io/apiserver/pkg/storage/cacher/watch_cache_history.go ↗ · 2 files

@@ -219,26 +220,52 @@ func (w *watchCacheHistory) suggestedWatchChannelSize(indexExists, triggerUsed b // retrieve events since a certain resourceVersion. This function assumes to // be called under the lock. func (w *watchCacheHistory) GetIntervalLocked(resourceVersion uint64, locker sync.Locker) (*watchCacheInterval, error) {-	size := w.endIndex - w.startIndex+	if err := w.checkResourceVersionLocked(resourceVersion); err != nil {+		return nil, err+	}+	first := w.firstIndexAfterLocked(resourceVersion)+	indexerFunc := func(i int) *watchCacheEvent {+		return w.cache[i%w.capacity]+	}+	ci := newCacheInterval(first, w.endIndex, indexerFunc, w.config.indexValidator, resourceVersion, locker)+	return ci, nil+}++// eventsAfterLocked yields buffered events with ResourceVersion > resourceVersion+// in ascending ResourceVersion order. This function assumes to be called under+// the lock.+func (w *watchCacheHistory) eventsAfterLocked(resourceVersion uint64) iter.Seq[*watchCacheEvent] {+	return func(yield func(*watchCacheEvent) bool) {+		for i := w.firstIndexAfterLocked(resourceVersion); i < w.endIndex; i++ {+			if !yield(w.cache[i%w.capacity]) {+				return+			}+		}+	}+}++// checkResourceVersionLocked verifies that history is initialized and can+// still serve events strictly after resourceVersion. This function assumes to+// be called under the lock.+func (w *watchCacheHistory) checkResourceVersionLocked(resourceVersion uint64) error { 	oldest, ok := w.oldestServableLocked()

framework internals

holoviz/panel · #9067

Files changed →View PR ↗

perf: Make ReactiveESM components cheap to render and updatePython · 197 + / 51 −

Introduces 12 new declarations in panel/custom.py.

Adds new framework internals rather than adjusting what was there. Tests changed with it, with code of their own.

panel/custom.py ↗ · 3 files

@@ -434,40 +523,66 @@ def _update_esm(self):                 continue             self._apply_update({}, {'esm': esm}, model, ref) -    @property-    def _linked_properties(self) -> tuple[str, ...]:-        mapping = {v: k for k, v in self._property_mapping.items() if v is not None}-        params = self.param.objects(instance=False)-        return tuple(-            p for p in self._data_model.properties()-            if p not in _IGNORED_ESM_PROPERTIES and not isinstance(params[mapping.get(p, p)], (Child, Children))-        )--    def _get_properties(self, doc: Document | None) -> dict[str, t.Any]:-        props = super()._get_properties(doc)-        cls = type(self)-        data_props = {}+    @classmethod+    def _esm_spec(cls) -> _ESMSpec:+        spec = _ESM_SPECS.get(cls)+        if spec is not None:+            return spec+        params = cls.param.objects(instance=False)+        mapping = cls._property_mapping         # Split data model properties from ESM model properties         # Note that inherited parameters are generally treated         # as ESM model properties unless their type has changed-        ignored = [+        ignored = tuple(             p for p in Reactive.param-            if not issubclass(cls.param[p].owner, ReactiveESM) or+            if not issubclass(params[p].owner, ReactiveESM) or             (p in Viewable.param and p not in ('name', 'use_shadow_dom')-             and type(Reactive.param[p]) is type(cls.param[p]))

runtime

huggingface/transformers · #49429

Files changed →View PR ↗

Expert-parallel implementations for `ep_dispatch_experts`: all-reduce at inference, all-to-all in trainingPython · 233 + / 128 −

Introduces 20 new declarations in src/transformers/distributed/expert_parallel.py.

Adds new runtime rather than adjusting what was there. Tests changed with it, with code of their own.

src/transformers/distributed/expert_parallel.py ↗ · 7 files

@@ -247,109 +300,134 @@ def _dispatch_tokens(         expert_ids = top_k_index.reshape(-1)         order = torch.argsort(expert_ids)         send_tokens = hidden_states[order // num_top_k]-        send_counts = torch.zeros(num_local_experts * ep_size, dtype=torch.long, device=hidden_states.device)-        send_counts = send_counts.scatter_add_(0, expert_ids, torch.ones_like(expert_ids)).view(-            ep_size, num_local_experts-        )+        send_counts = torch.zeros(self.num_local_experts * ep_size, dtype=torch.long, device=hidden_states.device)+        send_counts = send_counts.scatter_add_(0, expert_ids, torch.ones_like(expert_ids))+        send_counts = send_counts.view(ep_size, self.num_local_experts)         recv_counts = torch.empty_like(send_counts)-        torch.distributed.all_to_all_single(recv_counts, send_counts, group=ep_group)+        all_to_all_single(recv_counts, send_counts, group=ep_group)         send_sizes, recv_sizes = torch.stack([send_counts.sum(dim=1), recv_counts.sum(dim=1)]).tolist()         recv_tokens = all_to_all_single_autograd(send_tokens, recv_sizes, send_sizes, ep_group)-        recv_expert_ids = torch.arange(num_local_experts, device=hidden_states.device).repeat(ep_size)+        # hand the experts the received rows, not the all-to-all's pending result (whose pointer is null until+        # waited on): https://github.com/huggingface/transformers/pull/49421+        recv_tokens = _WaitTensor.apply(recv_tokens)+        recv_expert_ids = torch.arange(self.num_local_experts, device=hidden_states.device).repeat(ep_size)         recv_expert_ids = recv_expert_ids.repeat_interleave(recv_counts.reshape(-1), output_size=sum(recv_sizes))-        return recv_tokens, recv_expert_ids, order, send_sizes, recv_sizes--    def _run_local_experts(-        self,-        experts_forward: Callable,-        tokens: torch.Tensor,-        expert_ids: torch.Tensor,-    ) -> torch.Tensor:-        """Run local experts with top-1 routing and unit weights; apply routing weights after combine."""-        num_tokens = tokens.shape[0]-        if num_tokens == 0:-            # Keep the empty tokens connected to backward so the reverse all-to-all and FSDP reduction still run.

Read today’s edition →