helloadhavan/github_issues huggingface dataset:
Repository: ggml-org/llama.cpp
Pull request: scripts : add support for forks in pr2wt.sh

This commit adds support for using the pr2wt.sh (pull request to workspace) script with forks of upstream llama.cpp.


Changed files:
filename: scripts/pr2wt.sh
patch: @@ -30,12 +30,18 @@ fi
 PR=$1
 [[ "$PR" =~ ^[0-9]+$ ]] || { echo "error: PR number must be numeric"; exit 1; }
 
+url_origin=$(git config --get remote.upstream.url 2>/dev/null) || \
 url_origin=$(git config --get remote.origin.url) || {
-    echo "error: no remote named 'origin' in this repository"
+    echo "error: no remote named 'upstream' or 'origin' in this repository"
     exit 1
 }
 
-org_repo=$(echo $url_origin | cut -d/ -f4-)
+# Extract org/repo from either https or ssh format.
+if [[ $url_origin =~ ^git@ ]]; then
+    org_repo=$(echo $url_origin | cut -d: -f2)
+else
+    org_repo=$(echo $url_origin | cut -d/ -f4-)
+fi
 org_repo=${org_repo%.git}
 
 echo "org/repo: $org_repo"
Repository: nodejs/node
Pull request: test: skip test that cause timeout on IBM i

Similar to the tests timeouts that were skipped
in https://github.com/nodejs/node/pull/59014, we also want to skip the
following testcase on IBMi
Similar to https://github.com/nodejs/node/pull/59014#issuecomment-3057162303
We have decided to skip these tests
until the underlying issue is resolved.

The tests being skipped are:

- parallel.test-inspector-invalid-protocol

<!--
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: test/parallel/parallel.status
patch: @@ -134,6 +134,7 @@ test-http2-allow-http1-upgrade-ws: SKIP
 test-inspector-network-websocket: SKIP
 test-tls-set-default-ca-certificates-append-fetch: SKIP
 test-tls-set-default-ca-certificates-reset-fetch: SKIP
+test-inspector-invalid-protocol: SKIP
 
 [$asan==on]
 # https://github.com/nodejs/node/issues/39655
Repository: ollama/ollama
Pull request: llama: don't create extraneous directories

With the .WAIT this shouldn't be necessary any more, and was causing payload processing glitches.

Changed files:
filename: llama/Makefile
patch: @@ -46,7 +46,6 @@ clean:
 
 clean-payload:
 	rm -rf $(addprefix $(RUNNERS_PAYLOAD_DIR)/, $(RUNNER_TARGETS) metal cpu cpu_avx cpu_avx2)
-	mkdir -p $(addprefix $(RUNNERS_PAYLOAD_DIR)/, $(RUNNER_TARGETS) metal cpu cpu_avx cpu_avx2)
 
 .PHONY: all runners clean clean-payload $(RUNNER_TARGETS) .WAIT
Repository: electron/electron
Pull request: fix: draw smoothing round rect corner

Backport of #48769

See that PR for details.


Notes: Fixed draw smoothing round corner issue


Changed files:
filename: shell/renderer/electron_smooth_round_rect.cc
patch: @@ -302,8 +302,8 @@ SkPath DrawSmoothRoundRect(float x,
              bottom_right_smoothness, SkPoint::Make(x + width, y + height), 2);
 
   // Bottom left corner
-  DrawCorner(path, bottom_left_radius, left_bottom_smoothness,
-             bottom_left_smoothness, SkPoint::Make(x, y + height), 3);
+  DrawCorner(path, bottom_left_radius, bottom_left_smoothness,
+             left_bottom_smoothness, SkPoint::Make(x, y + height), 3);
 
   path.close();
   return path;
Repository: nodejs/node
Pull request: src,permission: fix permission.has on empty param

I have found a bug in `permission.has()` when no resource is passed. This fixes it. 

Changed files:
filename: src/permission/fs_permission.cc
patch: @@ -176,13 +176,17 @@ bool FSPermission::is_granted(Environment* env,
     case PermissionScope::kFileSystem:
       return allow_all_in_ && allow_all_out_;
     case PermissionScope::kFileSystemRead:
+      if (param.empty()) {
+        return allow_all_in_;
+      }
       return !deny_all_in_ &&
-             ((param.empty() && allow_all_in_) || allow_all_in_ ||
-              is_tree_granted(env, &granted_in_fs_, param));
+             (allow_all_in_ || is_tree_granted(env, &granted_in_fs_, param));
     case PermissionScope::kFileSystemWrite:
+      if (param.empty()) {
+        return allow_all_out_;
+      }
       return !deny_all_out_ &&
-             ((param.empty() && allow_all_out_) || allow_all_out_ ||
-              is_tree_granted(env, &granted_out_fs_, param));
+             (allow_all_out_ || is_tree_granted(env, &granted_out_fs_, param));
     default:
       return false;
   }

