helloadhavan/github_issues huggingface dataset:
Repository: huggingface/transformers
Pull request: Remove device check in HQQ quantizer

Fixes https://github.com/huggingface/transformers/issues/38439

Tested on CPU and NPU, both works out-of-box.

In this case, the HQQ dependency is installed by
```
DISABLE_CUDA=1 pip install git+https://github.com/mobiusml/hqq.git
```

## Who can review?

- quantization (bitsandbytes, autogpt): @SunMarc @MekkCyber



Changed files:
filename: src/transformers/quantizers/quantizer_hqq.py
patch: @@ -15,7 +15,7 @@
 from typing import TYPE_CHECKING, Any
 
 from ..integrations import prepare_for_hqq_linear
-from ..utils import is_accelerate_available, is_hqq_available, is_torch_available, is_torch_xpu_available, logging
+from ..utils import is_accelerate_available, is_hqq_available, is_torch_available, logging
 from .base import HfQuantizer
 from .quantizers_utils import get_module_from_name
 
@@ -71,9 +71,6 @@ def validate_environment(self, *args, **kwargs):
                 " sure the weights are in PyTorch format."
             )
 
-        if not (torch.cuda.is_available() or is_torch_xpu_available()):
-            raise RuntimeError("No GPU or XPU found. A GPU or XPU is needed for quantization.")
-
         if self.torch_dtype is None:
             if "torch_dtype" in kwargs:
                 self.torch_dtype = kwargs["torch_dtype"]
Repository: nodejs/node
Pull request: doc: update return types for eventNames method in EventEmitter

<!--
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.
-->
Updates the documentation for `emitter.eventNames()` to clarify that it returns` (string | symbol)[]`. 

Changed files:
filename: doc/api/events.md
patch: @@ -603,10 +603,10 @@ myEmitter.emit('event', 1, 2, 3, 4, 5);
 added: v6.0.0
 -->
 
-* Returns: {Array}
+* Returns: {string\[]|symbol\[]}
 
 Returns an array listing the events for which the emitter has registered
