helloadhavan/github_issues huggingface dataset:
Repository: vercel/next.js
Pull request: Turbopack: use better ident for worker chunk group

### What?

avoid using a double chunk_path for worker chunk group

Closes PACK-4250

Changed files:
filename: turbopack/crates/turbopack-ecmascript/src/worker_chunk/chunk_item.rs
patch: @@ -42,11 +42,7 @@ impl WorkerLoaderChunkItem {
         let module = self.module.await?;
 
         Ok(self.chunking_context.evaluated_chunk_group_assets(
-            AssetIdent::from_path(
-                self.chunking_context
-                    .chunk_path(module.inner.ident(), ".js".into()),
-            )
-            .with_modifier(worker_modifier()),
+            module.inner.ident().with_modifier(worker_modifier()),
             ChunkGroup::Isolated(ResolvedVc::upcast(module.inner)),
             *self.module_graph,
             Value::new(AvailabilityInfo::Root),

filename: turbopack/crates/turbopack-tests/tests/snapshot/imports/ignore-comments/output/4c35f_tests_snapshot_imports_ignore-comments_input_vercel_cjs_3041f295._.js
patch: @@ -1,5 +1,5 @@
 (globalThis.TURBOPACK = globalThis.TURBOPACK || []).push([
-    "output/27832_tests_snapshot_imports_ignore-comments_input_vercel_cjs_a4975a86___7f05ec31.js",
+    "output/4c35f_tests_snapshot_imports_ignore-comments_input_vercel_cjs_3041f295._.js",
     {},
     {"otherChunks":["output/4c35f_tests_snapshot_imports_ignore-comments_input_vercel_cjs_1ec8d7d5._.js"],"runtimeModuleIds":["[project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/ignore-comments/input/vercel.cjs [test] (ecmascript)"]}
 ]);

filename: turbopack/crates/turbopack-tests/tests/snapshot/imports/ignore-comments/output/4e721_crates_turbopack-tests_tests_snapshot_imports_ignore-comments_input_e1849155._.js
patch: @@ -17,7 +17,7 @@ var { g: global, __dirname } = __turbopack_context__;
 {
 __turbopack_context__.v(__turbopack_context__.b([
   "output/4c35f_tests_snapshot_imports_ignore-comments_input_vercel_cjs_1ec8d7d5._.js",
-  "output/27832_tests_snapshot_imports_ignore-comments_input_vercel_cjs_a4975a86___7f05ec31.js"
+  "output/4c35f_tests_snapshot_imports_ignore-comments_input_vercel_cjs_3041f295._.js"
 ]));
 }}),
 "[project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/ignore-comments/input/index.js [test] (ecmascript)": ((__turbopack_context__) => {
Repository: huggingface/transformers
Pull request: Mark 2 tests as flaky for now

# What does this PR do?

Mark 2 tests as flaky for now ...

Changed files:
filename: tests/models/smolvlm/test_modeling_smolvlm.py
patch: @@ -29,6 +29,7 @@
 )
 from transformers.testing_utils import (
     cleanup,
+    is_flaky,
     require_torch,
     require_torch_sdpa,
     slow,
@@ -373,6 +374,11 @@ def test_contrastive_generate_low_memory(self):
     def test_prompt_lookup_decoding_matches_greedy_search(self):
         pass
 
+    @pytest.mark.generate
+    @is_flaky(description="TODO: check why flaky")
+    def test_generate_methods_with_logits_to_keep(self):
+        super().test_generate_methods_with_logits_to_keep()
+
     @unittest.skip(reason=" FlashAttention only support fp16 and bf16 data type")
     def test_flash_attn_2_fp32_ln(self):
         pass

filename: tests/models/zamba/test_modeling_zamba.py
patch: @@ -22,6 +22,7 @@
 
 from transformers import AutoTokenizer, ZambaConfig, is_torch_available
 from transformers.testing_utils import (
+    is_flaky,
     require_bitsandbytes,
     require_flash_attn,
     require_torch,
@@ -327,6 +328,7 @@ def test_decoder_model_past_with_large_inputs(self):
         config_and_inputs = self.model_tester.prepare_config_and_inputs_for_decoder()
         self.model_tester.create_and_check_decoder_model_past_large_inputs(*config_and_inputs)
 
+    @is_flaky(description="TODO: ydshieh")
     def test_initialization(self):
         r"""
         Overriding the test_initialization test as the A_log and D params of the Mamba block are initialized differently
Repository: nodejs/node
Pull request: benchmark: add `test-reporters`

Refs: https://github.com/nodejs/node/issues/55723

This PR benchmarks the reporters currently included in the `node:test/reporters` module.

Changed files:
filename: benchmark/fixtures/basic-test-runner.js
patch: @@ -0,0 +1,11 @@
+const { test } = require('node:test');
+
+test('should pass', () => {});
+test('should fail', () => { throw new Error('fail'); });
+test('should skip', { skip: true }, () => {});
+test('parent', (t) => {
+  t.test('should fail', () => { throw new Error('fail'); });
+  t.test('should pass but parent fail', (t, done) => {
+    setImmediate(done);
+  });
+});

filename: benchmark/test_runner/test-reporters.js
patch: @@ -0,0 +1,41 @@
+'use strict';
+
+const common = require('../common');
+const { run } = require('node:test');
+const reporters = require('node:test/reporters');
+const { Readable } = require('node:stream');
+const assert = require('node:assert');
+
+const bench = common.createBenchmark(main, {
+  n: [1e4],
+  reporter: Object.keys(reporters),
+});
+
+// No need to run this for every benchmark,
+// it should always be the same data.
+const stream = run({
+  files: ['../fixtures/basic-test-runner.js'],
+});
+let testResults;
+
+async function main({ n, reporter: r }) {
+  testResults ??= await stream.toArray();
+
+  // Create readable streams for each iteration
+  const readables = Array.from({ length: n }, () => Readable.from(testResults));
+
+  // Get the selected reporter
+  const reporter = reporters[r];
+
+  bench.start();
+
+  let noDead;
+  for (const readable of readables) {
+    // Process each readable stream through the reporter
+    noDead = await readable.compose(reporter).toArray();
+  }
+
+  bench.end(n);
+
+  assert.ok(noDead);
+}
Repository: huggingface/transformers
Pull request: [Modeling] Load FP8 safetensors such as DeepSeek

## Purpose ##
* Support loading safetensors in FP8

## Changes ##
* Add `F8_E4M3` to `str_to_torch_dtype` mapping used by safetensors loading logic
* Add a value error `Cannot load safetensors of unknown dtype {k_dtype}` if string lookup fails

## Testing ##
* Load DeepSeekV3, which has fp8 weight safetensors

```python3
from transformers import AutoModelForCausalLM

model_id = "deepseek-ai/DeepSeek-V3"
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    device_map="auto",
    torch_dtype="auto",
    trust_remote_code=True,
)
```

## Reviewers ##
@ArthurZucker 

Changed files:
filename: src/transformers/modeling_utils.py
patch: @@ -532,6 +532,9 @@ def load_sharded_checkpoint(model, folder, strict=True, prefer_safe=True):
     "I64": torch.int64,
 }
 
+if is_torch_greater_or_equal("2.1.0"):
+    str_to_torch_dtype["F8_E4M3"] = torch.float8_e4m3fn
+
 if is_torch_greater_or_equal("2.3.0"):
     str_to_torch_dtype["U16"] = torch.uint16
     str_to_torch_dtype["U32"] = torch.uint32
@@ -562,7 +565,11 @@ def load_state_dict(
                 )
             state_dict = {}
             for k in f.keys():
-                dtype = str_to_torch_dtype[f.get_slice(k).get_dtype()]
+                k_dtype = f.get_slice(k).get_dtype()
+                if k_dtype in str_to_torch_dtype:
+                    dtype = str_to_torch_dtype[k_dtype]
+                else:
+                    raise ValueError(f"Cannot load safetensors of unknown dtype {k_dtype}")
                 if map_location == "meta":
                     state_dict[k] = torch.empty(size=f.get_slice(k).get_shape(), dtype=dtype, device="meta")
                 else:
Repository: nodejs/node
Pull request: doc: add `-S` flag release preparation example

Adding the `-S` flag will pass it along to `git`, producing signed commits, which is something we want to encourage on our staging branches.
<!--
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: doc/contributing/releases.md
patch: @@ -284,8 +284,8 @@ You can integrate the PRs into the proposal without running full CI.
 
 ⚠️ At this point, you can either run `git node release --prepare`:
 
-```console
-$ git node release --prepare x.y.z
+```bash
+git node release -S --prepare x.y.z
 ```
 
 to automate the remaining steps until step 6 or you can perform it manually
Repository: electron/electron
Pull request: feat: add transparency checking to `nativeTheme`

Backport of #42862.

See that PR for details.

Notes: Added a new property `prefersReducedTransparency` to `nativeTheme`, which indicates whether the user has chosen to reduce OS-level transparency via system accessibility settings.

Changed files:
filename: docs/api/native-theme.md
patch: @@ -72,3 +72,7 @@ or is being instructed to use an inverted color scheme.
 
 A `boolean` indicating whether Chromium is in forced colors mode, controlled by system accessibility settings.
 Currently, Windows high contrast is the only system setting that triggers forced colors mode.
+
+### `nativeTheme.prefersReducedTransparency` _Readonly_
+
+A `boolean` that indicates the whether the user has chosen via system accessibility settings to reduce transparency at the OS level.

filename: shell/browser/api/electron_api_native_theme.cc
patch: @@ -68,6 +68,10 @@ bool NativeTheme::InForcedColorsMode() {
   return ui_theme_->InForcedColorsMode();
 }
 
+bool NativeTheme::GetPrefersReducedTransparency() {
+  return ui_theme_->GetPrefersReducedTransparency();
+}
+
 #if BUILDFLAG(IS_MAC)
 const CFStringRef WhiteOnBlack = CFSTR("whiteOnBlack");
 const CFStringRef UniversalAccessDomain = CFSTR("com.apple.universalaccess");
@@ -108,7 +112,9 @@ gin::ObjectTemplateBuilder NativeTheme::GetObjectTemplateBuilder(
                    &NativeTheme::ShouldUseHighContrastColors)
       .SetProperty("shouldUseInvertedColorScheme",
                    &NativeTheme::ShouldUseInvertedColorScheme)
-      .SetProperty("inForcedColorsMode", &NativeTheme::InForcedColorsMode);
+      .SetProperty("inForcedColorsMode", &NativeTheme::InForcedColorsMode)
+      .SetProperty("prefersReducedTransparency",
+                   &NativeTheme::GetPrefersReducedTransparency);
 }
 
 const char* NativeTheme::GetTypeName() {

filename: shell/browser/api/electron_api_native_theme.h
patch: @@ -46,6 +46,7 @@ class NativeTheme : public gin::Wrappable<NativeTheme>,
   bool ShouldUseHighContrastColors();
   bool ShouldUseInvertedColorScheme();
   bool InForcedColorsMode();
+  bool GetPrefersReducedTransparency();
 
   // ui::NativeThemeObserver:
   void OnNativeThemeUpdated(ui::NativeTheme* theme) override;

filename: spec/api-native-theme-spec.ts
patch: @@ -105,4 +105,10 @@ describe('nativeTheme module', () => {
       expect(nativeTheme.inForcedColorsMode).to.be.a('boolean');
     });
   });
+
+  describe('nativeTheme.prefersReducesTransparency', () => {
+    it('returns a boolean', () => {
+      expect(nativeTheme.prefersReducedTransparency).to.be.a('boolean');
+    });
+  });
 });
Repository: nodejs/node
Pull request: doc: clarify UV_THREADPOOL_SIZE env var usage

Setting of UV_THREADPOOL_SIZE from within javascript using process.env.UV_THREADPOOL_SIZE is not guaranteed to work as the thread pool would have been created as part of the runtime initialisation much before user code is run.

update doc/api/cli.md

Addresses [nodejs/help#1429](https://github.com/nodejs/help/issues/1429)

<!--
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: doc/api/cli.md
patch: @@ -3450,8 +3450,10 @@ reason any of these APIs takes a long time, other (seemingly unrelated) APIs
 that run in libuv's threadpool will experience degraded performance. In order to
 mitigate this issue, one potential solution is to increase the size of libuv's
 threadpool by setting the `'UV_THREADPOOL_SIZE'` environment variable to a value
-greater than `4` (its current default value). For more information, see the
-[libuv threadpool documentation][].
+greater than `4` (its current default value). However, setting this from inside
+the process using `process.env.UV_THREADPOOL_SIZE=size` is not guranteed to work
+as the threadpool would have been created as part of the runtime initialisation
+much before user code is run. For more information, see the [libuv threadpool documentation][].
 
 ## Useful V8 options
Repository: denoland/deno
Pull request: fix(cli/coverage): invalid line id in html reporter

The `name` for the anchors are prefixed with a `L`, but the links are currently missing it so they don't work currently:
![image](https://github.com/denoland/deno/assets/22963968/4ffa5cde-ae6b-4074-9fc6-76a747846baa)

Changed files:
filename: cli/tools/coverage/reporter.rs
patch: @@ -633,7 +633,7 @@ impl HtmlCoverageReporter {
   ) -> String {
     let line_num = file_text.lines().count();
     let line_count = (1..line_num + 1)
-      .map(|i| format!("<a name='L{i}'></a><a href='#{i}'>{i}</a>"))
+      .map(|i| format!("<a name='L{i}'></a><a href='#L{i}'>{i}</a>"))
       .collect::<Vec<_>>()
       .join("\n");
     let line_coverage = (0..line_num)

filename: tests/integration/coverage_tests.rs
patch: @@ -486,6 +486,9 @@ fn test_html_reporter() {
   assert_contains!(bar_ts_html, "<h1>Coverage report for bar.ts</h1>");
   // Check <T> in source code is escaped to &lt;T&gt;
   assert_contains!(bar_ts_html, "&lt;T&gt;");
+  // Check that line anchors are correctly referenced by line number links
+  assert_contains!(bar_ts_html, "<a name='L1'></a>");
+  assert_contains!(bar_ts_html, "<a href='#L1'>1</a>");
 
   let baz_index_html = tempdir
     .join("html")
Repository: ggml-org/llama.cpp
Pull request: llama : fix incorrect Qwen2Moe ffn_moe_out graph callback

Cut'n'paste error, was passing previous instead of current output.

Changed files:
filename: src/llama-model.cpp
patch: @@ -6323,7 +6323,7 @@ struct llm_build_qwen2moe : public llm_graph_context {
                         false, 0.0,
                         LLAMA_EXPERT_GATING_FUNC_TYPE_SOFTMAX,
                         il);
-            cb(cur, "ffn_moe_out", il);
+            cb(moe_out, "ffn_moe_out", il);
 
             // FFN shared expert
             {
Repository: ggml-org/llama.cpp
Pull request: model : do not repack if a GPU device is present

fix #12481 
fix #12490 
ref https://github.com/ggml-org/llama.cpp/issues/12481#issuecomment-2743136094

Disable repacking (i.e. extra buffer types) if a GPU device is going to be available.

Changed files:
filename: src/llama-model.cpp
patch: @@ -271,19 +271,32 @@ static buft_list_t make_cpu_buft_list(const std::vector<ggml_backend_dev_t> & de
         }
     }
 
-    // add extra buffer types
-    auto * cpu_dev = ggml_backend_dev_by_type(GGML_BACKEND_DEVICE_TYPE_CPU);
-    auto * cpu_reg = ggml_backend_dev_backend_reg(cpu_dev);
-    auto ggml_backend_dev_get_extra_bufts_fn = (ggml_backend_dev_get_extra_bufts_t)
-        ggml_backend_reg_get_proc_address(cpu_reg, "ggml_backend_dev_get_extra_bufts");
-    if (ggml_backend_dev_get_extra_bufts_fn) {
-        ggml_backend_buffer_type_t * extra_bufts = ggml_backend_dev_get_extra_bufts_fn(cpu_dev);
-        while (extra_bufts && *extra_bufts) {
-            buft_list.emplace_back(cpu_dev, *extra_bufts);
-            ++extra_bufts;
+    bool has_gpu_device = false;
+    for (auto * dev : devices) {
+        if (ggml_backend_dev_type(dev) == GGML_BACKEND_DEVICE_TYPE_GPU) {
+            has_gpu_device = true;
+            break;
         }
     }
 
+    // add extra buffer types, only if no GPU device is present
+    // ref: https://github.com/ggml-org/llama.cpp/issues/12481#issuecomment-2743136094
+    if (!has_gpu_device) {
+        auto * cpu_dev = ggml_backend_dev_by_type(GGML_BACKEND_DEVICE_TYPE_CPU);
+        auto * cpu_reg = ggml_backend_dev_backend_reg(cpu_dev);
+        auto ggml_backend_dev_get_extra_bufts_fn = (ggml_backend_dev_get_extra_bufts_t)
+            ggml_backend_reg_get_proc_address(cpu_reg, "ggml_backend_dev_get_extra_bufts");
+        if (ggml_backend_dev_get_extra_bufts_fn) {
+            ggml_backend_buffer_type_t * extra_bufts = ggml_backend_dev_get_extra_bufts_fn(cpu_dev);
+            while (extra_bufts && *extra_bufts) {
+                buft_list.emplace_back(cpu_dev, *extra_bufts);
+                ++extra_bufts;
+            }
+        }
+    } else {
+        LLAMA_LOG_WARN("%s: disabling extra buffer types (i.e. repacking) since a GPU device is available\n", __func__);
+    }
+
     // add a host buffer type
     // storing the tensors in a host buffer is useful when the processing of large batches
     // is offloaded to a GPU device, since it reduces the time spent on data transfers
Repository: electron/electron
Pull request: fix: vibrant view is inserted into Views API hierarchy

Backport of #43078

See that PR for details.


Notes: Fixed issues with the vibrancy view on macOS.


Changed files:
filename: shell/browser/native_window_mac.h
patch: @@ -12,6 +12,7 @@
 #include <string>
 #include <vector>
 
+#include "base/memory/raw_ptr.h"
 #include "electron/shell/common/api/api.mojom.h"
 #include "shell/browser/native_window.h"
 #include "ui/display/display_observer.h"
@@ -299,6 +300,9 @@ class NativeWindowMac : public NativeWindow,
 
   std::string vibrancy_type_;
 
+  // A views::NativeViewHost wrapping the vibrant view. Owned by the root view.
+  raw_ptr<views::NativeViewHost> vibrant_native_view_host_ = nullptr;
+
   // The presentation options before entering simple fullscreen mode.
   NSApplicationPresentationOptions simple_fullscreen_options_;
 };

filename: shell/browser/native_window_mac.mm
patch: @@ -1393,13 +1393,19 @@ void ReorderChildWindowAbove(NSWindow* child_window, NSWindow* other_window) {
   NativeWindow::SetVibrancy(type);
 
   NSVisualEffectView* vibrantView = [window_ vibrantView];
+  views::View* rootView = GetContentsView();
 
   if (type.empty()) {
-    if (vibrantView == nil)
-      return;
+    if (vibrant_native_view_host_ != nullptr) {
+      // Transfers ownership back to caller in the form of a unique_ptr which is
+      // subsequently deleted.
+      rootView->RemoveChildViewT(vibrant_native_view_host_);
+      vibrant_native_view_host_ = nullptr;
+    }
 
-    [vibrantView removeFromSuperview];
-    [window_ setVibrantView:nil];
+    if (vibrantView != nil) {
+      [window_ setVibrantView:nil];
+    }
 
     return;
   }
@@ -1455,9 +1461,13 @@ void ReorderChildWindowAbove(NSWindow* child_window, NSWindow* other_window) {
         [vibrantView setState:NSVisualEffectStateFollowsWindowActiveState];
       }
 
-      [[window_ contentView] addSubview:vibrantView
-                             positioned:NSWindowBelow
-                             relativeTo:nil];
+      // Vibrant view is inserted into the root view hierarchy underneath all
+      // other views.
+      vibrant_native_view_host_ = rootView->AddChildViewAt(
+          std::make_unique<views::NativeViewHost>(), 0);
+      vibrant_native_view_host_->Attach(vibrantView);
+
+      rootView->DeprecatedLayoutImmediately();
 
       UpdateVibrancyRadii(IsFullscreen());
     }