helloadhavan/github_issues huggingface dataset:
Repository: huggingface/transformers
Pull request: extend more trainer test cases to XPU, all pass

@ydshieh , pls help review, thx.

Changed files:
filename: tests/trainer/test_trainer.py
patch: @@ -2520,7 +2520,7 @@ def test_apollo_lr_display_with_scheduler(self):
         self.assertTrue(len(decreasing_lrs) > len(increasing_lrs))
 
     @require_torch_optimi
-    @require_torch_gpu
+    @require_torch_accelerator
     def test_stable_adamw(self):
         config = LlamaConfig(vocab_size=100, hidden_size=32, num_hidden_layers=3, num_attention_heads=4)
         tiny_llama = LlamaForCausalLM(config)
@@ -2539,7 +2539,7 @@ def test_stable_adamw(self):
         _ = trainer.train()
 
     @require_torch_optimi
-    @require_torch_gpu
+    @require_torch_accelerator
     def test_stable_adamw_extra_args(self):
         config = LlamaConfig(vocab_size=100, hidden_size=32, num_hidden_layers=3, num_attention_heads=4)
         tiny_llama = LlamaForCausalLM(config)
@@ -2561,7 +2561,7 @@ def test_stable_adamw_extra_args(self):
         _ = trainer.train()
 
     @require_torch_optimi
-    @require_torch_gpu
+    @require_torch_accelerator
     def test_stable_adamw_lr_display_without_scheduler(self):
         config = LlamaConfig(vocab_size=100, hidden_size=32, num_hidden_layers=3, num_attention_heads=4)
         tiny_llama = LlamaForCausalLM(config)
@@ -2586,7 +2586,7 @@ def test_stable_adamw_lr_display_without_scheduler(self):
         self.assertEqual(trainer.get_learning_rates(), [learning_rate, learning_rate])
 
     @require_torch_optimi
-    @require_torch_gpu
+    @require_torch_accelerator
     def test_stable_adamw_lr_display_with_scheduler(self):
         config = LlamaConfig(vocab_size=100, hidden_size=32, num_hidden_layers=3, num_attention_heads=4)
         tiny_llama = LlamaForCausalLM(config)
@@ -2615,19 +2615,19 @@ def test_stable_adamw_lr_display_with_scheduler(self):
         logs = trainer.state.log_history[1:][:-1]
 
         # reach given learning rate peak and end with 0 lr
-        self.assertTrue(logs[num_warmup_steps - 2]["learning_rate"] == learning_rate)
-        self.assertTrue(logs[-1]["learning_rate"] == 0)
+        self.assertTrue(logs[num_warmup_steps - 1]["learning_rate"] == learning_rate)
+        self.assertTrue(np.allclose(logs[-1]["learning_rate"], 0, atol=5e-6))
 
         # increasing and decreasing pattern of lrs
         increasing_lrs = [
             logs[i]["learning_rate"] < logs[i + 1]["learning_rate"]
             for i in range(len(logs))
-            if i < num_warmup_steps - 2
+            if i < num_warmup_steps - 1
         ]
         decreasing_lrs = [
             logs[i]["learning_rate"] > logs[i + 1]["learning_rate"]
             for i in range(len(logs) - 1)
-            if i >= num_warmup_steps - 2
+            if i >= num_warmup_steps - 1
         ]
 
         self.assertTrue(all(increasing_lrs))
Repository: vercel/next.js
Pull request: [test] workaround test that needs stylus

`stylus` package is removed from npm due to unknown security reason, which leads to the installation failed. Workaround with specifying the security version in tests to get pass on installation but expect it's not being used in runtime

<img width="1267" height="503" alt="image" src="https://github.com/user-attachments/assets/64fd473d-903d-4b02-8715-18d2390b436d" />


Changed files:
filename: test/e2e/app-dir/nx-handling/nx-handling.test.ts
patch: @@ -32,6 +32,10 @@ describe('nx-handling', () => {
         tslib: '^2.3.0',
         typescript: '~5.7.2',
       },
+      overrides: {
+        // Workaround for `stylus` marked as a security vulnerability on npm
+        stylus: '0.0.1-security',
+      },
       workspaces: ['apps/*'],
     },
   })