-listeners. The values in the array are strings or `Symbol`s.
+listeners.
 
 ```mjs
 import { EventEmitter } from 'node:events';

filename: lib/events.js
patch: @@ -871,7 +871,7 @@ function listenerCount(type, listener) {
 /**
  * Returns an array listing the events for which
  * the emitter has registered listeners.
- * @returns {any[]}
+ * @returns {(string | symbol)[]}
  */
 EventEmitter.prototype.eventNames = function eventNames() {
   return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];
Repository: huggingface/transformers
Pull request: update cb TP

# What does this PR do?
Following up on #39164 lazy init is not really an option for now so for CB we need to make sure we init the cache properly

Changed files:
filename: src/transformers/generation/continuous_batching.py
patch: @@ -162,6 +162,7 @@ def __init__(
         dtype: torch.dtype = torch.float16,
         layer_device_map: Optional[dict[int, Union[str, torch.device, int]]] = None,
         initial_prompt_shapes: Optional[list[list[int]]] = None,
+        tp_size: Optional[int] = None,
     ) -> None:
         """Initialize a paged attention cache for efficient memory usage.
 
@@ -196,7 +197,16 @@ def __init__(
 
         self.block_size = block_size
         self.num_blocks = num_blocks
-        self.cache_shape = (self.num_key_value_heads, num_blocks, self.block_size, self.head_dim)
+        num_key_value_heads = self.num_key_value_heads
+        if tp_size is not None and tp_size > 1:
+            if num_key_value_heads % tp_size != 0:
+                raise ValueError(
+                    f"Number of key value heads {num_key_value_heads} must be divisible by tensor parallel size {tp_size}."
+                )
+            # If the model is using tensor parallelism, we need to adjust the number of heads accordingly.
+            num_key_value_heads //= tp_size
+
+        self.cache_shape = (num_key_value_heads, num_blocks, self.block_size, self.head_dim)
 
         self.dtype = dtype
         self.device = device
@@ -1281,6 +1291,7 @@ def _run_generation_loop(self):
                 self.generation_config,
                 self.model.device,
                 self.model.dtype,
+                tp_size=getattr(self.model, "tp_size"),
             )
 
             scheduler = None
Repository: electron/electron
Pull request: fix: asan build on macOS

Backport of #45541

See that PR for details.


Notes: fix crash on startup with asan build on macOS

Changed files:
filename: patches/node/.patches
patch: @@ -53,3 +53,4 @@ src_use_supported_api_to_get_stalled_tla_messages.patch
 build_compile_with_c_20_support.patch
 add_v8_taskpirority_to_foreground_task_runner_signature.patch
 build_restore_clang_as_default_compiler_on_macos.patch
+build_remove_explicit_linker_call_to_libm_on_macos.patch

filename: patches/node/build_remove_explicit_linker_call_to_libm_on_macos.patch
patch: @@ -0,0 +1,59 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: deepak1556 <hop2deep@gmail.com>
+Date: Mon, 3 Feb 2025 21:44:36 +0900
+Subject: build: remove explicit linker call to libm on macOS
+
+/usr/lib/libm.tbd is available via libSystem.*.dylib and
+reexports sanitizer symbols. When building for asan
+this becomes an issue as the linker will resolve the symbols
+from the system library rather from libclang_rt.*
+
+For V8 that rely on specific version of these symbols
+that get bundled as part of clang, for ex:
+https://source.chromium.org/chromium/chromium/src/+/main:v8/src/heap/cppgc/platform.cc;l=93-97
+accepting nullptr for shadow_offset in `asan_get_shadow_mapping`,
+linking to system version that doesn't support this will lead to
+a crash.
+
+Clang driver eventually links with `-lSystem`
+https://github.com/llvm/llvm-project/blob/e82f93890daefeb38fe2a22ee3db87a89948ec57/clang/lib/Driver/ToolChains/Darwin.cpp#L1628-L1631,
+this is done after linking the sanitizer libraries which
+ensures right order of resolution for the symbols.
+
+PR-URL: https://github.com/nodejs/node/pull/56901
+Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
+Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
+Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
+Reviewed-By: Shelley Vohr <shelley.vohr@gmail.com>
+
+diff --git a/deps/brotli/unofficial.gni b/deps/brotli/unofficial.gni
+index 5e07e106672a04508a77584c109c97a67926c858..91001fa43ea4807d061f296eaeccb7512e34863e 100644
+--- a/deps/brotli/unofficial.gni
++++ b/deps/brotli/unofficial.gni
+@@ -25,7 +25,7 @@ template("brotli_gn_build") {
+     } else if (target_os == "freebsd") {
+       defines = [ "OS_FREEBSD" ]
+     }
+-    if (!is_win) {
++    if (is_linux) {
+       libs = [ "m" ]
+     }
+     if (is_clang || !is_win) {
+diff --git a/deps/uv/unofficial.gni b/deps/uv/unofficial.gni
+index 7a73f891e3fc3261b77af97af63fca2eade49849..bda1b5dc899558c2b4a22377dde9fb3bcce5488c 100644
+--- a/deps/uv/unofficial.gni
++++ b/deps/uv/unofficial.gni
+@@ -82,11 +82,11 @@ template("uv_gn_build") {
+       ]
+     }
+     if (is_posix) {
+-      libs = [ "m" ]
+       ldflags = [ "-pthread" ]
+     }
+     if (is_linux) {
+-      libs += [
++      libs = [
++        "m",
+         "dl",
+         "rt",
+       ]
Repository: denoland/deno
Pull request: fix(deno_os): allow running WebWorker without snapshots

This addresses [#28680](https://github.com/denoland/deno/issues/28680) where the esm modules are not found when instantiating a WebWorker with snapshots disabled.

This is an alternative solution to another PR, https://github.com/denoland/deno/pull/28693


Changed files:
filename: ext/os/lib.rs
patch: @@ -113,7 +113,13 @@ deno_core::extension!(
     ops::signal::op_signal_unbind,
     ops::signal::op_signal_poll,
   ],
-  esm = ["30_os.js", "40_signals.js"],
+  // deno_os and deno_os_worker may be used interchangeably, ensure that all
+  // esm modules are given the same identifiers. This is important when
+  // using `WebWorker` without snapshotting.
+  esm = [
+    "ext:deno_os/30_os.js" = "30_os.js",
+    "ext:deno_os/40_signals.js" = "40_signals.js",
+  ],
   middleware = |op| match op.name {
     "op_exit" | "op_set_exit_code" | "op_get_exit_code" =>
       op.with_implementation_from(&deno_core::op_void_sync()),
Repository: electron/electron
Pull request: fix: asan build on macOS

Backport of #45541

See that PR for details.


Notes: fix crash on startup with asan build on macOS

Changed files:
filename: patches/node/.patches
patch: @@ -52,3 +52,4 @@ add_v8_taskpirority_to_foreground_task_runner_signature.patch
 cli_remove_deprecated_v8_flag.patch
 build_restore_clang_as_default_compiler_on_macos.patch
 esm_drop_support_for_import_assertions.patch
+build_remove_explicit_linker_call_to_libm_on_macos.patch

filename: patches/node/build_remove_explicit_linker_call_to_libm_on_macos.patch
patch: @@ -0,0 +1,59 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: deepak1556 <hop2deep@gmail.com>
+Date: Mon, 3 Feb 2025 21:44:36 +0900
+Subject: build: remove explicit linker call to libm on macOS
+
+/usr/lib/libm.tbd is available via libSystem.*.dylib and
+reexports sanitizer symbols. When building for asan
+this becomes an issue as the linker will resolve the symbols
+from the system library rather from libclang_rt.*
+
+For V8 that rely on specific version of these symbols
+that get bundled as part of clang, for ex:
+https://source.chromium.org/chromium/chromium/src/+/main:v8/src/heap/cppgc/platform.cc;l=93-97
+accepting nullptr for shadow_offset in `asan_get_shadow_mapping`,
+linking to system version that doesn't support this will lead to
+a crash.
+
+Clang driver eventually links with `-lSystem`
+https://github.com/llvm/llvm-project/blob/e82f93890daefeb38fe2a22ee3db87a89948ec57/clang/lib/Driver/ToolChains/Darwin.cpp#L1628-L1631,
+this is done after linking the sanitizer libraries which
+ensures right order of resolution for the symbols.
+
+PR-URL: https://github.com/nodejs/node/pull/56901
+Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
+Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
+Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
+Reviewed-By: Shelley Vohr <shelley.vohr@gmail.com>
+
+diff --git a/deps/brotli/unofficial.gni b/deps/brotli/unofficial.gni
+index 5e07e106672a04508a77584c109c97a67926c858..91001fa43ea4807d061f296eaeccb7512e34863e 100644
+--- a/deps/brotli/unofficial.gni
++++ b/deps/brotli/unofficial.gni
+@@ -25,7 +25,7 @@ template("brotli_gn_build") {
+     } else if (target_os == "freebsd") {
+       defines = [ "OS_FREEBSD" ]
+     }
+-    if (!is_win) {
++    if (is_linux) {
+       libs = [ "m" ]
+     }
+     if (is_clang || !is_win) {
+diff --git a/deps/uv/unofficial.gni b/deps/uv/unofficial.gni
+index 7a73f891e3fc3261b77af97af63fca2eade49849..bda1b5dc899558c2b4a22377dde9fb3bcce5488c 100644
+--- a/deps/uv/unofficial.gni
++++ b/deps/uv/unofficial.gni
+@@ -82,11 +82,11 @@ template("uv_gn_build") {
+       ]
+     }
+     if (is_posix) {
+-      libs = [ "m" ]
+       ldflags = [ "-pthread" ]
+     }
+     if (is_linux) {
+-      libs += [
++      libs = [
++        "m",
+         "dl",
+         "rt",
+       ]
Repository: huggingface/transformers
Pull request: Fix link for testpypi

# What does this PR do?

2 times facing the link error -> time to update it on main

Changed files:
filename: setup.py
patch: @@ -52,7 +52,7 @@
    twine upload dist/* -r testpypi --repository-url=https://test.pypi.org/legacy/
 
    Check that you can install it in a virtualenv by running:
-   pip install -i https://testpypi.python.org/pypi transformers
+   pip install -i https://test.pypi.org/simple/ transformers
 
    Check you can run the following commands:
    python -c "from transformers import pipeline; classifier = pipeline('text-classification'); print(classifier('What a nice release'))"
Repository: denoland/deno
Pull request: v2.3.0-rc.3


Changed files:
filename: Cargo.lock
patch: @@ -1451,7 +1451,7 @@ dependencies = [
 
 [[package]]
 name = "deno"
-version = "2.3.0-rc.2"
+version = "2.3.0-rc.3"
 dependencies = [
  "anstream",
  "async-trait",
@@ -2924,7 +2924,7 @@ dependencies = [
 
 [[package]]
 name = "denort"
-version = "2.3.0-rc.2"
+version = "2.3.0-rc.3"
 dependencies = [
  "async-trait",
  "bincode",

filename: cli/Cargo.toml
patch: @@ -2,7 +2,7 @@
 
 [package]
 name = "deno"
-version = "2.3.0-rc.2"
+version = "2.3.0-rc.3"
 authors.workspace = true
 default-run = "deno"
 edition.workspace = true

filename: cli/lib/version.txt
patch: @@ -1 +1 @@
-2.3.0-rc.2
+2.3.0-rc.3

filename: cli/rt/Cargo.toml
patch: @@ -2,7 +2,7 @@
 
 [package]
 name = "denort"
-version = "2.3.0-rc.2"
+version = "2.3.0-rc.3"
 authors.workspace = true
 default-run = "denort"
 edition.workspace = true

filename: tools/release/promote_to_release.ts
patch: @@ -5,7 +5,7 @@
 
 import { $ } from "jsr:@david/dax@0.41.0";
 import { gray } from "jsr:@std/fmt@1/colors";
-import { patchver } from "jsr:@deno/patchver@0.3.0";
+import { patchver } from "jsr:@deno/patchver@0.2.0";
 
 const SUPPORTED_TARGETS = [
   "aarch64-apple-darwin",
Repository: facebook/react
Pull request: [FeatureFlags] Enable useMemoCache for ReactTestRenderer

## Summary
Forget compiled code currently cannot be tested with ReactTestRender as `useMemoCache` is not being set on the dispatcher. This PR ensures that projects can execute unit tests with Forget compilation in the test build pipeline.

```js
// source code
function Component(props) {
  // ...
}

