helloadhavan/github_issues huggingface dataset:
Repository: facebook/react
Pull request: [compiler] Off-by-default validation against setState directly in passive effect

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):
* __->__ #30685

Per discussion today, adds validation against calling setState "during" passive effects. Basically, it's fine to _schedule_ setState to be called (via a timeout, listener, etc) but generally not recommended to call setState during the effect since that will trigger a cascading render.

This validation is off by default, i'm putting this up for discussion and to experiment with it internally.

Rationale: https://react.dev/learn/you-might-not-need-an-effect

Changed files:
filename: compiler/packages/babel-plugin-react-compiler/src/Validation/ValidateNoSetStateInPassiveEffects.ts
patch: @@ -14,7 +14,6 @@ import {
   Place,
 } from '../HIR';
 import {eachInstructionValueOperand} from '../HIR/visitors';
-import {Err, Ok, Result} from '../Utils/Result';
 
 /**
  * Validates against calling setState in the body of a *passive* effect (useEffect),
@@ -139,8 +138,10 @@ function getSetStateCall(
             isSetStateType(callee.identifier) ||
             setStateFunctions.has(callee.identifier.id)
           ) {
-            // TODO: once we support multiple locations per error, we should link to the
-            // original Place in the case that setStateFunction.has(callee)
+            /*
+             * TODO: once we support multiple locations per error, we should link to the
+             * original Place in the case that setStateFunction.has(callee)
+             */
             return callee;
           }
         }
Repository: huggingface/transformers
Pull request: [SAM] Fix typing hints 

# What does this PR do?

As per title


Changed files:
filename: src/transformers/models/sam/processing_sam.py
patch: @@ -30,13 +30,15 @@
 if is_torch_available():
     import torch
 
+NestedList = list[Union[Optional[float | int], "NestedList"]]
+
 
 class SamImagesKwargs(ImagesKwargs, total=False):
     segmentation_maps: Optional[ImageInput]
-    input_points: Optional[list[list[float]]]
-    input_labels: Optional[list[list[int]]]
-    input_boxes: Optional[list[list[list[float]]]]
-    point_pad_value: int
+    input_points: Optional[NestedList]
+    input_labels: Optional[NestedList]
+    input_boxes: Optional[NestedList]
+    point_pad_value: Optional[int]
     mask_size: dict[str, int]
     mask_pad_size: dict[str, int]
 

filename: src/transformers/models/sam_hq/processing_samhq.py
patch: @@ -30,12 +30,14 @@
 if is_torch_available():
     import torch
 
+NestedList = list[Union[Optional[float | int], "NestedList"]]
+
 
 class SamHQImagesKwargs(ImagesKwargs, total=False):
     segmentation_maps: Optional[ImageInput]
-    input_points: Optional[list[list[float]]]
-    input_labels: Optional[list[list[int]]]
-    input_boxes: Optional[list[list[list[float]]]]
+    input_points: Optional[NestedList]
+    input_labels: Optional[NestedList]
+    input_boxes: Optional[NestedList]
     point_pad_value: Optional[int]
     mask_size: dict[str, int]
     mask_pad_size: dict[str, int]
Repository: facebook/react
Pull request: [Fresh] Always reset useMemoCache on Fast Refresh

Stacked on https://github.com/facebook/react/pull/30662.

Alternative to https://github.com/facebook/react/pull/30663 and https://github.com/facebook/react/pull/30677.

During a Fast Refresh, we always want to evict the memo cache, same as we do with normal `useMemo`. The mechanism used by `useMemo` and other Hooks is this module-level variable:

https://github.com/facebook/react/blob/fca5d655d78917400a2722287351c20938166669/packages/react-reconciler/src/ReactFiberHooks.js#L304-L307

which has DEV-only behavior as if the dependencies are always different:

https://github.com/facebook/react/blob/fca5d655d78917400a2722287351c20938166669/packages/react-reconciler/src/ReactFiberHooks.js#L451-L460

The `useMemoCache` Hook doesn't use a dependency array but conceptually I think we want the same behavior.

## Test Plan

The test passes.