Repository: ggml-org/llama.cpp
Pull request: codeowners: add ownership of zdnn backend [no ci]

This PR adds @AlekseiNikiforovIBM to the list of owners for the IBM zDNN backend to help with maintenance.

Changed files:
filename: CODEOWNERS
patch: @@ -63,7 +63,7 @@
 /ggml/src/ggml-quants.*                 @ggerganov
 /ggml/src/ggml-threading.*              @ggerganov @slaren
 /ggml/src/ggml-vulkan/                  @0cc4m
-/ggml/src/ggml-zdnn/                    @taronaeo
+/ggml/src/ggml-zdnn/                    @taronaeo @AlekseiNikiforovIBM
 /ggml/src/ggml.c                        @ggerganov @slaren
 /ggml/src/ggml.cpp                      @ggerganov @slaren
 /ggml/src/gguf.cpp                      @JohannesGaessler @Green-Sky
Repository: nodejs/node
Pull request: errors: show url of unsupported attributes in the error message

Fixes: #56930

Changed files:
filename: lib/internal/errors.js
patch: @@ -1338,7 +1338,12 @@ E('ERR_IMPORT_ATTRIBUTE_MISSING',
 E('ERR_IMPORT_ATTRIBUTE_TYPE_INCOMPATIBLE',
   'Module "%s" is not of type "%s"', TypeError);
 E('ERR_IMPORT_ATTRIBUTE_UNSUPPORTED',
-  'Import attribute "%s" with value "%s" is not supported', TypeError);
+  function error(attribute, value, url = undefined) {
+    if (url === undefined) {
+      return `Import attribute "${attribute}" with value "${value}" is not supported`;
+    }
+    return `Import attribute "${attribute}" with value "${value}" is not supported in ${url}`;
+  }, TypeError);
 E('ERR_INCOMPATIBLE_OPTION_PAIR',
   'Option "%s" cannot be used in combination with option "%s"', TypeError, HideStackFramesError);
 E('ERR_INPUT_TYPE_NOT_ALLOWED', '--input-type can only be used with string ' +

filename: lib/internal/modules/esm/assert.js
patch: @@ -57,7 +57,7 @@ function validateAttributes(url, format,
   const keys = ObjectKeys(importAttributes);
   for (let i = 0; i < keys.length; i++) {
     if (keys[i] !== 'type') {
-      throw new ERR_IMPORT_ATTRIBUTE_UNSUPPORTED(keys[i], importAttributes[keys[i]]);
+      throw new ERR_IMPORT_ATTRIBUTE_UNSUPPORTED(keys[i], importAttributes[keys[i]], url);
     }
   }
   const validType = formatTypeMap[format];
@@ -102,7 +102,7 @@ function handleInvalidType(url, type) {
 
   // `type` might not have been one of the types we understand.
   if (!ArrayPrototypeIncludes(supportedTypeAttributes, type)) {
-    throw new ERR_IMPORT_ATTRIBUTE_UNSUPPORTED('type', type);
+    throw new ERR_IMPORT_ATTRIBUTE_UNSUPPORTED('type', type, url);
   }
 
   // `type` was the wrong value for this format.
Repository: electron/electron
Pull request: build: fix compound bash conditional in patchup

#### Description of Change

<img width="612" alt="Screenshot 2025-03-14 at 10 20 44 PM" src="https://github.com/user-attachments/assets/6c29f3ae-132b-467a-9918-828c740f54dd" />

https://github.com/electron/electron/actions/runs/13865507398/job/38803643930

#### Checklist
<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

- [x] PR description included and stakeholders cc'd
- [x] `npm test` passes
- [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: none

Changed files:
filename: .github/actions/checkout/action.yml
patch: @@ -99,7 +99,7 @@ runs:
       fi
 
       ELECTRON_USE_THREE_WAY_MERGE_FOR_PATCHES=1 e d gclient sync --with_branch_heads --with_tags -vv
-      if [ "${{ inputs.is-release }}" != "true" && -n "${{ env.PATCH_UP_APP_CREDS }}" ]; then
+      if [[ "${{ inputs.is-release }}" != "true" && -n "${{ env.PATCH_UP_APP_CREDS }}" ]]; then
         # Re-export all the patches to check if there were changes.
         python3 src/electron/script/export_all_patches.py src/electron/patches/config.json
         cd src/electron
@@ -128,6 +128,8 @@ runs:
             cat ../../patches/update-patches.patch
             exit 1
           fi
+        else
+          echo "No changes to patches detected"
         fi
       fi
Repository: denoland/deno
Pull request: fix(ext/node): fix prototype of asymmetricKeyDetails of AsymmetricKeyObject

`asymmetricKeyObject.asymmetricKeyDetails` object needs to have prototype of `Object.prototype` (for stricter compatibility to Node.js).

This change should unblock the PR #29428 

Changed files:
filename: ext/node/polyfills/internal/crypto/keys.ts
patch: @@ -781,7 +781,7 @@ class AsymmetricKeyObject extends KeyObject {
   }
 
   get asymmetricKeyDetails() {
-    return op_node_get_asymmetric_key_details(this[kHandle]);
+    return { ...op_node_get_asymmetric_key_details(this[kHandle]) };
   }
 }
 

filename: tests/unit_node/crypto/crypto_key_test.ts
patch: @@ -230,6 +230,10 @@ Deno.test("createPrivateKey rsa", function () {
   assertEquals(key.asymmetricKeyType, "rsa");
   assertEquals(key.asymmetricKeyDetails?.modulusLength, 2048);
   assertEquals(key.asymmetricKeyDetails?.publicExponent, 65537n);
+  assertEquals(
+    Object.getPrototypeOf(key.asymmetricKeyDetails),
+    Object.prototype,
+  );
 });
 
 Deno.test("createPrivateKey dh", function () {
Repository: huggingface/transformers
Pull request: Remove python3.7 reference from doc link

# What does this PR do?

Updates the documentation link in the docstring to reference the general Python 3 docs instead of Python 3.7 which is now end-of-life. Referencing the main Python 3 docs is more appropriate and future-proof.


## Before submitting
- [x] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
      Pull Request section?
- [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
      to it if that's the case.
- [ ] Did you make sure to update the documentation with your changes? Here are the
      [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and
      [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
- [ ] Did you write any new necessary tests?


## Who can review?

Documentation: @stevhliu

Changed files:
filename: src/transformers/hf_argparser.py
patch: @@ -294,7 +294,7 @@ def parse_args_into_dataclasses(
         Parse command-line args into instances of the specified dataclass types.
 
         This relies on argparse's `ArgumentParser.parse_known_args`. See the doc at:
-        docs.python.org/3.7/library/argparse.html#argparse.ArgumentParser.parse_args
+        docs.python.org/3/library/argparse.html#argparse.ArgumentParser.parse_args
 
         Args:
             args:
Repository: vercel/next.js
Pull request: Build: Include rewrites in manifest generation

## What?

These values get assigned right after creating the object. So they can just be included when creating the object. I think in the past it might have had conditions wrapping it but they're no longer there.

Closes PACK-5108

Changed files:
filename: packages/next/src/build/index.ts
patch: @@ -1404,9 +1404,15 @@ export default async function build(
             ),
             headers: headers.map((r) => buildCustomRoute('header', r)),
             rewrites: {
-              beforeFiles: [],
-              afterFiles: [],
-              fallback: [],
+              beforeFiles: rewrites.beforeFiles.map((r) =>
+                buildCustomRoute('rewrite', r)
+              ),
+              afterFiles: rewrites.afterFiles.map((r) =>
+                buildCustomRoute('rewrite', r)
+              ),
+              fallback: rewrites.fallback.map((r) =>
+                buildCustomRoute('rewrite', r)
+              ),
             },
             dynamicRoutes,
             staticRoutes,
@@ -1443,16 +1449,6 @@ export default async function build(
           } satisfies RoutesManifest
         })
 
-      routesManifest.rewrites = {
-        beforeFiles: rewrites.beforeFiles.map((r) =>
-          buildCustomRoute('rewrite', r)
-        ),
-        afterFiles: rewrites.afterFiles.map((r) =>
-          buildCustomRoute('rewrite', r)
-        ),
-        fallback: rewrites.fallback.map((r) => buildCustomRoute('rewrite', r)),
-      }
-
       let clientRouterFilters:
         | undefined
         | ReturnType<typeof createClientRouterFilter>
Repository: facebook/react
Pull request: Convert ReactChildren to createRoot


Changed files:
filename: packages/react/src/__tests__/ReactChildren-test.js
patch: @@ -11,12 +11,14 @@
 
 describe('ReactChildren', () => {
   let React;
-  let ReactTestUtils;
+  let ReactDOMClient;
+  let act;
 
   beforeEach(() => {
     jest.resetModules();
     React = require('react');
-    ReactTestUtils = require('react-dom/test-utils');
+    ReactDOMClient = require('react-dom/client');
+    act = require('internal-test-utils').act;
   });
 
   it('should support identity for simple', () => {
@@ -962,37 +964,49 @@ describe('ReactChildren', () => {
   });
 
   describe('with fragments enabled', () => {
-    it('warns for keys for arrays of elements in a fragment', () => {
+    it('warns for keys for arrays of elements in a fragment', async () => {
       class ComponentReturningArray extends React.Component {
         render() {
           return [<div />, <div />];
         }
       }
 
-      expect(() =>
-        ReactTestUtils.renderIntoDocument(<ComponentReturningArray />),
-      ).toErrorDev(
+      const container = document.createElement('div');
+      const root = ReactDOMClient.createRoot(container);
+      await expect(async () => {
+        await act(() => {
+          root.render(<ComponentReturningArray />);
+        });
+      }).toErrorDev(
         'Warning: ' +
           'Each child in a list should have a unique "key" prop.' +
           ' See https://reactjs.org/link/warning-keys for more information.' +
           '\n    in ComponentReturningArray (at **)',
       );
     });
 
-    it('does not warn when there are keys on elements in a fragment', () => {
+    it('does not warn when there are keys on elements in a fragment', async () => {
       class ComponentReturningArray extends React.Component {
         render() {
           return [<div key="foo" />, <div key="bar" />];
         }
       }
 
-      ReactTestUtils.renderIntoDocument(<ComponentReturningArray />);
+      const container = document.createElement('div');
+      const root = ReactDOMClient.createRoot(container);
+      await act(() => {
+        root.render(<ComponentReturningArray />);
+      });
     });
 
-    it('warns for keys for arrays at the top level', () => {
-      expect(() =>
-        ReactTestUtils.renderIntoDocument([<div />, <div />]),
-      ).toErrorDev(
+    it('warns for keys for arrays at the top level', async () => {
+      const container = document.createElement('div');
+      const root = ReactDOMClient.createRoot(container);
+      await expect(async () => {
+        await act(() => {
+          root.render([<div />, <div />]);
+        });
+      }).toErrorDev(
         'Warning: ' +
           'Each child in a list should have a unique "key" prop.' +
           ' See https://reactjs.org/link/warning-keys for more information.',
Repository: nodejs/node
Pull request: meta: move one or more collaborators to emeritus

This PR was generated by the [`find-inactive-collaborators.yml` workflow](https://github.com/nodejs/node/blob/main/.github/workflows/find-inactive-collaborators.yml).

@nodejs/tsc Please follow up with the [offboarding tasks](https://github.com/nodejs/node/blob/main/doc/contributing/offboarding.md).

Changed files:
filename: README.md
patch: @@ -401,8 +401,6 @@ For information about the governance of the Node.js project, see
   **Xuguang Mei** <<meixuguang@gmail.com>> (he/him)
 * [mhdawson](https://github.com/mhdawson) -
   **Michael Dawson** <<midawson@redhat.com>> (he/him)
-* [mildsunrise](https://github.com/mildsunrise) -
-  **Alba Mendez** <<me@alba.sh>> (she/her)
 * [MoLow](https://github.com/MoLow) -
   **Moshe Atlow** <<moshe@atlow.co.il>> (he/him)
 * [MrJithil](https://github.com/MrJithil) -
@@ -611,6 +609,8 @@ For information about the governance of the Node.js project, see
   **Mikeal Rogers** <<mikeal.rogers@gmail.com>>
 * [miladfarca](https://github.com/miladfarca) -
   **Milad Fa** <<mfarazma@redhat.com>> (he/him)
+* [mildsunrise](https://github.com/mildsunrise) -
+  **Alba Mendez** <<me@alba.sh>> (she/her)
 * [misterdjules](https://github.com/misterdjules) -
   **Julien Gilli** <<jgilli@netflix.com>>
 * [mmarchini](https://github.com/mmarchini) -
Repository: ggml-org/llama.cpp
Pull request: model : add label for LiquidAI LFM2-2.6B model

HF link: [LiquidAI/LFM2-2.6B](https://huggingface.co/LiquidAI/LFM2-2.6B).

Support for GGUF conversion and inference is added in #14620.

However, due to similar `n_embd`, it identifies as a 1.2B model. Fix the label by using `n_ff` to identify the model instead.

Output of `llama-bench`:
```
| model                          |       size |     params | backend    | threads |            test |                  t/s |
| ------------------------------ | ---------: | ---------: | ---------- | ------: | --------------: | -------------------: |
| lfm2 1.2B F16                  |   2.18 GiB |     1.17 B | CPU        |      10 |           pp512 |        223.97 ± 5.32 |
| lfm2 2.6B F16                  |   4.79 GiB |     2.57 B | CPU        |      10 |           pp512 |         92.53 ± 4.14 |
| lfm2 350M F16                  | 676.25 MiB |   354.48 M | CPU        |      10 |           pp512 |       725.52 ± 11.70 |
| lfm2 700M F16                  |   1.38 GiB |   742.49 M | CPU        |      10 |           pp512 |       336.22 ± 12.93 |
```

GGUFs will be uploaded to https://huggingface.co/LiquidAI/LFM2-2.6B-GGUF soon.

UPD: GGUFs are uploaded.


Changed files:
filename: src/llama-model.cpp
patch: @@ -66,6 +66,7 @@ const char * llm_type_name(llm_type type) {
         case LLM_TYPE_1_7B:          return "1.7B";
         case LLM_TYPE_1_8B:          return "1.8B";
         case LLM_TYPE_2B:            return "2B";
+        case LLM_TYPE_2_6B:          return "2.6B";
         case LLM_TYPE_2_8B:          return "2.8B";
         case LLM_TYPE_2_9B:          return "2.9B";
         case LLM_TYPE_3B:            return "3B";
@@ -1977,10 +1978,11 @@ void llama_model::load_hparams(llama_model_loader & ml) {
                 for (uint32_t il = 0; il < hparams.n_layer; ++il) {
                     hparams.recurrent_layer_arr[il] = hparams.n_head_kv(il) == 0;
                 }
-                switch (hparams.n_embd) {
-                    case 1024: type = LLM_TYPE_350M; break;
-                    case 1536: type = LLM_TYPE_700M; break;
-                    case 2048: type = LLM_TYPE_1_2B; break;
+                switch (hparams.n_ff()) {
+                    case  4608: type = LLM_TYPE_350M; break;
+                    case  6912: type = LLM_TYPE_700M; break;
+                    case  8192: type = LLM_TYPE_1_2B; break;
+                    case 10752: type = LLM_TYPE_2_6B; break;
                     default:   type = LLM_TYPE_UNKNOWN;
                 }
             } break;

filename: src/llama-model.h
patch: @@ -58,6 +58,7 @@ enum llm_type {
     LLM_TYPE_1_7B,
     LLM_TYPE_1_8B,
     LLM_TYPE_2B,
+    LLM_TYPE_2_6B,
     LLM_TYPE_2_8B,
     LLM_TYPE_2_9B,
     LLM_TYPE_3B,
Repository: denoland/deno
Pull request: perf(process): make sure we can take process spawning fast path on unix

The rust standard library has a fast path for process spawning, where it will use `posix_spawn` instead of `fork` + `exec`. In order to take that fast path, you can't have a `pre_exec` hook and you have to pass an absolute path for the program path.

We were already resolving the program path, but we were unconditionally doing a `pre_exec` hook. This PR makes the `pre_exec` hook conditional, which lets us take the fast path in most cases.

**Results**
on an m3 max

canary:
```
took 318755.68ms
```

this PR:
```
took 17184.64ms
```

So an improvement from 318.76 seconds to 17.18 seconds, or about 18.5x faster

**Benchmark**:
```js
import { fileURLToPath } from "node:url";
const performance = globalThis.performance;

const __filename = fileURLToPath(import.meta.url);

async function spawn() {
  const child = new Deno.Command("cat", {
    args: [__filename],
    stderr: "null",
    stdin: "null",
    stdout: "null",
  }).spawn();
  await child.status;
}

async function spawn100() {
  const procs = [];
  for (let i = 0; i < 100; i++) {
    procs.push(spawn());
  }
  await Promise.all(procs);
}

const start = performance.now();

for (let i = 0; i < 1000; i++) {
  console.log(`on ${(i + 1) * 100}`);
  await spawn100();
}
const end = performance.now();

console.log(`took ${end - start}ms`);
```

Changed files:
filename: Cargo.toml
patch: @@ -451,6 +451,8 @@ opt-level = 3
 opt-level = 3
 [profile.release.package.deno_web]
 opt-level = 3
+[profile.release.package.deno_process]
+opt-level = 3
 [profile.release.package.deno_websocket]
 opt-level = 3
 [profile.release.package.fastwebsockets]

filename: ext/process/lib.rs
patch: @@ -510,19 +510,21 @@ fn create_command(
     }
 
     let detached = args.detached;
-    command.pre_exec(move || {
-      if detached {
-        libc::setsid();
-      }
-      for &(src, dst) in &fds_to_dup {
-        if src >= 0 && dst >= 0 {
-          let _fd = libc::dup2(src, dst);
-          libc::close(src);
+    if detached || !fds_to_dup.is_empty() || args.gid.is_some() {
+      command.pre_exec(move || {
+        if detached {
+          libc::setsid();
         }
-      }
-      libc::setgroups(0, std::ptr::null());
-      Ok(())
-    });
+        for &(src, dst) in &fds_to_dup {
+          if src >= 0 && dst >= 0 {
+            let _fd = libc::dup2(src, dst);
+            libc::close(src);
+          }
+        }
+        libc::setgroups(0, std::ptr::null());
+        Ok(())
+      });
+    }
 
     Ok((command, ipc_rid, extra_pipe_rids, fds_to_close))
   }
Repository: electron/electron
Pull request: fix: warning in file picker UI

Backport of #46067

See that PR for details.


Notes: Fixed incorrect titlebar in file save dialogs.

Changed files:
filename: shell/browser/file_system_access/file_system_access_permission_context.cc
patch: @@ -825,13 +825,7 @@ std::u16string FileSystemAccessPermissionContext::GetPickerTitle(
               ? IDS_FILE_SYSTEM_ACCESS_CHOOSER_OPEN_WRITABLE_DIRECTORY_TITLE
               : IDS_FILE_SYSTEM_ACCESS_CHOOSER_OPEN_READABLE_DIRECTORY_TITLE);
       break;
-    case blink::mojom::TypeSpecificFilePickerOptionsUnion::Tag::
-        kSaveFilePickerOptions:
-      title = l10n_util::GetStringUTF16(
-          IDS_FILE_SYSTEM_ACCESS_CHOOSER_OPEN_SAVE_FILE_TITLE);
-      break;
-    case blink::mojom::TypeSpecificFilePickerOptionsUnion::Tag::
-        kOpenFilePickerOptions:
+    default:
       break;
   }
   return title;