// transformed code, which also should be evaluated in unit tests
function Component(props) {
  const $ = useMemoCache(...);
  // ...
}
```

This PR enables the `enableUseMemoCacheHook` feature flag for all bundle variations of ReactTestRenderer. Forget *should* be the only caller of useMemoCache, so this should be a reversible change (in the event we need to change the implementation or api of the hook).

## How did you test this change?
* Check that generated ReactTestRenderer bundles contain `useMemoCache`.
* Synced to Meta and checked that unit tests that use Forget + @testing-library/react pass.

I did not add new tests to check that useMemoCache can be called when using the test renderer as `useMemoCache` is not yet stable. Happy to add a test case here if that would be helpful to reviewers though (I'm guessing that would go in `packages/react-test-renderer/src/__tests__/ReactTestRenderer-test.js` )

Changed files:
filename: packages/shared/forks/ReactFeatureFlags.test-renderer.native.js
patch: @@ -46,7 +46,7 @@ export const enableGetInspectorDataForInstanceInProduction = false;
 export const enableSuspenseAvoidThisFallback = false;
 export const enableSuspenseAvoidThisFallbackFizz = false;
 export const enableCPUSuspense = false;
-export const enableUseMemoCacheHook = false;
+export const enableUseMemoCacheHook = true;
 export const enableUseEffectEventHook = false;
 export const enableClientRenderFallbackOnTextMismatch = true;
 export const createRootStrictEffectsByDefault = false;

filename: packages/shared/forks/ReactFeatureFlags.test-renderer.www.js
patch: @@ -42,7 +42,7 @@ export const disableModulePatternComponents = true;
 export const enableSuspenseAvoidThisFallback = true;
 export const enableSuspenseAvoidThisFallbackFizz = false;
 export const enableCPUSuspense = false;
-export const enableUseMemoCacheHook = false;
+export const enableUseMemoCacheHook = true;
 export const enableUseEffectEventHook = false;
 export const enableClientRenderFallbackOnTextMismatch = true;
 export const enableComponentStackLocations = true;
Repository: nodejs/node
Pull request: build: use //third_party/simdutf by default in GN

Use `//third_party/simdutf` by default in the GN build instead of `deps/simdutf`. Similar to what's currently done for `//third_party/zlib` for the same reason.

