helloadhavan/github_issues huggingface dataset:
Repository: electron/electron
Pull request: fix: software compositing infinite loop

Backport of #44318

See that PR for details.


Notes: Fix race condition in which WebContents appears as white screen on VDI machines without hardware acceleration capabilities.

Changed files:
filename: patches/chromium/.patches
patch: @@ -130,3 +130,4 @@ chore_remove_reference_to_chrome_browser_themes.patch
 feat_enable_customizing_symbol_color_in_framecaptionbutton.patch
 build_expose_webplugininfo_interface_to_electron.patch
 feat_allow_usage_of_sccontentsharingpicker_on_supported_platforms.patch
+fix_software_compositing_infinite_loop.patch

filename: patches/chromium/fix_software_compositing_infinite_loop.patch
patch: @@ -0,0 +1,31 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Samuel Maddock <smaddock@slack-corp.com>
+Date: Fri, 18 Oct 2024 11:11:11 -0400
+Subject: fix: software compositing infinite loop
+
+When GPU compositing is unavailable, LayerTreeView::RequestNewLayerTreeFrameSink
+may run in an infinite loop due to a race condition. Need to allow time to
+process CompositingModeFallbackToSoftware IPC to disable GPU compositing.
+
+https://issues.chromium.org/345275130
+
+diff --git a/third_party/blink/renderer/platform/widget/compositing/layer_tree_view.cc b/third_party/blink/renderer/platform/widget/compositing/layer_tree_view.cc
+index 9497ab591864295231db47fdc526e59935e6aa31..635fa41649db41800f99da2683cc955b2e1e935f 100644
+--- a/third_party/blink/renderer/platform/widget/compositing/layer_tree_view.cc
++++ b/third_party/blink/renderer/platform/widget/compositing/layer_tree_view.cc
+@@ -374,9 +374,13 @@ void LayerTreeView::DidFailToInitializeLayerTreeFrameSink() {
+   // unable to be killed after Chrome is closed.
+   // https://issues.chromium.org/336164423
+   if (!Platform::Current()->IsGpuRemoteDisconnected()) {
+-    layer_tree_host_->GetTaskRunnerProvider()->MainThreadTaskRunner()->PostTask(
++    // CompositingModeFallbackToSoftware IPC will disable GPU compositing in
++    // RenderThread. Post task with delay to give time to receive this IPC and
++    // prevent infinite loop of retries for software renderers.
++    // https://issues.chromium.org/345275130
++    layer_tree_host_->GetTaskRunnerProvider()->MainThreadTaskRunner()->PostDelayedTask(
+         FROM_HERE, base::BindOnce(&LayerTreeView::RequestNewLayerTreeFrameSink,
+-                                  weak_factory_.GetWeakPtr()));
++                                  weak_factory_.GetWeakPtr()), base::Milliseconds(10));
+   }
+ }
+
Repository: huggingface/transformers
Pull request: Add report_repo_id to mi300 workflow


Changed files:
filename: .github/workflows/self-scheduled-amd-mi300-caller.yml
patch: @@ -23,6 +23,7 @@ jobs:
       runner_scale_set: amd-mi300-ci
       docker: huggingface/transformers-pytorch-amd-gpu
       ci_event: Scheduled CI (AMD) - mi300
+      report_repo_id: optimum-amd/transformers_daily_ci
     secrets: inherit
 
   torch-pipeline:
@@ -34,6 +35,7 @@ jobs:
       runner_scale_set: amd-mi300-ci
       docker: huggingface/transformers-pytorch-amd-gpu
       ci_event: Scheduled CI (AMD) - mi300
+      report_repo_id: optimum-amd/transformers_daily_ci
     secrets: inherit
 
   example-ci:
@@ -45,6 +47,7 @@ jobs:
       runner_scale_set: amd-mi300-ci
       docker: huggingface/transformers-pytorch-amd-gpu
       ci_event: Scheduled CI (AMD) - mi300
+      report_repo_id: optimum-amd/transformers_daily_ci
     secrets: inherit
 
   deepspeed-ci:
@@ -56,4 +59,5 @@ jobs:
       runner_scale_set: amd-mi300-ci
       docker: huggingface/transformers-pytorch-deepspeed-amd-gpu
       ci_event: Scheduled CI (AMD) - mi300