Changed files:
filename: packages/react-reconciler/src/ReactFiberHooks.js
patch: @@ -1226,7 +1226,7 @@ function useMemoCache(size: number): Array<any> {
   updateQueue.memoCache = memoCache;
 
   let data = memoCache.data[memoCache.index];
-  if (data === undefined) {
+  if (data === undefined || (__DEV__ && ignorePreviousDependencies)) {
     data = memoCache.data[memoCache.index] = new Array(size);
     for (let i = 0; i < size; i++) {
       data[i] = REACT_MEMO_CACHE_SENTINEL;

filename: packages/react-refresh/src/__tests__/ReactFreshIntegration-test.js
patch: @@ -1637,8 +1637,7 @@ describe('ReactFreshIntegration', () => {
       }
     });
 
-    // eslint-disable-next-line jest/no-disabled-tests
-    it.skip('resets useMemoCache cache slots', async () => {
+    it('resets useMemoCache cache slots', async () => {
       if (__DEV__) {
         await render(`
           const useMemoCache = require('react/compiler-runtime').c;
Repository: facebook/react
Pull request: [DevTools] Hide props section if it is null

We use null as a marker that we don't know what the props are as opposed to knowing that they're empty.

Changed files:
filename: packages/react-devtools-shared/src/devtools/views/Components/InspectedElementPropsTree.js
patch: @@ -54,11 +54,14 @@ export default function InspectedElementPropsTree({
     type === ElementTypeClass || canEditFunctionPropsRenamePaths;
 
   const entries = props != null ? Object.entries(props) : null;
-  if (entries !== null) {
-    entries.sort(alphaSortEntries);
+  if (entries === null) {
+    // Skip the section for null props.
+    return null;
   }
 
-  const isEmpty = entries === null || entries.length === 0;
+  entries.sort(alphaSortEntries);
+
+  const isEmpty = entries.length === 0;
 
   const handleCopy = () => copy(serializeDataForCopy(((props: any): Object)));
Repository: ollama/ollama
Pull request: Bump llama.cpp to b2737


Changed files:
filename: llm/llama.cpp
patch: @@ -1 +1 @@
-Subproject commit 7593639ce335e8d7f89aa9a54d616951f273af60
+Subproject commit 46e12c4692a37bdd31a0432fc5153d7d22bc7f72

filename: llm/patches/02-clip-log.diff
patch: @@ -0,0 +1,12 @@
+diff --git a/examples/llava/clip.cpp b/examples/llava/clip.cpp
+index e431c7f7..f077e688 100644
+--- a/examples/llava/clip.cpp
++++ b/examples/llava/clip.cpp
+@@ -3,6 +3,7 @@
+ // I'll gradually clean and extend it
+ // Note: Even when using identical normalized image inputs (see normalize_image_u8_to_f32()) we have a significant difference in resulting embeddings compared to pytorch
+ #include "clip.h"
++#include "common.h"
+ #include "log.h"
+ #include "ggml.h"
+ #include "ggml-alloc.h"
Repository: ollama/ollama
Pull request: Fix exe name for zip packaging on windows

The zip file encodes the OS and architecture, so keep the short exe name

Changed files:
filename: scripts/build_windows.ps1
patch: @@ -82,7 +82,7 @@ function buildOllama() {
         if ($LASTEXITCODE -ne 0) { exit($LASTEXITCODE)}
     }
     New-Item -ItemType Directory -Path .\dist\windows-amd64\ -Force
-    cp .\ollama.exe .\dist\windows-amd64\ollama-windows-amd64.exe
+    cp .\ollama.exe .\dist\windows-amd64\
 }
 
 function buildApp() {
Repository: vercel/next.js
Pull request: Guard `createDebugChannel` import by feature flag

We already do that for the initial load in `app-index.tsx` (via #83699), and should also do it for RSC requests.

Changed files:
filename: packages/next/src/client/components/router-reducer/fetch-server-response.ts
patch: @@ -41,7 +41,10 @@ let createDebugChannel:
   | typeof import('../../dev/debug-channel').createDebugChannel
   | undefined
 
-if (process.env.NODE_ENV !== 'production') {
+if (
+  process.env.NODE_ENV !== 'production' &&
+  process.env.__NEXT_REACT_DEBUG_CHANNEL
+) {
   createDebugChannel = (
     require('../../dev/debug-channel') as typeof import('../../dev/debug-channel')
   ).createDebugChannel

filename: packages/next/src/client/components/router-reducer/reducers/server-action-reducer.ts
patch: @@ -65,7 +65,10 @@ let createDebugChannel:
   | typeof import('../../../dev/debug-channel').createDebugChannel
   | undefined
 
-if (process.env.NODE_ENV !== 'production') {
+if (
+  process.env.NODE_ENV !== 'production' &&
+  process.env.__NEXT_REACT_DEBUG_CHANNEL
+) {
   createDebugChannel = (
     require('../../../dev/debug-channel') as typeof import('../../../dev/debug-channel')
   ).createDebugChannel
Repository: electron/electron
Pull request: build: update yarn to 1.22.22

Let's update to latest 🥳 

Notes: none

Changed files:
filename: DEPS
patch: @@ -31,7 +31,7 @@ vars = {
   'sysroots_json_path': 'electron/script/sysroots.json',
 
   # KEEP IN SYNC WITH utils.js FILE
-  'yarn_version': '1.15.2',
+  'yarn_version': '1.22.22',
 
   # To be able to build clean Chromium from sources.
   'apply_patches': True,
Repository: ggml-org/llama.cpp
Pull request: llama-fit-params: QoL impr. for prints/errors

In order to improve usability of `llama-fit-params`, add a slight delay to avoid stdout and stderr being printed out-of-order and add double quotes around the tensor buft overrides so that they can simply be copypasted.

Changed files:
filename: tools/fit-params/fit-params.cpp
patch: @@ -4,7 +4,11 @@
 #include "common.h"
 #include "log.h"
 
-#include <iostream>
+#include <chrono>
+#include <cinttypes>
+#include <thread>
+
+using namespace std::chrono_literals;
 
 #if defined(_MSC_VER)
 #pragma warning(disable: 4244 4267) // possible loss of data
@@ -22,13 +26,17 @@ int main(int argc, char ** argv) {
     llama_numa_init(params.numa);
     auto mparams = common_model_params_to_llama(params);
     auto cparams = common_context_params_to_llama(params);
-    llama_params_fit(params.model.path.c_str(), &mparams, &cparams,
+    const bool success = llama_params_fit(params.model.path.c_str(), &mparams, &cparams,
         params.tensor_split, params.tensor_buft_overrides.data(), params.fit_params_target, params.fit_params_min_ctx,
         params.verbosity >= 4 ? GGML_LOG_LEVEL_DEBUG : GGML_LOG_LEVEL_ERROR);
+    if (!success) {
+        LOG_ERR("%s: failed to fit CLI arguments to free memory, exiting...\n", __func__);
+        exit(1);
+    }
 
-    LOG_INF("Printing fitted CLI arguments to stdout...\n");
-    std::cout << "-c "    << cparams.n_ctx;
-    std::cout << " -ngl " << mparams.n_gpu_layers;
+    LOG_INF("%s: printing fitted CLI arguments to stdout...\n", __func__);
+    std::this_thread::sleep_for(10ms); // to avoid a race between stderr and stdout
+    printf("-c %" PRIu32 " -ngl %" PRIu32, cparams.n_ctx, mparams.n_gpu_layers);
 
     size_t nd = llama_max_devices();
     while (nd > 1 && mparams.tensor_split[nd - 1] == 0.0f) {
@@ -37,26 +45,22 @@ int main(int argc, char ** argv) {
     if (nd > 1) {
         for (size_t id = 0; id < nd; id++) {
             if (id == 0) {
-                std::cout << " -ts ";
+                printf(" -ts ");
             }
-            if (id > 0) {
-                std::cout << ",";
-            }
-            std::cout << mparams.tensor_split[id];
+            printf("%s%" PRIu32, id > 0 ? "," : "", uint32_t(mparams.tensor_split[id]));
         }
     }
 
     const size_t ntbo = llama_max_tensor_buft_overrides();
+    bool any_tbo = false;
     for (size_t itbo = 0; itbo < ntbo && mparams.tensor_buft_overrides[itbo].pattern != nullptr; itbo++) {
         if (itbo == 0) {
-            std::cout << " -ot ";
-        }
-        if (itbo > 0) {
-            std::cout << ",";
+            printf(" -ot \"");
         }
-        std::cout << mparams.tensor_buft_overrides[itbo].pattern << "=" << ggml_backend_buft_name(mparams.tensor_buft_overrides[itbo].buft);
+        printf("%s%s=%s", itbo > 0 ? "," : "", mparams.tensor_buft_overrides[itbo].pattern, ggml_backend_buft_name(mparams.tensor_buft_overrides[itbo].buft));
+        any_tbo = true;
     }
-    std::cout << "\n";
+    printf("%s\n", any_tbo ? "\"" : "");
 
     return 0;
 }
Repository: facebook/react
Pull request: Enable `enableDeferRootSchedulingToMicrotask` and `enableInfiniteRenderLoopDetection` for React Native (Meta)

## Summary

Enables the `enableDeferRootSchedulingToMicrotask` and `enableInfiniteRenderLoopDetection` feature flags for React Native (Meta).

## How did you test this change?

```
$ yarn test
$ yarn flow fabric
```

Changed files:
filename: packages/shared/forks/ReactFeatureFlags.native-fb-dynamic.js
patch: @@ -21,8 +21,6 @@ export const alwaysThrottleRetries = __VARIANT__;
 export const consoleManagedByDevToolsDuringStrictMode = __VARIANT__;
 export const disableDefaultPropsExceptForClasses = __VARIANT__;
 export const enableAddPropertiesFastPath = __VARIANT__;
-export const enableDeferRootSchedulingToMicrotask = __VARIANT__;
 export const enableFastJSX = __VARIANT__;
-export const enableInfiniteRenderLoopDetection = __VARIANT__;
 export const enableShallowPropDiffing = __VARIANT__;
 export const passChildrenWhenCloningPersistedNodes = __VARIANT__;

filename: packages/shared/forks/ReactFeatureFlags.native-fb.js
patch: @@ -23,9 +23,7 @@ export const {
   consoleManagedByDevToolsDuringStrictMode,
   disableDefaultPropsExceptForClasses,
   enableAddPropertiesFastPath,
-  enableDeferRootSchedulingToMicrotask,
   enableFastJSX,
-  enableInfiniteRenderLoopDetection,
   enableShallowPropDiffing,
   passChildrenWhenCloningPersistedNodes,
 } = dynamicFlags;
@@ -51,11 +49,13 @@ export const enableComponentStackLocations = true;
 export const enableCPUSuspense = true;
 export const enableCreateEventHandleAPI = false;
 export const enableDebugTracing = false;
+export const enableDeferRootSchedulingToMicrotask = true;
 export const enableDO_NOT_USE_disableStrictPassiveEffect = false;
 export const enableFilterEmptyStringAttributesDOM = true;
 export const enableFizzExternalRuntime = true;
 export const enableFlightReadableStream = true;
 export const enableGetInspectorDataForInstanceInProduction = true;
+export const enableInfiniteRenderLoopDetection = true;
 export const enableLazyContextPropagation = false;
 export const enableLegacyCache = false;
 export const enableLegacyFBSupport = false;

filename: packages/shared/forks/ReactFeatureFlags.test-renderer.native-fb.js
patch: @@ -34,14 +34,14 @@ export const enableComponentStackLocations = true;
 export const enableCPUSuspense = true;
 export const enableCreateEventHandleAPI = false;
 export const enableDebugTracing = false;
-export const enableDeferRootSchedulingToMicrotask = false;
+export const enableDeferRootSchedulingToMicrotask = true;
 export const enableDO_NOT_USE_disableStrictPassiveEffect = false;
 export const enableFastJSX = true;
 export const enableFilterEmptyStringAttributesDOM = true;
 export const enableFizzExternalRuntime = true;
 export const enableFlightReadableStream = true;
 export const enableGetInspectorDataForInstanceInProduction = false;
-export const enableInfiniteRenderLoopDetection = false;
+export const enableInfiniteRenderLoopDetection = true;
 export const enableLazyContextPropagation = false;
 export const enableLegacyCache = false;
 export const enableLegacyFBSupport = false;
Repository: ollama/ollama
Pull request: Fix release CI

download-artifact path was being used incorrectly.  It is where to extract the zip not the files in the zip to extract.  Default is workspace dir which is what we want, so omit it

Changed files:
filename: .github/workflows/release.yaml
patch: @@ -311,29 +311,18 @@ jobs:
       - uses: actions/download-artifact@v4
         with:
           name: generate-windows-cpu
-          path: |
-            llm/build
-            dist/windows-amd64
       - uses: actions/download-artifact@v4
         with:
           name: generate-windows-cuda
-          path: |
-            llm/build
-            dist/windows-amd64
       - uses: actions/download-artifact@v4
         with:
           name: windows-cuda-deps
-          path: dist/deps
       - uses: actions/download-artifact@v4
         with:
           name: windows-rocm-deps
-          path: dist/deps
       - uses: actions/download-artifact@v4
         with:
           name: generate-windows-rocm
-          path: |
-            llm/build
-            dist/windows-amd64
       - run: dir llm/build
       - run: |
           $gopath=(get-command go).source | split-path -parent
Repository: electron/electron
Pull request: ci: fix audit workflow alerting on stale results

#### Description of Change

<!--
Thank you for your Pull Request. Please provide a description above and review
the requirements below.

Contributors guide: https://github.com/electron/electron/blob/main/CONTRIBUTING.md
-->

Fixes #47547 

Only send the Slack message if there's a new failure, not a stale one.

#### Checklist
<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

- [x] PR description included and stakeholders cc'd

#### Release Notes

Notes: none <!-- Please add a one-line description for app developers to read in the release notes, or 'none' if no notes relevant to app developers. Examples and help on special cases: https://github.com/electron/clerk/blob/main/README.md#examples -->


Changed files:
filename: .github/workflows/audit-branch-ci.yml
patch: @@ -101,7 +101,6 @@ jobs:
             }
 
             if (runsWithErrors.length > 0) {
-              core.setOutput('errorsFound', true);
               core.summary.addHeading('⚠️ Runs with Errors');
               core.summary.addTable([
                 [
@@ -128,6 +127,7 @@ jobs:
 
               // Set this as failed so it's easy to scan runs to find failures
               if (runsWithErrors.find((run) => !run.isStale)) {
+                core.setOutput('errorsFound', true);
                 process.exitCode = 1;
               }
             } else {
Repository: ggml-org/llama.cpp
Pull request: llama: Include algorithm header needed for C++23

llama-hparams.cpp currently depends on the `<algorithm>` header being indirectly included by another std header. When compiling with -std=c++23, clang defines `_LIBCPP_REMOVE_TRANSITIVE_INCLUDES` [1] and libc++ std headers will include fewer other std headers indirectly. So include `<algorithm>` where it's needed.

[1] https://libcxx.llvm.org/DesignDocs/HeaderRemovalPolicy.html

I see this error when building llama.cpp as part of Firefox with -std=c++23:

```
llama.cpp/src/llama-hparams.cpp:99:20: error: no member named 'max' in namespace 'std'
99 | val = std::max(val, n_embd_k_gqa(il));
| ~~~~~^
llama.cpp/src/llama-hparams.cpp:108:20: error: no member named 'max' in namespace 'std'
108 | val = std::max(val, n_embd_v_gqa(il));
| ~~~~~^
```

Changed files:
filename: src/llama-hparams.cpp
patch: @@ -2,6 +2,7 @@
 
 #include "ggml.h"
 
+#include <algorithm>
 #include <cassert>
 
 void llama_hparams::set_swa_pattern(uint32_t n_pattern, bool dense_first) {
Repository: huggingface/transformers
Pull request: Update GLM-4.6 doc

Updated the simple description and technical blog address for GLM-4.6.

Changed files:
filename: docs/source/en/model_doc/glm4_moe.md
patch: @@ -19,6 +19,27 @@ rendered properly in your Markdown viewer.
 
 ## Overview
 
+Both **GLM-4.6** and **GLM-4.5** language model use this class. The implementation in transformers does not include an MTP layer.
+
+### GLM-4.6
+
+Compared with GLM-4.5, **GLM-4.6**  brings several key improvements:
+
+* **Longer context window:** The context window has been expanded from 128K to 200K tokens, enabling the model to handle more complex agentic tasks.
+* **Superior coding performance:** The model achieves higher scores on code benchmarks and demonstrates better real-world performance in applications such as Claude Code、Cline、Roo Code and Kilo Code, including improvements in generating visually polished front-end pages.
+* **Advanced reasoning:** GLM-4.6 shows a clear improvement in reasoning performance and supports tool use during inference, leading to stronger overall capability.
+* **More capable agents:** GLM-4.6 exhibits stronger performance in tool using and search-based agents, and integrates more effectively within agent frameworks.
+* **Refined writing:** Better aligns with human preferences in style and readability, and performs more naturally in role-playing scenarios.
+
+We evaluated GLM-4.6 across eight public benchmarks covering agents, reasoning, and coding. Results show clear gains over GLM-4.5, with GLM-4.6 also holding competitive advantages over leading domestic and international models such as **DeepSeek-V3.1-Terminus** and **Claude Sonnet 4**.
+
+![bench](https://raw.githubusercontent.com/zai-org/GLM-4.5/refs/heads/main/resources/bench_glm46.png)
+
+For more eval results, show cases, and technical details, please visit our [technical blog](https://z.ai/blog/glm-4.6).
+
+
+### GLM-4.5
+
 The [**GLM-4.5**](https://huggingface.co/papers/2508.06471) series models are foundation models designed for intelligent agents, MoE variants are documented here as Glm4Moe.
 
 GLM-4.5 has **355** billion total parameters with **32** billion active parameters, while GLM-4.5-Air adopts a more compact design with **106** billion total parameters and **12** billion active parameters. GLM-4.5 models unify reasoning, coding, and intelligent agent capabilities to meet the complex demands of intelligent agent applications.
Repository: electron/electron
Pull request: build: update yarn to 1.22.22

Backport of #47635

See that PR for details.


Notes: none

Changed files:
filename: DEPS
patch: @@ -31,7 +31,7 @@ vars = {
   'sysroots_json_path': 'electron/script/sysroots.json',
 
   # KEEP IN SYNC WITH utils.js FILE
-  'yarn_version': '1.15.2',
+  'yarn_version': '1.22.22',
 
   # To be able to build clean Chromium from sources.
   'apply_patches': True,
Repository: ollama/ollama
Pull request: precalculate output tensor memory for metal and mmap

on metal with mmap, the output tensors are always allocated even if the offloaded layers < total layers + 1. other backends are unaffected

Changed files:
filename: llm/memory.go
patch: @@ -5,7 +5,6 @@ import (
 	"log/slog"
 	"os"
 	"strconv"
-	"strings"
 
 	"github.com/ollama/ollama/api"
 	"github.com/ollama/ollama/format"
@@ -100,8 +99,22 @@ func EstimateGPULayers(gpus []gpu.GpuInfo, ggml *GGML, projectors []string, opts
 		return 0, 0
 	}
 
-	var layerCount int
 	layers := ggml.Tensors().Layers()
+
+	var memoryLayerOutput uint64
+	for k, v := range layers {
+		if k == "output" || k == "output_norm" {
+			memoryLayerOutput += v.size()
+		}
+	}
+
+	if gpus[0].Library == "metal" && opts.UseMMap {
+		// memory is preallocated for output tensors
+		memoryRequiredTotal += memoryLayerOutput
+		memoryRequiredPartial += memoryLayerOutput
+	}
+
+	var layerCount int
 	for i := 0; i < int(ggml.KV().BlockCount()); i++ {
 		memoryLayer := layers[fmt.Sprintf("blk.%d", i)].size()
 
@@ -115,15 +128,11 @@ func EstimateGPULayers(gpus []gpu.GpuInfo, ggml *GGML, projectors []string, opts
 		}
 	}
 
-	var memoryLayerOutput uint64
-	for k, v := range layers {
-		if !strings.HasPrefix(k, "blk.") {
-			memoryLayerOutput += v.size()
-		}
+	if gpus[0].Library != "metal" || !opts.UseMMap {
+		// memory was not preallocated for output tensors
+		memoryRequiredTotal += memoryLayerOutput
 	}
 
-	memoryRequiredTotal += memoryLayerOutput
-
 	if memoryAvailable > memoryRequiredTotal {
 		layerCount = int(ggml.KV().BlockCount()) + 1
 		memoryRequiredPartial = memoryRequiredTotal