Added in https://chromium-review.googlesource.com/c/v8/node-ci/+/6177642
<!--
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: node.gni
patch: @@ -14,7 +14,7 @@ declare_args() {
   node_openssl_path = "$node_path/deps/openssl"
 
   # The location of simdutf - use the one from node's deps by default.
-  node_simdutf_path = "$node_path/deps/simdutf"
+  node_simdutf_path = "//third_party/simdutf"
 
   # The NODE_MODULE_VERSION defined in node_version.h.
   node_module_version = exec_script("$node_path/tools/getmoduleversion.py", [], "value")
Repository: electron/electron
Pull request: build: make sure chromium cookie is set everywhere

#### Description of Change

<!--
Thank you for your Pull Request. Please provide a description above and review
the requirements below.

Contributors guide: https://github.com/electron/electron/blob/main/CONTRIBUTING.md
-->
Followup to #45581.  The lint job and the node test jobs were not getting the environment variable needed to set the chromium cookie.
#### 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: none


Changed files:
filename: .github/workflows/pipeline-electron-lint.yml
patch: @@ -12,6 +12,9 @@ concurrency:
   group: electron-lint-${{ github.ref_protected == true && github.run_id || github.ref }}
   cancel-in-progress: ${{ github.ref_protected != true }}
 
+env:
+  CHROMIUM_GIT_COOKIE: ${{ secrets.CHROMIUM_GIT_COOKIE }}  
+
 jobs:
   lint:
     name: Lint

filename: .github/workflows/pipeline-segment-node-nan-test.yml
patch: @@ -31,6 +31,7 @@ concurrency:
   cancel-in-progress: ${{ github.ref_protected != true }}
 
 env:
+  CHROMIUM_GIT_COOKIE: ${{ secrets.CHROMIUM_GIT_COOKIE }}
   ELECTRON_OUT_DIR: Default
   ELECTRON_RBE_JWT: ${{ secrets.ELECTRON_RBE_JWT }}
Repository: electron/electron
Pull request: build: bump actions/cache past deprecated version

Backport of #45192

See that PR for details.


Notes: none


Changed files:
filename: .github/actions/checkout/action.yml
patch: @@ -47,7 +47,7 @@ runs:
       curl --unix-socket /var/run/sas/sas.sock --fail "http://foo/$DEPSHASH.tar" > sas-token
   - name: Save SAS Key
     if: ${{ inputs.generate-sas-token == 'true' }}
-    uses: actions/cache/save@v4
+    uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57
     with:
       path: |
         sas-token

filename: .github/actions/install-dependencies/action.yml
patch: @@ -7,7 +7,7 @@ runs:
     shell: bash
     id: yarn-cache-dir-path
     run: echo "dir=$(node src/electron/script/yarn cache dir)" >> $GITHUB_OUTPUT
-  - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
+  - uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57
     id: yarn-cache
     with:
       path: ${{ steps.yarn-cache-dir-path.outputs.dir }}

filename: .github/actions/restore-cache-azcopy/action.yml
patch: @@ -5,14 +5,14 @@ runs:
   steps:
   - name: Obtain SAS Key
     continue-on-error: true
-    uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
+    uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57
     with:
       path: |
         sas-token
       key: sas-key-${{ github.run_number }}-1
   - name: Obtain SAS Key
     continue-on-error: true
-    uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
+    uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57
     with:
       path: |
         sas-token