+      report_repo_id: optimum-amd/transformers_daily_ci
     secrets: inherit
Repository: ggml-org/llama.cpp
Pull request: Remove redundant include path in CMakeLists.txt

*Make sure to read the [contributing guidelines](https://github.com/ggml-org/llama.cpp/blob/master/CONTRIBUTING.md) before submitting a PR*

The parent directory '..' was removed from the include directories for the ggml-cpu-feats target, to avoid unnecessary include paths.

Changed files:
filename: ggml/src/ggml-cpu/CMakeLists.txt
patch: @@ -5,7 +5,7 @@ function(ggml_add_cpu_backend_features cpu_name arch)
     # build, using set_source_files_properties() to set the arch flags is not possible
     set(GGML_CPU_FEATS_NAME ${cpu_name}-feats)
     add_library(${GGML_CPU_FEATS_NAME} OBJECT ggml-cpu/arch/${arch}/cpu-feats.cpp)
-    target_include_directories(${GGML_CPU_FEATS_NAME} PRIVATE . .. ../include)
+    target_include_directories(${GGML_CPU_FEATS_NAME} PRIVATE . ../include)
     target_compile_definitions(${GGML_CPU_FEATS_NAME} PRIVATE ${ARGN})
     target_compile_definitions(${GGML_CPU_FEATS_NAME} PRIVATE GGML_BACKEND_DL GGML_BACKEND_BUILD GGML_BACKEND_SHARED)
     set_target_properties(${GGML_CPU_FEATS_NAME} PROPERTIES POSITION_INDEPENDENT_CODE ON)
Repository: denoland/deno
Pull request: Revert "fix(runtime): send ws ping frames from inspector server (#263…

…52)"

This reverts commit 194c453a272ca8859042f46f814f2d383738bc90.

Reverting because it made "Sources" panel in DevTools completely broken.

Closes https://github.com/denoland/deno/issues/26512



Changed files:
filename: runtime/inspector_server.rs
patch: @@ -23,7 +23,6 @@ use deno_core::InspectorSessionProxy;
 use deno_core::JsRuntime;
 use fastwebsockets::Frame;
 use fastwebsockets::OpCode;
-use fastwebsockets::Payload;
 use fastwebsockets::WebSocket;
 use hyper::body::Bytes;
 use hyper_util::rt::TokioIo;
@@ -34,7 +33,6 @@ use std::pin::pin;
 use std::process;
 use std::rc::Rc;
 use std::thread;
-use std::time::Duration;
 use tokio::net::TcpListener;
 use tokio::sync::broadcast;
 use uuid::Uuid;
