helloadhavan/github_issues huggingface dataset:
Repository: huggingface/transformers
Pull request: Avoid `utils/check_bad_commit.py` failing due to rate limit (requesting  `api.github.com`)

# What does this PR do?

[39885](https://github.com/huggingface/transformers/pull/39885) introduces ~70 new failed tests, and the `check_bad_commit.py` failed due to rate limit (I believe), see 

https://github.com/huggingface/transformers/actions/runs/16739364088/job/47406733586

This PR stores the results of `api.github.com` requests, and reuse them if a commit is already in the cache.

Changed files:
filename: utils/check_bad_commit.py
patch: @@ -171,6 +171,12 @@ def get_commit_info(commit):
     print(f"start_commit: {args.start_commit}")
     print(f"end_commit: {args.end_commit}")
 
+    # `get_commit_info` uses `requests.get()` to request info. via `api.github.com` without using token.
+    # If there are many new failed tests in a workflow run, this script may fail at some point with `KeyError` at
+    # `pr_number = pr_info_for_commit[0]["number"]` due to the rate limit.
+    # Let's cache the commit info. and reuse them whenever possible.
+    commit_info_cache = {}
+
     if len({args.test is None, args.file is None}) != 2:
         raise ValueError("Exactly one argument `test` or `file` must be specified.")
 
@@ -191,7 +197,14 @@ def get_commit_info(commit):
             for test in failed_tests:
                 commit = find_bad_commit(target_test=test, start_commit=args.start_commit, end_commit=args.end_commit)
                 info = {"test": test, "commit": commit}
-                info.update(get_commit_info(commit))
+
+                if commit in commit_info_cache:
+                    commit_info = commit_info_cache[commit]
+                else:
+                    commit_info = get_commit_info(commit)
+                    commit_info_cache[commit] = commit_info
+
+                info.update(commit_info)
                 failed_tests_with_bad_commits.append(info)
 
             # If no single-gpu test failures, remove the key
Repository: vercel/next.js
Pull request: Ensure setAssetPrefix updates config instance

This ensures we update `nextConfig.assetPrefix` instead of `renderOpts` as we aren't relying on `renderOpts` for these values anymore. 

Closes: https://github.com/vercel/next.js/issues/82150

Changed files:
filename: packages/next/src/server/base-server.ts
patch: @@ -1652,7 +1652,7 @@ export default abstract class Server<
   ): Promise<void>
 
   public setAssetPrefix(prefix?: string): void {
-    this.renderOpts.assetPrefix = prefix ? prefix.replace(/\/$/, '') : ''
+    this.nextConfig.assetPrefix = prefix ? prefix.replace(/\/$/, '') : ''
   }
 
   protected prepared: boolean = false

filename: test/e2e/app-dir/asset-prefix-absolute/asset-prefix-absolute-no-path.test.ts
patch: @@ -0,0 +1,32 @@
+import { nextTestSetup } from 'e2e-utils'
+
+describe('app-dir absolute assetPrefix', () => {
+  const { next } = nextTestSetup({
+    files: __dirname,
+    nextConfig: {
+      assetPrefix: 'https://example.vercel.sh/',
+    },
+  })
+
+  it('bundles should return 200 on served assetPrefix', async () => {
+    const $ = await next.render$('/')
+
+    let bundles = []
+    for (const script of $('script').toArray()) {
+      const { src } = script.attribs
+      if (src?.includes('https://example.vercel.sh/_next/static')) {
+        bundles.push(src)
+      }
+    }
+
+    expect(bundles.length).toBeGreaterThan(0)
+
+    for (const src of bundles) {
+      // Remove hostname to check if pathname is still used for serving the bundles
+      const bundlePathWithoutHost = decodeURI(new URL(src).pathname)
+      const { status } = await next.fetch(bundlePathWithoutHost)
+
+      expect(status).toBe(200)
+    }
+  })
+})