filename: test/parallel/test-permission-has.js
patch: @@ -1,4 +1,4 @@
-// Flags: --permission --allow-fs-read=*
+// Flags: --permission --allow-fs-read=* --allow-fs-write=.
 'use strict';
 
 const common = require('../common');
Repository: vuejs/vue
Pull request: Add the runtime-only warning for el in-DOM HTML template

Make the warning more explicit for template complier.
Plus, el option which will be used to extract the template should also emit the warning.

Changed files:
filename: src/core/instance/lifecycle.js
patch: @@ -141,10 +141,11 @@ export function mountComponent (
     vm.$options.render = createEmptyVNode
     if (process.env.NODE_ENV !== 'production') {
       /* istanbul ignore if */
-      if (vm.$options.template && vm.$options.template.charAt(0) !== '#') {
+      if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
+        vm.$options.el || el) {
         warn(
           'You are using the runtime-only build of Vue where the template ' +
-          'option is not available. Either pre-compile the templates into ' +
+          'compiler is not available. Either pre-compile the templates into ' +
           'render functions, or use the compiler-included build.',
           vm
         )
Repository: huggingface/transformers
Pull request: Fix _is_package_available to handle underscore/hyphen equivalence

## Problem

`is_flash_attn_2_available()` returns `False` when both `sgl-kernel` and `flash-attn` are installed, even though `flash-attn` 2.8.1 works fine.

**Reproduction:**
```python
# Simulates the bug when distributions = ['sgl-kernel', 'flash-attn']
pkg_name = "flash_attn"
distributions = ["sgl-kernel", "flash-attn"]

# Current logic (line 60)
result = pkg_name if pkg_name in distributions else distributions[0]
print(result)  # 'sgl-kernel' ❌ (version 0.3.16, fails >= 2.1.0 check)

# 'flash_attn' not in ['sgl-kernel', 'flash-attn'] because underscore ≠ hyphen
```

## Root Cause

`importlib.metadata.packages_distributions()` returns multiple distributions for `flash_attn`. The check `pkg_name in distributions` fails because `'flash_attn'` (underscore) doesn't match `'flash-attn'` (hyphen), so it falls back to `distributions[0]`.

## Fix

Per PEP 503, underscores and hyphens are equivalent in package names. Normalize before matching:

```python
normalized_pkg_name = pkg_name.replace("_", "-")
if normalized_pkg_name in distributions:
    distribution_name = normalized_pkg_name
elif pkg_name in distributions:
    distribution_name = pkg_name
else:
    distribution_name = distributions[0]
```

Now `flash_attn` → `flash-attn` → correct version `2.8.1` ✓

Changed files:
filename: src/transformers/utils/import_utils.py
patch: @@ -55,9 +55,15 @@ def _is_package_available(pkg_name: str, return_version: bool = False) -> tuple[
             # importlib.metadata works with the distribution package, which may be different from the import
             # name (e.g. `PIL` is the import name, but `pillow` is the distribution name)
             distributions = PACKAGE_DISTRIBUTION_MAPPING[pkg_name]
-            # In most cases, the packages are well-behaved and both have the same name. If it's not the case, we
-            # pick the first item of the list as best guess (it's almost always a list of length 1 anyway)
-            distribution_name = pkg_name if pkg_name in distributions else distributions[0]
+            # Per PEP 503, underscores and hyphens are equivalent in package names.
+            # Prefer the distribution that matches the (normalized) package name.
+            normalized_pkg_name = pkg_name.replace("_", "-")
+            if normalized_pkg_name in distributions:
+                distribution_name = normalized_pkg_name
+            elif pkg_name in distributions:
+                distribution_name = pkg_name
+            else:
+                distribution_name = distributions[0]
             package_version = importlib.metadata.version(distribution_name)
         except (importlib.metadata.PackageNotFoundError, KeyError):
             # If we cannot find the metadata (because of editable install for example), try to import directly.
Repository: huggingface/transformers
Pull request: Fix small weight loading example

# What does this PR do?

Fixing a small comment for weight loading

Changed files:
filename: src/transformers/core_model_loading.py
patch: @@ -694,7 +694,7 @@ def convert_and_load_state_dict_in_model(
                 target_patterns=["q", "k","v"],
                 operations=[Chunk(dim=0, chunks=3)]),
                 collected_tensors={
-                    "qkv": [Future, Future, Future]},
+                    "qkv": [Future]},
                 layer_targets={
                     "model.layers.0.attention.q.weight": {"model.layers.0.attention.qkv.weight"},
                     "model.layers.0.attention.k.weight": {"model.layers.0.attention.qkv.weight"},
Repository: ggml-org/llama.cpp
Pull request: Update README.md

paths changed so original example didn't work

*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: docs/backend/snapdragon/README.md
patch: @@ -35,7 +35,7 @@ Adapt below build commands accordingly.
 Let's build llama.cpp with CPU, OpenCL, and Hexagon backends via CMake presets:
 
 ```
-[d]/workspace> cp docs/backend/hexagon/CMakeUserPresets.json .
+[d]/workspace> cp docs/backend/snapdragon/CMakeUserPresets.json .
 
 [d]/workspace> cmake --preset arm64-android-snapdragon-release -B build-snapdragon
 Preset CMake variables:
Repository: ollama/ollama
Pull request: server: close response body on error

This change closes the response body when an error occurs in makeRequestWithRetry. Previously, the first, non-200 response body was not closed before reattempting the request. This change ensures that the response body is closed in all cases where an error occurs, preventing leaks of file descriptors.

Fixes #6974

Changed files:
filename: server/images.go
patch: @@ -1025,6 +1025,8 @@ func makeRequestWithRetry(ctx context.Context, method string, requestURL *url.UR
 
 		switch {
 		case resp.StatusCode == http.StatusUnauthorized:
+			resp.Body.Close()
+
 			// Handle authentication error with one retry
 			challenge := parseRegistryChallenge(resp.Header.Get("www-authenticate"))
 			token, err := getAuthorizationToken(ctx, challenge)
@@ -1040,8 +1042,10 @@ func makeRequestWithRetry(ctx context.Context, method string, requestURL *url.UR
 				}
 			}
 		case resp.StatusCode == http.StatusNotFound:
+			resp.Body.Close()
 			return nil, os.ErrNotExist
 		case resp.StatusCode >= http.StatusBadRequest:
+			defer resp.Body.Close()
 			responseBody, err := io.ReadAll(resp.Body)
 			if err != nil {
 				return nil, fmt.Errorf("%d: %s", resp.StatusCode, err)
Repository: facebook/react
Pull request: [rcr] Fix incorrect output platform


Accidentally copypasted the wrong esbuild config.


Changed files:
filename: compiler/packages/react-compiler-runtime/scripts/build.js
patch: @@ -1,67 +0,0 @@
-#!/usr/bin/env node
-
-/**
- * Copyright (c) Meta Platforms, Inc. and affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-const esbuild = require('esbuild');
-const yargs = require('yargs');
-const path = require('path');
-const {Generator} = require('npm-dts');
-
-const argv = yargs(process.argv.slice(2))
-  .options('w', {
-    alias: 'watch',
-    default: false,
-    type: 'boolean',
-  })
-  .parse();
-
-const config = {
-  entryPoints: [path.join(__dirname, '../src/index.ts')],
-  outfile: path.join(__dirname, '../dist/index.js'),
-  bundle: true,
-  external: ['react'],
-  format: 'cjs',
-  platform: 'node',
-  target: 'es6',
-  banner: {
-    js: `/**
- * Copyright (c) Meta Platforms, Inc. and affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- *
- * @lightSyntaxTransform
- * @noflow
- * @nolint
- * @preventMunge
- * @preserve-invariant-messages
- */
-
-"use no memo";`,
-  },
-};
-
-async function main() {
-  if (argv.w) {
-    const ctx = await esbuild.context(config);
-    await ctx.watch();
-    console.log('watching for changes...');
-  } else {
-    await esbuild.build({
-      sourcemap: true,
-      minify: false,
-      ...config,
-    });
-    await new Generator({
-      entry: 'src/index.ts',
-      output: 'dist/index.d.ts',
-    }).generate();
-  }
-}
-
-main();

filename: compiler/packages/react-compiler-runtime/tsup.config.ts
patch: @@ -9,7 +9,7 @@ export default defineConfig({
   dts: false,
   bundle: true,
   format: 'cjs',
-  platform: 'browser',
+  platform: 'node',
   target: 'es2015',
   banner: {
     js: `/**
Repository: nodejs/node
Pull request: src,permission: add debug log on is_tree_granted

This should help with investigating the fs path check bugs. 

Changed files:
filename: src/permission/fs_permission.cc
patch: @@ -69,7 +69,14 @@ bool is_tree_granted(
     resolved_param.erase(0, 2);
   }
 #endif
-  return granted_tree->Lookup(resolved_param, true);
+  auto _is_granted = granted_tree->Lookup(resolved_param, true);
+  node::Debug(env,
+              node::DebugCategory::PERMISSION_MODEL,
+              "Access %d to %s\n",
+              _is_granted,
+              param);
+
+  return _is_granted;
 }
 
 static const char* kBoxDrawingsLightUpAndRight = "└─ ";
Repository: facebook/react
Pull request: Check if a child is a new child before calling moveBefore

This fixes a critical issue with moveBefore. I was told that the disconnected -> connected case was going to be relaxed and not be an error but apparently that is not the case.

This means that we can't use this for initial insertions. Only moves.

Unfortunately React's internals doesn't distinguish these cases. This adds a hack that checks each nodes but this is pretty bad for performance. We should only call this in one or the other case.

Given that we still need feature detection. Both of which means that these calls are no longer inlined and this extra code. I wonder if it's even worth it given that you can't even rely on it working anyway since not all browsers have it. Kind of don't want to ship this until all browsers have it.

Even then we'd ideally refactor React to use separate code paths for initial insertion vs moves. Which leads to some unfortunate code duplication.

Changed files:
filename: packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js
patch: @@ -808,7 +808,7 @@ export function appendChild(
   parentInstance: Instance,
   child: Instance | TextInstance,
 ): void {
-  if (supportsMoveBefore) {
+  if (supportsMoveBefore && child.parentNode !== null) {
     // $FlowFixMe[prop-missing]: We've checked this with supportsMoveBefore.
     parentInstance.moveBefore(child, null);
   } else {
@@ -828,7 +828,7 @@ export function appendChildToContainer(
     container.nodeType === COMMENT_NODE
   ) {
     parentNode = (container.parentNode: any);
-    if (supportsMoveBefore) {
+    if (supportsMoveBefore && child.parentNode !== null) {
       // $FlowFixMe[prop-missing]: We've checked this with supportsMoveBefore.
       parentNode.moveBefore(child, container);
     } else {
@@ -840,7 +840,7 @@ export function appendChildToContainer(
   } else {
     parentNode = (container: any);
   }
-  if (supportsMoveBefore) {
+  if (supportsMoveBefore && child.parentNode !== null) {
     // $FlowFixMe[prop-missing]: We've checked this with supportsMoveBefore.
     parentNode.moveBefore(child, null);
   } else {
@@ -870,7 +870,7 @@ export function insertBefore(
   child: Instance | TextInstance,
   beforeChild: Instance | TextInstance | SuspenseInstance,
 ): void {
-  if (supportsMoveBefore) {
+  if (supportsMoveBefore && child.parentNode !== null) {
     // $FlowFixMe[prop-missing]: We've checked this with supportsMoveBefore.
     parentInstance.moveBefore(child, beforeChild);
   } else {
@@ -896,7 +896,7 @@ export function insertInContainerBefore(
   } else {
     parentNode = (container: any);
   }
-  if (supportsMoveBefore) {
+  if (supportsMoveBefore && child.parentNode !== null) {
     // $FlowFixMe[prop-missing]: We've checked this with supportsMoveBefore.
     parentNode.moveBefore(child, beforeChild);
   } else {
Repository: ollama/ollama
Pull request: README: Fix llama3.1 -> llama3.2 typo


Changed files:
filename: README.md
patch: @@ -50,7 +50,7 @@ Here are some example models that can be downloaded:
 | Model              | Parameters | Size  | Download                       |
 | ------------------ | ---------- | ----- | ------------------------------ |
 | Llama 3.2          | 3B         | 2.0GB | `ollama run llama3.2`          |
-| Llama 3.2          | 1B         | 1.3GB | `ollama run llama3.1:1b`       |
+| Llama 3.2          | 1B         | 1.3GB | `ollama run llama3.2:1b`       |
 | Llama 3.1          | 8B         | 4.7GB | `ollama run llama3.1`          |
 | Llama 3.1          | 70B        | 40GB  | `ollama run llama3.1:70b`      |
 | Llama 3.1          | 405B       | 231GB | `ollama run llama3.1:405b`     |
Repository: vuejs/vue
Pull request: fix a typo

<!--
Please make sure to read the Pull Request Guidelines:
https://github.com/vuejs/vue/blob/dev/.github/CONTRIBUTING.md#pull-request-guidelines
-->

<!-- PULL REQUEST TEMPLATE -->
<!-- (Update "[ ]" to "[x]" to check a box) -->

**What kind of change does this PR introduce?** (check at least one)

- [ ] Bugfix
- [ ] Feature
- [ ] Code style update
- [ ] Refactor
- [ ] Build-related changes
- [x] Other, please describe:
a typo
**Does this PR introduce a breaking change?** (check one)

- [ ] Yes
- [x] No

If yes, please describe the impact and migration path for existing applications:

**The PR fulfills these requirements:**

- [x] It's submitted to the `dev` branch for v2.x (or to a previous version branch), _not_ the `master` branch
- [ ] When resolving a specific issue, it's referenced in the PR's title (e.g. `fix #xxx[,#xxx]`, where "xxx" is the issue number)
- [ ] All tests are passing: https://github.com/vuejs/vue/blob/dev/.github/CONTRIBUTING.md#development-setup
- [ ] New/updated tests are included

If adding a **new feature**, the PR's description includes:
- [ ] A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

**Other information:**


Changed files:
filename: src/core/vdom/create-component.js
patch: @@ -296,7 +296,7 @@ function extractProps (data: VNodeData, Ctor: Class<Component>, tag?: string): ?
         ) {
           tip(
             `Prop "${keyInLowerCase}" is passed to component ` +
-            `${formatComponentName(tag || Ctor)}, but the delared prop name is` +
+            `${formatComponentName(tag || Ctor)}, but the declared prop name is` +
             ` "${key}". ` +
             `Note that HTML attributes are case-insensitive and camelCased ` +
             `props need to use their kebab-case equivalents when using in-DOM ` +
Repository: vuejs/vue
Pull request: fix(inject): change warn message when trying to mutate an injected value

<!--
Please make sure to read the Pull Request Guidelines:
https://github.com/vuejs/vue/blob/dev/.github/CONTRIBUTING.md#pull-request-guidelines
-->

<!-- PULL REQUEST TEMPLATE -->
<!-- (Update "[ ]" to "[x]" to check a box) -->

**What kind of change does this PR introduce?** (check at least one)

- [ ] Bugfix
- [ ] Feature
- [x] Code style update
- [ ] Refactor
- [ ] Build-related changes
- [ ] Other, please describe:

**Does this PR introduce a breaking change?** (check one)

- [ ] Yes
- [x] No

If yes, please describe the impact and migration path for existing applications:

**The PR fulfills these requirements:**

- [x] It's submitted to the `dev` branch for v2.x (or to a previous version branch), _not_ the `master` branch
- [ ] When resolving a specific issue, it's referenced in the PR's title (e.g. `fix #xxx[,#xxx]`, where "xxx" is the issue number)
- [x] All tests are passing: https://github.com/vuejs/vue/blob/dev/.github/CONTRIBUTING.md#development-setup
- [x] New/updated tests are included

If adding a **new feature**, the PR's description includes:
- [ ] A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

**Other information:**


Changed files:
filename: src/core/instance/inject.js
patch: @@ -34,9 +34,9 @@ export function initInjections (vm: Component) {
           if (process.env.NODE_ENV !== 'production') {
             defineReactive(vm, key, source._provided[provideKey], () => {
               warn(
-                `Avoid mutating a injections directly since the value will be ` +
+                `Avoid mutating an injected value directly since the changes will be ` +
                 `overwritten whenever the provided component re-renders. ` +
-                `injections being mutated: "${key}"`,
+                `injection being mutated: "${key}"`,
                 vm
               )
             })

filename: test/unit/features/options/inject.spec.js
patch: @@ -213,8 +213,8 @@ describe('Options provide/inject', () => {
     expect(child.foo).toBe(1)
     child.foo = 2
     expect(
-      `Avoid mutating a injections directly since the value will be ` +
+      `Avoid mutating an injected value directly since the changes will be ` +
       `overwritten whenever the provided component re-renders. ` +
-      `injections being mutated: "${key}"`).toHaveBeenWarned()
+      `injection being mutated: "${key}"`).toHaveBeenWarned()
   })
 })