@@ -395,13 +393,8 @@ async fn pump_websocket_messages(
   inbound_tx: UnboundedSender<String>,
   mut outbound_rx: UnboundedReceiver<InspectorMsg>,
 ) {
-  let mut ticker = tokio::time::interval(Duration::from_secs(30));
-
   'pump: loop {
     tokio::select! {
-        _ = ticker.tick() => {
-            let _ = websocket.write_frame(Frame::new(true, OpCode::Ping, None, Payload::Borrowed(&[]))).await;
-        }
         Some(msg) = outbound_rx.next() => {
             let msg = Frame::text(msg.content.into_bytes().into());
             let _ = websocket.write_frame(msg).await;
Repository: facebook/react
Pull request: Enable useMemoCacheHook for ReactNative-fb build


Changed files:
filename: packages/shared/forks/ReactFeatureFlags.native-fb.js
patch: @@ -51,7 +51,7 @@ export const enableSuspenseAvoidThisFallback = false;
 export const enableSuspenseAvoidThisFallbackFizz = false;
 export const enableCPUSuspense = true;
 export const enableUseHook = false;
-export const enableUseMemoCacheHook = false;
+export const enableUseMemoCacheHook = true;
 export const enableUseEventHook = false;
 export const enableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay = true;
 export const enableClientRenderFallbackOnTextMismatch = true;
Repository: vercel/next.js
Pull request: Enable preview builds for forks

GitHub only has an API to find artifacts by head sha. However, on forks, we run on the merge commit (GitHub default). So the endpoint on vercel-packages needs the head sha even though the artifact will be built on a different commit.

The `version` field will be always the correct thing. The mismatching commit for forked PRs is a necessary evil until we either always run CI/CD on head commits or GitHub adds an API to find workflows by merge commit.

docs: https://github.com/vercel/vercel-packages/pull/46

## Test plan

- [x] https://vercel-packages.vercel.app/next/prs/79648/next references dependencies that exist

Changed files:
filename: .github/workflows/build_and_deploy.yml
patch: @@ -532,7 +532,7 @@ jobs:
           path: crates/wasm
 
       - name: Create tarballs
-        run: node scripts/create-preview-tarballs.js "${{ github.sha }}" "${{ runner.temp }}/preview-tarballs"
+        run: node scripts/create-preview-tarballs.js "${{ github.sha }}" "${{ github.workflow_sha }}" "${{ runner.temp }}/preview-tarballs"
 
       - name: Upload tarballs
         uses: actions/upload-artifact@v4

filename: scripts/create-preview-tarballs.js
patch: @@ -6,23 +6,24 @@ const path = require('node:path')
 
 async function main() {
   const [
-    commitSha,
+    githubSha,
+    githubWorkflowSha,
     tarballDirectory = path.join(os.tmpdir(), 'vercel-nextjs-preview-tarballs'),
   ] = process.argv.slice(2)
   const repoRoot = path.resolve(__dirname, '..')
 
   await fs.mkdir(tarballDirectory, { recursive: true })
 
   const [{ stdout: shortSha }, { stdout: dateString }] = await Promise.all([
-    execa('git', ['rev-parse', '--short', commitSha]),
+    execa('git', ['rev-parse', '--short', githubSha]),
     // Source: https://github.com/facebook/react/blob/767f52237cf7892ad07726f21e3e8bacfc8af839/scripts/release/utils.js#L114
     execa(`git`, [
       'show',
       '-s',
       '--no-show-signature',
       '--format=%cd',
       '--date=format:%Y%m%d',
-      commitSha,
+      githubSha,
     ]),
   ])
 
@@ -97,16 +98,18 @@ async function main() {
   ])
   const packages = JSON.parse(lernaListJson.stdout)
   const packagesByVersion = new Map()
+  // vercel-packages finds GH artifacts via the head SHA because that's the only
+  // API GitHub offers.
   for (const packageInfo of packages) {
     packagesByVersion.set(
       packageInfo.name,
-      `https://vercel-packages.vercel.app/next/commits/${commitSha}/${packageInfo.name}`
+      `https://vercel-packages.vercel.app/next/commits/${githubWorkflowSha}/${packageInfo.name}`
     )
   }
   for (const nextSwcPackageName of nextSwcPackageNames) {
     packagesByVersion.set(
       nextSwcPackageName,
-      `https://vercel-packages.vercel.app/next/commits/${commitSha}/${nextSwcPackageName}`
+      `https://vercel-packages.vercel.app/next/commits/${githubWorkflowSha}/${nextSwcPackageName}`
     )
   }
Repository: electron/electron
Pull request: fix: software compositing infinite loop

Backport of #44318

See that PR for details.


Notes: Fix race condition in which WebContents appears as white screen on VDI machines without hardware acceleration capabilities.

Changed files:
filename: patches/chromium/.patches
patch: @@ -132,3 +132,4 @@ build_expose_webplugininfo_interface_to_electron.patch
 osr_shared_texture_remove_keyed_mutex_on_win_dxgi.patch
 feat_allow_usage_of_sccontentsharingpicker_on_supported_platforms.patch
 chore_partial_revert_of.patch
+fix_software_compositing_infinite_loop.patch

filename: patches/chromium/fix_software_compositing_infinite_loop.patch
patch: @@ -0,0 +1,31 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Samuel Maddock <smaddock@slack-corp.com>
+Date: Fri, 18 Oct 2024 11:11:11 -0400
+Subject: fix: software compositing infinite loop
+
+When GPU compositing is unavailable, LayerTreeView::RequestNewLayerTreeFrameSink
+may run in an infinite loop due to a race condition. Need to allow time to
+process CompositingModeFallbackToSoftware IPC to disable GPU compositing.
+
+https://issues.chromium.org/345275130
+
+diff --git a/third_party/blink/renderer/platform/widget/compositing/layer_tree_view.cc b/third_party/blink/renderer/platform/widget/compositing/layer_tree_view.cc
+index 9497ab591864295231db47fdc526e59935e6aa31..635fa41649db41800f99da2683cc955b2e1e935f 100644
+--- a/third_party/blink/renderer/platform/widget/compositing/layer_tree_view.cc
++++ b/third_party/blink/renderer/platform/widget/compositing/layer_tree_view.cc
+@@ -374,9 +374,13 @@ void LayerTreeView::DidFailToInitializeLayerTreeFrameSink() {
+   // unable to be killed after Chrome is closed.
+   // https://issues.chromium.org/336164423
+   if (!Platform::Current()->IsGpuRemoteDisconnected()) {
+-    layer_tree_host_->GetTaskRunnerProvider()->MainThreadTaskRunner()->PostTask(
++    // CompositingModeFallbackToSoftware IPC will disable GPU compositing in
++    // RenderThread. Post task with delay to give time to receive this IPC and
++    // prevent infinite loop of retries for software renderers.
++    // https://issues.chromium.org/345275130
++    layer_tree_host_->GetTaskRunnerProvider()->MainThreadTaskRunner()->PostDelayedTask(
+         FROM_HERE, base::BindOnce(&LayerTreeView::RequestNewLayerTreeFrameSink,
+-                                  weak_factory_.GetWeakPtr()));
++                                  weak_factory_.GetWeakPtr()), base::Milliseconds(10));
+   }
+ }
+
Repository: denoland/deno
Pull request: fix(config): schemas for lint rule and tag autocompletion

Closes #26314. Follow up to https://github.com/denoland/deno_lint/pull/1335. It will work as soon as this lands since the extension links to main: https://github.com/denoland/vscode_deno/blob/3.42.0/package.json#L596.

Changed files:
filename: cli/schemas/config-file.v1.json
patch: @@ -291,7 +291,7 @@
               "type": "array",
               "description": "List of tag names that will be run. Empty list disables all tags and will only use rules from `include`.",
               "items": {
-                "type": "string"
+                "$ref": "https://raw.githubusercontent.com/denoland/deno_lint/main/schemas/tags.v1.json"
               },
               "minItems": 0,
               "uniqueItems": true
@@ -300,7 +300,7 @@
               "type": "array",
               "description": "List of rule names that will be excluded from configured tag sets. If the same rule is in `include` it will be run.",
               "items": {
-                "type": "string"
+                "$ref": "https://raw.githubusercontent.com/denoland/deno_lint/main/schemas/rules.v1.json"
               },
               "minItems": 0,
               "uniqueItems": true
@@ -309,7 +309,7 @@
               "type": "array",
               "description": "List of rule names that will be run. Even if the same rule is in `exclude` it will be run.",
               "items": {
-                "type": "string"
+                "$ref": "https://raw.githubusercontent.com/denoland/deno_lint/main/schemas/rules.v1.json"
               },
               "minItems": 0,
               "uniqueItems": true
Repository: ggml-org/llama.cpp
Pull request: llama : return mistral-v7-tekken as default template only

Do not return `mistral-v7-tekken` when `common_chat_templates_init` asks for `tool_use` template.

Fixes #14383
Adresses https://github.com/ggml-org/llama.cpp/pull/14148#discussion_r2144626716

Changed files:
filename: src/llama-model.cpp
patch: @@ -14377,7 +14377,7 @@ const char * llama_model_chat_template(const llama_model * model, const char * n
         // do not extend this list unless absolutely necessary
         // Mistral-Small-2503 does not have built-in chat template
         llama_vocab_pre_type pre_type = model->vocab.get_pre_type();
-        if (pre_type == LLAMA_VOCAB_PRE_TYPE_TEKKEN && model->layers.size() == 40) {
+        if (!name && pre_type == LLAMA_VOCAB_PRE_TYPE_TEKKEN && model->layers.size() == 40) {
             return "mistral-v7-tekken";
         }
Repository: facebook/react
Pull request: Fix useSyncExternalStore dropped update when state is dispatched in render phase

## Summary

Fix #25565

In `updateSyncExternalStore`, If state is dispatched during render phase, then work in progress `hook` will hold already updated memoized state in the second pass, defeating previous value comparison. As a consequence, the effect updating internal store value with next value will not be scheduled.

This breaks re-rendering when store is set back to it's mounting value.

Using `currentHook` instead (when defined) fixes that issue.

## How did you test this change?

See included test

Changed files:
filename: packages/react-reconciler/src/ReactFiberHooks.new.js
patch: @@ -1615,7 +1615,7 @@ function updateSyncExternalStore<T>(
       }
     }
   }
-  const prevSnapshot = hook.memoizedState;
+  const prevSnapshot = (currentHook || hook).memoizedState;
   const snapshotChanged = !is(prevSnapshot, nextSnapshot);
   if (snapshotChanged) {
     hook.memoizedState = nextSnapshot;

filename: packages/react-reconciler/src/ReactFiberHooks.old.js
patch: @@ -1615,7 +1615,7 @@ function updateSyncExternalStore<T>(
       }
     }
   }
-  const prevSnapshot = hook.memoizedState;
+  const prevSnapshot = (currentHook || hook).memoizedState;
   const snapshotChanged = !is(prevSnapshot, nextSnapshot);
   if (snapshotChanged) {
     hook.memoizedState = nextSnapshot;

filename: packages/react-reconciler/src/__tests__/useSyncExternalStore-test.js
patch: @@ -18,6 +18,7 @@ let useLayoutEffect;
 let forwardRef;
 let useImperativeHandle;
 let useRef;
+let useState;
 let startTransition;
 
 // This tests the native useSyncExternalStore implementation, not the shim.
@@ -36,6 +37,7 @@ describe('useSyncExternalStore', () => {
     useImperativeHandle = React.useImperativeHandle;
     forwardRef = React.forwardRef;
     useRef = React.useRef;
+    useState = React.useState;
     useSyncExternalStore = React.useSyncExternalStore;
     startTransition = React.startTransition;
 
@@ -173,4 +175,33 @@ describe('useSyncExternalStore', () => {
       });
     },
   );
+
+  test('next value is correctly cached when state is dispatched in render phase', async () => {
+    const store = createExternalStore('value:initial');
+
+    function App() {
+      const value = useSyncExternalStore(store.subscribe, store.getState);
+      const [sameValue, setSameValue] = useState(value);
+      if (value !== sameValue) setSameValue(value);
+      return <Text text={value} />;
+    }
+
+    const root = ReactNoop.createRoot();
+    act(() => {
+      // Start a render that reads from the store and yields value
+      root.render(<App />);
+    });
+    expect(Scheduler).toHaveYielded(['value:initial']);
+
+    await act(() => {
+      store.set('value:changed');
+    });
+    expect(Scheduler).toHaveYielded(['value:changed']);
+
+    // If cached value was updated, we expect a re-render
+    await act(() => {
+      store.set('value:initial');
+    });
+    expect(Scheduler).toHaveYielded(['value:initial']);
+  });
 });