filename: test/e2e/app-dir/asset-prefix-absolute/asset-prefix-absolute.test.ts
patch: @@ -3,6 +3,9 @@ import { nextTestSetup } from 'e2e-utils'
 describe('app-dir absolute assetPrefix', () => {
   const { next } = nextTestSetup({
     files: __dirname,
+    nextConfig: {
+      assetPrefix: 'https://example.vercel.sh/custom-asset-prefix',
+    },
   })
 
   it('bundles should return 200 on served assetPrefix', async () => {

filename: test/e2e/app-dir/asset-prefix-absolute/next.config.js
patch: @@ -1,3 +0,0 @@
-module.exports = {
-  assetPrefix: 'https://example.vercel.sh/custom-asset-prefix',
-}
Repository: facebook/react
Pull request: Fix remaining CommonJS imports after Rollup upgrade

Follow-up to https://github.com/facebook/react/pull/26442.

It looks like we missed a few cases where we default import a CommonJS module, which leads to Rollup adding `.default` access, e.g. `require('webpack/lib/Template').default` in the output.

To fix, add the remaining cases to the list of exceptions. Verified by going through all `externals` in the bundle list, and manually checking the webpack plugin.

Changed files:
filename: scripts/rollup/build.js
patch: @@ -182,12 +182,16 @@ let getRollupInteropValue = id => {
   // Specifying `interop: 'default'` instead will have Rollup use the imported variable as-is,
   // without adding a `.default` to the reference.
   const modulesWithCommonJsExports = [
-    'JSResourceReferenceImpl',
-    'error-stack-parser',
     'art/core/transform',
     'art/modes/current',
     'art/modes/fast-noSideEffects',
     'art/modes/svg',
+    'JSResourceReferenceImpl',
+    'error-stack-parser',
+    'neo-async',
+    'webpack/lib/dependencies/ModuleDependency',
+    'webpack/lib/dependencies/NullDependency',
+    'webpack/lib/Template',
   ];
 
   if (modulesWithCommonJsExports.includes(id)) {
Repository: nodejs/node
Pull request: build: use variable for OpenSSL dep path

Allow customizing the path to Node.js crypto in the GN build

For Electron it'd be e.g. `/third_party/boringssl`.
<!--
Before submitting a pull request, please read:

- the CONTRIBUTING guide at https://github.com/nodejs/node/blob/HEAD/CONTRIBUTING.md
- the commit message formatting guidelines at
  https://github.com/nodejs/node/blob/HEAD/doc/contributing/pull-requests.md#commit-message-guidelines

For code changes:
1. Include tests for any bug fixes or new features.
2. Update documentation if relevant.
3. Ensure that `make -j4 test` (UNIX), or `vcbuild test` (Windows) passes.

If you believe this PR should be highlighted in the Node.js CHANGELOG
please add the `notable-change` label.

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.
-->


Changed files:
filename: deps/ncrypto/unofficial.gni
patch: @@ -27,6 +27,6 @@ template("ncrypto_gn_build") {
     forward_variables_from(invoker, "*")
     public_configs = [ ":ncrypto_config" ]
     sources = gypi_values.ncrypto_sources
-    deps = [ "../openssl" ]
+    deps = [ "$node_openssl_path" ]
   }
 }

filename: node.gni
patch: @@ -10,6 +10,8 @@ declare_args() {
   # The location of V8, use the one from node's deps by default.
   node_v8_path = "$node_path/deps/v8"
 
+  node_openssl_path = "$node_path/deps/openssl"
+
   # The NODE_MODULE_VERSION defined in node_version.h.
   node_module_version = exec_script("$node_path/tools/getmoduleversion.py", [], "value")
 

filename: unofficial.gni
patch: @@ -185,7 +185,7 @@ template("node_gn_build") {
     }
     if (node_use_openssl) {
       deps += [ "deps/ncrypto" ]
-      public_deps += [ "deps/openssl" ]
+      public_deps += [ "$node_openssl_path" ]
       sources += gypi_values.node_crypto_sources
     }
     if (node_enable_inspector) {
Repository: electron/electron
Pull request: fix: handle OnDelegatedSourceListDismissed asynchronously

#### Description of Change

Fixes #45198.

https://chromium-review.googlesource.com/c/chromium/src/+/5783826 modified `DesktopMediaListBase::OnDelegatedSourceListDismissed` to read as follows:

```cc
void DesktopMediaListBase::OnDelegatedSourceListDismissed() {
  DCHECK_CURRENTLY_ON(BrowserThread::UI);
  DCHECK(IsSourceListDelegated());
  if (observer_)
    observer_->OnDelegatedSourceListDismissed();

  Refresh(false);
}
```

The extra refresh means that it is no longer safe to call `DesktopCapturer::HandleFailure` (which deallocates the `DesktopMediaList`) synchronously from `OnDelegatedSourceListDismissed`. Notably, on Linux when using the PipeWire capturer, trying to share a source and then cancelling it from the xdg-desktop-portal's share prompt often causes an immediate crash. It's very easy to reproduce:

```javascript
const { app, desktopCapturer } = require('electron');

app.whenReady().then(async () => {
  await desktopCapturer.getSources({ types: ['window', 'screen'] });
}).finally(() => {
  app.quit();
});
```

Fix this issue by dispatching the failure callback asynchronously using `PostTask`.

#### Checklist

- [x] PR description included and stakeholders cc'd
- [x] [PR release notes](https://github.com/electron/clerk/blob/main/README.md) describe the change in a way relevant to app developers, and are [capitalized, punctuated, and past tense](https://github.com/electron/clerk/blob/main/README.md#examples).

#### Release Notes

Notes: Fixed crash on Linux when PipeWire screenshare source selection is cancelled.


Changed files:
filename: shell/browser/api/electron_api_desktop_capturer.cc
patch: @@ -15,6 +15,7 @@
 #include "chrome/browser/media/webrtc/desktop_media_list.h"
 #include "chrome/browser/media/webrtc/thumbnail_capturer_mac.h"
 #include "chrome/browser/media/webrtc/window_icon_util.h"
+#include "content/public/browser/browser_thread.h"
 #include "content/public/browser/desktop_capture.h"
 #include "gin/handle.h"
 #include "gin/object_template_builder.h"
@@ -252,7 +253,8 @@ void DesktopCapturer::DesktopListListener::OnSourceThumbnailChanged(int index) {
 }
 
 void DesktopCapturer::DesktopListListener::OnDelegatedSourceListDismissed() {
-  std::move(failure_callback_).Run();
+  content::GetUIThreadTaskRunner({})->PostTask(FROM_HERE,
+                                               std::move(failure_callback_));
 }
 
 void DesktopCapturer::StartHandling(bool capture_window,
Repository: denoland/deno
Pull request: fix: move win32job under windows dependencies in tests/util/server

<!--
Before submitting a PR, please read https://docs.deno.com/runtime/manual/references/contributing

1. Give the PR a descriptive title.

  Examples of good title:
    - fix(std/http): Fix race condition in server
    - docs(console): Update docstrings
    - feat(doc): Handle nested reexports

  Examples of bad title:
    - fix #7123
    - update docs
    - fix bugs

2. Ensure there is a related issue and it is referenced in the PR text.
3. Ensure there are tests that cover the changes.
4. Ensure `cargo test` passes.
5. Ensure `./tools/format.js` passes without changing files.
6. Ensure `./tools/lint.js` passes.
7. Open as a draft PR if your work is still in progress. The CI won't run
   all steps, but you can add '[ci]' to a commit message to force it to.
8. If you would like to run the benchmarks on the CI, add the 'ci-bench' label.
-->
`win32job` doesn't declare `windows` as a target specific dependency
https://github.com/ohadravid/win32job-rs/blob/main/Cargo.toml


Changed files:
filename: tests/util/server/Cargo.toml
patch: @@ -60,10 +60,10 @@ tempfile.workspace = true
 termcolor.workspace = true
 tokio.workspace = true
 url.workspace = true
-win32job.workspace = true
 
 [target.'cfg(windows)'.dependencies]
 winapi = { workspace = true, features = ["consoleapi", "synchapi", "handleapi", "namedpipeapi", "winbase", "winerror"] }
+win32job.workspace = true
 
 [target.'cfg(unix)'.dependencies]
 nix = { workspace = true, features = ["fs", "term", "signal"] }
Repository: huggingface/transformers
Pull request: fix test_working_of_tp failure of accelerate ut

### Symptom
`accelerate` UT `pytest -rA tests/tp/test_tp.py::TPIntegrationTest::test_working_of_tp` failed w/ below log

> stderr: [rank0]:   File "/usr/local/lib/python3.11/dist-packages/transformers/integrations/tensor_parallel.py", line 1082, in distribute_model
> stderr: [rank0]:     tp_plan = getattr(model, "_tp_plan", {}).copy()
> stderr: [rank0]:               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> stderr: [rank0]: AttributeError: 'NoneType' object has no attribute 'copy' 

### Root Cause
`model._tp_plan` is `None` rather than missing, so `getattr(type(model), "_tp_plan", {})` will return `None`, and lead to the above error.

### Proposed Fix
use `getattr(type(model), "_tp_plan", None) or {}` to avoid `None`.

### Results
ut passed

@SunMarc @ydshieh , pls help review, thx very much.

Changed files:
filename: src/transformers/integrations/tensor_parallel.py
patch: @@ -1019,7 +1019,7 @@ def shard_and_distribute_module(
     """
     param_name, param_type = parameter_name.rsplit(".", 1) if "." in parameter_name else parameter_name
     tp_plan = model._tp_plan or {}
-    tp_plan.update(getattr(type(model), "_tp_plan", {}))
+    tp_plan.update(getattr(type(model), "_tp_plan", None) or {})
     module_to_tp = model.get_submodule(param_name)  # TODO: can i loop over modules?
     rank = int(rank)
     current_shard_plan = _get_parameter_tp_plan(parameter_name, tp_plan)
@@ -1085,7 +1085,7 @@ def verify_tp_plan(expected_keys: list[str], tp_plan: dict[str, str] | None):
 
 def distribute_model(model, distributed_config, device_mesh, tp_size):
     _plan = "_tp_plan"
-    tp_plan = getattr(model, "_tp_plan", {}).copy()
+    tp_plan = (getattr(model, "_tp_plan", None) or {}).copy()
     model._tp_plan = getattr(model.config, "base_model_tp_plan").copy()
     model._tp_plan.update(tp_plan)
     model._tp_size = tp_size
Repository: vercel/next.js
Pull request: Turbopack: Fix accidental doctest in globset module license

The code block syntax in a documentation comment is interpreted as a doctest: https://doc.rust-lang.org/rustdoc/write-documentation/documentation-tests.html

Tested with:

```
cargo test -p turbo-tasks-fs
```

Closes PACK-5143

Changed files:
filename: turbopack/crates/turbo-tasks-fs/src/globset.rs
patch: @@ -2,18 +2,17 @@
 /// After discussing upstreaming our usecase with the authors of `globset`, we decided that a
 /// fork was appropriate given our divergent usecases. See discussion https://github.com/BurntSushi/ripgrep/issues/3049
 /// The original code had the following license:
-/// ```
-/// The MIT License (MIT)
 ///
-/// Copyright (c) 2015 Andrew Gallant
-///
-/// Permission is hereby granted, free of charge, to any person obtaining a copy
-/// of this software and associated documentation files (the "Software"), to deal
-/// in the Software without restriction, including without limitation the rights
-/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-/// copies of the Software, and to permit persons to whom the Software is
-/// furnished to do so, subject to the following conditions:
-/// ```
+/// > The MIT License (MIT)
+/// >
+/// > Copyright (c) 2015 Andrew Gallant
+/// >
+/// > Permission is hereby granted, free of charge, to any person obtaining a copy
+/// > of this software and associated documentation files (the "Software"), to deal
+/// > in the Software without restriction, including without limitation the rights
+/// > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+/// > copies of the Software, and to permit persons to whom the Software is
+/// > furnished to do so, subject to the following conditions:
 ///
 /// Here it has been heavily modified to:
 /// - Eliminate various configuration options we don't need
Repository: electron/electron
Pull request: feat: add ffmpeg.dll to delay load configuration

Backport of #46151

See that PR for details.


Notes: Added `ffmpeg.dll` to delay load configuration.


Changed files:
filename: BUILD.gn
patch: @@ -1231,7 +1231,7 @@ if (is_mac) {
         "//components/crash/core/app:run_as_crashpad_handler",
       ]
 
-      ldflags = []
+      ldflags = [ "/DELAYLOAD:ffmpeg.dll" ]
 
       libs = [
         "comctl32.lib",
Repository: ggml-org/llama.cpp
Pull request: Remove running `llama-server` within WebUI `dev.sh` script

I think that it added unnecessary complexity to the WebUI development. Let's keep running `llama-server` separately from the SvelteKit app & Storybook Node.js-based dev servers.

Changed files:
filename: tools/server/webui/scripts/dev.sh
patch: @@ -1,5 +1,14 @@
 #!/bin/bash
 
+# Development script for llama.cpp webui
+# 
+# This script starts the webui development servers (Storybook and Vite).
+# Note: You need to start llama-server separately.
+#
+# Usage:
+#   bash scripts/dev.sh
+#   npm run dev
+
 cd ../../../
 
 # Check and install git hooks if missing
@@ -28,76 +37,19 @@ check_and_install_hooks() {
 # Install git hooks if needed
 check_and_install_hooks
 
-# Check if llama-server binary already exists
-if [ ! -f "build/bin/llama-server" ]; then
-    echo "Building llama-server..."
-    cmake -B build && cmake --build build --config Release -t llama-server
-else
-    echo "llama-server binary already exists, skipping build."
-fi
-
-# Start llama-server and capture output
-echo "Starting llama-server..."
-mkfifo server_output.pipe
-build/bin/llama-server -hf ggml-org/gpt-oss-20b-GGUF --jinja -c 0 --no-webui > server_output.pipe 2>&1 &
-SERVER_PID=$!
-
-# Function to wait for server to be ready
-wait_for_server() {
-    echo "Waiting for llama-server to be ready..."
-    local max_wait=60
-    local start_time=$(date +%s)
-    
-    # Read server output in background and look for the ready message
-    (
-        while IFS= read -r line; do
-            echo "🔍 Server: $line"
-            if [[ "$line" == *"server is listening on http://127.0.0.1:8080 - starting the main loop"* ]]; then
-                echo "✅ llama-server is ready!"
-                echo "READY" > server_ready.flag
-                break
-            fi
-        done < server_output.pipe
-    ) &
-    
-    # Wait for ready flag or timeout
-    while [ ! -f server_ready.flag ]; do
-        local current_time=$(date +%s)
-        local elapsed=$((current_time - start_time))
-        
-        if [ $elapsed -ge $max_wait ]; then
-            echo "❌ Server failed to start within $max_wait seconds"
-            rm -f server_ready.flag
-            return 1
-        fi
-        
-        sleep 1
-    done
-    
-    rm -f server_ready.flag
-    return 0
-}
-
 # Cleanup function
 cleanup() {
     echo "🧹 Cleaning up..."
-    kill $SERVER_PID 2>/dev/null
-    rm -f server_output.pipe server_ready.flag
     exit
 }
 
 # Set up signal handlers
 trap cleanup SIGINT SIGTERM
 
-# Wait for server to be ready
-if wait_for_server; then
-    echo "🚀 Starting development servers..."
-    cd tools/server/webui
-    storybook dev -p 6006 --ci & vite dev --host 0.0.0.0 &
-    
-    # Wait for all background processes
-    wait
-else
-    echo "❌ Failed to start development environment"
-    cleanup
-fi
+echo "🚀 Starting development servers..."
+echo "📝 Note: Make sure to start llama-server separately if needed"
+cd tools/server/webui
+storybook dev -p 6006 --ci & vite dev --host 0.0.0.0 &
+
+# Wait for all background processes
+wait
Repository: facebook/react
Pull request: [Release Script] Print a hint where to get the token

I always forget where to get it.

Changed files:
filename: scripts/release/publish-using-ci-workflow.js
patch: @@ -9,7 +9,10 @@ const CIRCLE_TOKEN = process.env.CIRCLE_CI_API_TOKEN;
 
 if (!CIRCLE_TOKEN) {
   console.error(
-    theme.error('Missing required environment variable: CIRCLE_CI_API_TOKEN')
+    theme.error(
+      'Missing required environment variable: CIRCLE_CI_API_TOKEN\n' +
+        'Grab it here: https://app.circleci.com/settings/user/tokens'
+    )
   );
   process.exit(1);
 }
Repository: ggml-org/llama.cpp
Pull request: Make a few GLM tensors not required (to support GLM 4.6)

layer.nextn.shared_head_head and layer.nextn.embed_tokens are both excluded from GLM 4.6 resulting in the model not loading after conversion/quantization, this marks those tensors as not required which makes it work

Before this change I got `llama_model_load: error loading model: missing tensor 'blk.92.nextn.embed_tokens.weight'`

With this change the model loads and runs successfully

Thanks compilade for pointing in the right direction

**Workaround for conversion should anyone else come across this:**

convert_hf_to_gguf.py currently only looks at model*.safetensor files

if you rename `mtp.safetensors` to `model-mtp.safetensors` it will work properly

*Make sure to read the [contributing guidelines](https://github.com/ggml-org/llama.cpp/blob/master/CONTRIBUTING.md) before submitting a PR*


Changed files:
filename: src/llama-model.cpp
patch: @@ -4825,11 +4825,13 @@ bool llama_model::load_tensors(llama_model_loader & ml) {
                         // NextN/MTP tensors (preserved but unused) - conditionally load for last nextn_predict_layers
                         if (hparams.nextn_predict_layers > 0 && static_cast<uint32_t>(i) >= n_layer - hparams.nextn_predict_layers) {
                             layer.nextn.eh_proj          = create_tensor(tn(LLM_TENSOR_NEXTN_EH_PROJ, "weight", i), { 2 * n_embd, n_embd }, flags);
-                            layer.nextn.embed_tokens     = create_tensor(tn(LLM_TENSOR_NEXTN_EMBED_TOKENS, "weight", i), { n_embd, n_vocab }, flags);
                             layer.nextn.enorm            = create_tensor(tn(LLM_TENSOR_NEXTN_ENORM, "weight", i), { n_embd }, flags);
                             layer.nextn.hnorm            = create_tensor(tn(LLM_TENSOR_NEXTN_HNORM, "weight", i), { n_embd }, flags);
-                            layer.nextn.shared_head_head = create_tensor(tn(LLM_TENSOR_NEXTN_SHARED_HEAD_HEAD, "weight", i), { n_embd, n_vocab }, flags);
-                            layer.nextn.shared_head_norm = create_tensor(tn(LLM_TENSOR_NEXTN_SHARED_HEAD_NORM, "weight", i), { n_embd }, flags);
+
+                            // Optional tensors
+                            layer.nextn.embed_tokens     = create_tensor(tn(LLM_TENSOR_NEXTN_EMBED_TOKENS, "weight", i), { n_embd, n_vocab }, flags | TENSOR_NOT_REQUIRED);
+                            layer.nextn.shared_head_head = create_tensor(tn(LLM_TENSOR_NEXTN_SHARED_HEAD_HEAD, "weight", i), { n_embd, n_vocab }, flags | TENSOR_NOT_REQUIRED);
+                            layer.nextn.shared_head_norm = create_tensor(tn(LLM_TENSOR_NEXTN_SHARED_HEAD_NORM, "weight", i), { n_embd }, flags | TENSOR_NOT_REQUIRED);
                         }
                     }
                 }