Repository: huggingface/transformers
Pull request: guard size mismatch check to only quantized models

# What does this PR do?

This PR fixes https://github.com/huggingface/transformers/issues/36960
The issue that we were doing a check that was only supposed to be done on quantized models on all models. 

### To reproduce

```python
from transformers import Mask2FormerConfig, Mask2FormerForUniversalSegmentation

model_config = Mask2FormerConfig(mask_feature_size=512)
model = Mask2FormerForUniversalSegmentation.from_pretrained(
    pretrained_model_name_or_path="facebook/mask2former-swin-tiny-coco-instance",
    config=model_config,
    ignore_mismatched_sizes=True,
)
```

Changed files:
filename: src/transformers/modeling_utils.py
patch: @@ -1577,7 +1577,8 @@ def _find_mismatched_keys(
                 # This skips size mismatches for 4-bit weights. Two 4-bit values share an 8-bit container, causing size differences.
                 # Without matching with module type or parameter type it seems like a practical way to detect valid 4bit weights.
                 if not (
-                    new_state_dict[key].shape[-1] == 1
+                    is_quantized
+                    and new_state_dict[key].shape[-1] == 1
                     and new_state_dict[key].numel() * 2 == model_state_dict[key].numel()
                 ):
                     mismatched_keys.append(key)
Repository: electron/electron
Pull request: fix: software compositing infinite loop

Backport of #44318

See that PR for details.


Notes: Fix race condition in which WebContents appears as white screen on VDI machines without hardware acceleration capabilities.

Changed files:
filename: patches/chromium/.patches
patch: @@ -133,3 +133,4 @@ feat_enable_customizing_symbol_color_in_framecaptionbutton.patch
 fix_potential_draggable_region_crash_when_no_mainframeimpl.patch
 feat_allow_usage_of_sccontentsharingpicker_on_supported_platforms.patch
 feat_allow_-4_as_a_macos_screen_share_id.patch
+fix_software_compositing_infinite_loop.patch

filename: patches/chromium/fix_software_compositing_infinite_loop.patch
patch: @@ -0,0 +1,31 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Samuel Maddock <smaddock@slack-corp.com>
+Date: Fri, 18 Oct 2024 11:11:11 -0400
+Subject: fix: software compositing infinite loop
+
+When GPU compositing is unavailable, LayerTreeView::RequestNewLayerTreeFrameSink
+may run in an infinite loop due to a race condition. Need to allow time to
+process CompositingModeFallbackToSoftware IPC to disable GPU compositing.
+
+https://issues.chromium.org/345275130
+
+diff --git a/third_party/blink/renderer/platform/widget/compositing/layer_tree_view.cc b/third_party/blink/renderer/platform/widget/compositing/layer_tree_view.cc
+index 9497ab591864295231db47fdc526e59935e6aa31..635fa41649db41800f99da2683cc955b2e1e935f 100644
+--- a/third_party/blink/renderer/platform/widget/compositing/layer_tree_view.cc
++++ b/third_party/blink/renderer/platform/widget/compositing/layer_tree_view.cc
+@@ -374,9 +374,13 @@ void LayerTreeView::DidFailToInitializeLayerTreeFrameSink() {
+   // unable to be killed after Chrome is closed.
+   // https://issues.chromium.org/336164423
+   if (!Platform::Current()->IsGpuRemoteDisconnected()) {
+-    layer_tree_host_->GetTaskRunnerProvider()->MainThreadTaskRunner()->PostTask(
++    // CompositingModeFallbackToSoftware IPC will disable GPU compositing in
++    // RenderThread. Post task with delay to give time to receive this IPC and
++    // prevent infinite loop of retries for software renderers.
++    // https://issues.chromium.org/345275130
++    layer_tree_host_->GetTaskRunnerProvider()->MainThreadTaskRunner()->PostDelayedTask(
+         FROM_HERE, base::BindOnce(&LayerTreeView::RequestNewLayerTreeFrameSink,
+-                                  weak_factory_.GetWeakPtr()));
++                                  weak_factory_.GetWeakPtr()), base::Milliseconds(10));
+   }
+ }
+
Repository: vercel/next.js
Pull request: misc: remove leftover `clientInstrumentationHook` type

Remaining of https://github.com/vercel/next.js/pull/77649

Changed files:
filename: packages/next/src/server/config-shared.ts
patch: @@ -683,15 +683,6 @@ export interface ExperimentalConfig {
     buildTimeThresholdMs: number
   }
 
-  /**
-   * Enables the client instrumentation hook.
-   * Loads the instrumentation-client.ts file from the project root
-   * and executes it on the client side before hydration.
-   *
-   * Note: Use with caution as this can negatively impact page loading performance.
-   */
-  clientInstrumentationHook?: boolean
-
   /**
    * Enables using the global-not-found.js file in the app directory
    *
Repository: ggml-org/llama.cpp
Pull request: Fix appearance of the chats list context menu for the browser Safari

A very small fix for WebUI. On the Safari 18.5 the chats list context menu does not showing on click

Changed files:
filename: tools/server/webui/src/components/Sidebar.tsx
patch: @@ -231,7 +231,7 @@ function ConversationItem({
       >
         {conv.name}
       </button>
-      <div className="dropdown dropdown-end h-5">
+      <div tabIndex={0} className="dropdown dropdown-end h-5">
         <BtnWithTooltips
           // on mobile, we always show the ellipsis icon
           // on desktop, we only show it when the user hovers over the conversation item