helloadhavan/github_issues huggingface dataset:
Repository: facebook/react
Pull request: Cleanup `replayFailedUnitOfWorkWithInvokeGuardedCallback`and `enableProfilerNestedUpdateScheduledHook`

https://github.com/facebook/react/pull/28407 was based on a state before https://github.com/facebook/react/pull/28515/ and https://github.com/facebook/react/pull/28509 so it missed the cleanups in those PRs.

Changed files:
filename: packages/react/src/__tests__/ReactProfilerComponent-test.internal.js
patch: @@ -19,19 +19,13 @@ function loadModules({
   enableProfilerTimer = true,
   enableProfilerCommitHooks = true,
   enableProfilerNestedUpdatePhase = true,
-  enableProfilerNestedUpdateScheduledHook = false,
-  replayFailedUnitOfWorkWithInvokeGuardedCallback = false,
 } = {}) {
   ReactFeatureFlags = require('shared/ReactFeatureFlags');
 
   ReactFeatureFlags.enableProfilerTimer = enableProfilerTimer;
   ReactFeatureFlags.enableProfilerCommitHooks = enableProfilerCommitHooks;
   ReactFeatureFlags.enableProfilerNestedUpdatePhase =
     enableProfilerNestedUpdatePhase;
-  ReactFeatureFlags.enableProfilerNestedUpdateScheduledHook =
-    enableProfilerNestedUpdateScheduledHook;
-  ReactFeatureFlags.replayFailedUnitOfWorkWithInvokeGuardedCallback =
-    replayFailedUnitOfWorkWithInvokeGuardedCallback;
 
   React = require('react');
   ReactDOMClient = require('react-dom/client');
Repository: huggingface/transformers
Pull request: Fix CircleCI step passes in the case of pytest worker crash at test collection time

# What does this PR do?

No idea why pytest have exit code 0 in this case. Just adding a new step to check the content of `tests_output.txt` to see if there is any `crashed and worker restarting disabled` and fails that step instead if any.

Changed files:
filename: .circleci/create_circleci_config.py
patch: @@ -182,6 +182,22 @@ def to_dict(self):
                 "name": "Run tests",
                 "command": f"({timeout_cmd} python3 -m pytest {marker_cmd} -n {self.pytest_num_workers} {junit_flags} {repeat_on_failure_flags} {' '.join(pytest_flags)} $(cat splitted_tests.txt) | tee tests_output.txt)"}
             },
+            {"run":
+                {
+                    "name": "Check for test crashes",
+                    "when": "always",
+                    "command": """if [ ! -f tests_output.txt ]; then
+                            echo "ERROR: tests_output.txt does not exist - tests may not have run properly"
+                            exit 1
+                        elif grep -q "crashed and worker restarting disabled" tests_output.txt; then
+                            echo "ERROR: Worker crash detected in test output"
+                            echo "Found: crashed and worker restarting disabled"
+                            exit 1
+                        else
+                            echo "Tests output file exists and no worker crashes detected"
+                        fi"""
+                },
+            },
             {"run": {"name": "Expand to show skipped tests", "when": "always", "command": f"python3 .circleci/parse_test_outputs.py --file tests_output.txt --skip"}},
             {"run": {"name": "Failed tests: show reasons",   "when": "always", "command": f"python3 .circleci/parse_test_outputs.py --file tests_output.txt --fail"}},
             {"run": {"name": "Errors",                       "when": "always", "command": f"python3 .circleci/parse_test_outputs.py --file tests_output.txt --errors"}},
Repository: ggml-org/llama.cpp
Pull request: CUDA: fix MMQ stream-k fixup ne1 indices

See discussion starting with https://github.com/ikawrakow/ik_llama.cpp/pull/728#issuecomment-3494522254 , the use of MMQ MoE optimizations is resulting in increased perplexity on master. The problem is that the wrong indices are being used when determining which `dst` columns should be receiving the stream-k fixup. This is a very typical bug that I encounter during development but unfortunately? this is one of the rare cases where the impact is small enough to be overlooked. Generally speaking, the impact will be largest for the combination of small models are large GPUs where the SM count is not a power of 2 (RTX 4090 for example has 128 SMs). Example models:

| Model              | GPU      | PPL master |  PPL PR |
|--------------------|----------|------------|---------|
| GraniteMoe 3b q4_0 | RTX 3090 |    10.5577 | 10.0799 |
| GraniteMoe 3b q4_0 | RTX 4090 |    10.0879 | 10.0877 |
| GraniteMoe 3b q4_0 | RTX 5090 |    15.4910 | 10.0853 |
| Qwen 3 30b q4_0    | RTX 3090 |     9.3418 |  9.2930 |
| Qwen 3 30b q4_0    | RTX 4090 |     9.2928 |  9.2928 |
| Qwen 3 30b q4_0    | RTX 5090 |     9.4052 |  9.2930 |


The bug in question has been on master since https://github.com/ggml-org/llama.cpp/pull/13199 though the impact became larger with https://github.com/ggml-org/llama.cpp/pull/15525 when the upper bound for CUDA blocks was tightened and more stream-k seams ended up in tiles that are not being skipped. 

Changed files:
filename: ggml/src/ggml-cuda/mmq.cuh
patch: @@ -3494,7 +3494,7 @@ static __global__ void mul_mat_q_stream_k_fixup(
     const int col_diff = col_high - col_low;
 
     for (int j = threadIdx.y*warp_size + threadIdx.x; j < mmq_x; j += nwarps*warp_size) {
-        ids_dst_shared[j] = ids_dst[col_low + j];
+        ids_dst_shared[j] = ids_dst[col_low + jt*mmq_x + j];
     }
     __syncthreads();
Repository: electron/electron
Pull request: feat: expose `nativeTheme.shouldUseDarkColorsForSystemIntegratedUI`

Backport of #46438

See that PR for details.


Notes: Added `nativeTheme.shouldUseDarkColorsForSystemIntegratedUI` to distinguish system and app theme.

Changed files:
filename: docs/api/native-theme.md
patch: @@ -63,6 +63,14 @@ Your application should then always use `shouldUseDarkColors` to determine what
 A `boolean` for if the OS / Chromium currently has high-contrast mode enabled
 or is being instructed to show a high-contrast UI.
 
+### `nativeTheme.shouldUseDarkColorsForSystemIntegratedUI` _macOS_ _Windows_ _Readonly_
+
+A `boolean` property indicating whether or not the system theme has been set to dark or light.
+
+On Windows this property distinguishes between system and app light/dark theme, returning
+`true` if the system theme is set to dark theme and `false` otherwise. On macOS the return
+value will be the same as `nativeTheme.shouldUseDarkColors`.
+
 ### `nativeTheme.shouldUseInvertedColorScheme` _macOS_ _Windows_ _Readonly_
 
 A `boolean` for if the OS / Chromium currently has an inverted color scheme

filename: shell/browser/api/electron_api_native_theme.cc
patch: @@ -63,6 +63,10 @@ bool NativeTheme::ShouldUseHighContrastColors() {
   return ui_theme_->UserHasContrastPreference();
 }
 
+bool NativeTheme::ShouldUseDarkColorsForSystemIntegratedUI() {
+  return ui_theme_->ShouldUseDarkColorsForSystemIntegratedUI();
+}
+
 bool NativeTheme::InForcedColorsMode() {
   return ui_theme_->InForcedColorsMode();
 }
@@ -109,6 +113,8 @@ gin::ObjectTemplateBuilder NativeTheme::GetObjectTemplateBuilder(
                    &NativeTheme::SetThemeSource)
       .SetProperty("shouldUseHighContrastColors",
                    &NativeTheme::ShouldUseHighContrastColors)
+      .SetProperty("shouldUseDarkColorsForSystemIntegratedUI",
+                   &NativeTheme::ShouldUseDarkColorsForSystemIntegratedUI)
       .SetProperty("shouldUseInvertedColorScheme",
                    &NativeTheme::ShouldUseInvertedColorScheme)
       .SetProperty("inForcedColorsMode", &NativeTheme::InForcedColorsMode)

filename: shell/browser/api/electron_api_native_theme.h
patch: @@ -48,6 +48,7 @@ class NativeTheme final : public gin::Wrappable<NativeTheme>,
   ui::NativeTheme::ThemeSource GetThemeSource() const;
   bool ShouldUseDarkColors();
   bool ShouldUseHighContrastColors();
+  bool ShouldUseDarkColorsForSystemIntegratedUI();
   bool ShouldUseInvertedColorScheme();
   bool InForcedColorsMode();
   bool GetPrefersReducedTransparency();

filename: spec/api-native-theme-spec.ts
patch: @@ -102,6 +102,12 @@ describe('nativeTheme module', () => {
     });
   });
 
+  describe('nativeTheme.shouldUseDarkColorsForSystemIntegratedUI', () => {
+    it('returns a boolean', () => {
+      expect(nativeTheme.shouldUseDarkColorsForSystemIntegratedUI).to.be.a('boolean');
+    });
+  });
+
   describe('nativeTheme.inForcedColorsMode', () => {
     it('returns a boolean', () => {
       expect(nativeTheme.inForcedColorsMode).to.be.a('boolean');
Repository: huggingface/transformers
Pull request: Fix `test_eager_matches_sdpa_inference` not run for `CLIP`

# What does this PR do?

This PR fixes  `test_eager_matches_sdpa_inference` not run for `CLIP` after #37498.

#37498 changed `tests/models/clip/test_modeling_clip.py` from

```python
    def test_eager_matches_sdpa_inference(self, torch_dtype: str):
        super().test_eager_matches_sdpa_inference(
            torch_dtype=torch_dtype,
            logit_keys=("last_hidden_state", "pooler_output", "image_embeds"),
            use_attention_mask_options=(None,),
        )
```
to
```python
    def test_eager_matches_sdpa_inference(self, *args):
        # adding only flaky decorator here and call the parent test method
        return getattr(ModelTesterMixin, self._testMethodName)(self)
```

This change invalided the comment in a previous PR 

https://github.com/huggingface/transformers/pull/36650#discussion_r1989959059

After #37498, this (parametrized) test is not run at all for CLIP with

> SKIPPED (CLIP-like models have a different `test_eager_matches_sdpa_infere...)

, while a commit before it, we still have 3 tests (the overwritten ones) being run.




Changed files:
filename: tests/test_modeling_common.py
patch: @@ -174,11 +174,6 @@ def _test_eager_matches_sdpa_inference(
     This test is written as a regular function to be able to overload it easily with different tolerances.
     Otherwise, `paramterezie.expand` prevents it as it removes the original function from the namespace.
     """
-    # TODO: we shouldn't need to do this skip, i.e. the test would be composable from the model tester. CLIP-like
-    # models have a custom mixin, which we detect to skip this test.
-    if any(".CLIPModelTesterMixin" in str(base) for base in self.__class__.__bases__):
-        self.skipTest(reason="CLIP-like models have a different `test_eager_matches_sdpa_inference`")
-
     if not self.has_attentions:
         self.skipTest(reason="Model architecture does not support attentions")
Repository: ollama/ollama
Pull request: Add Maid to Community Integrations

Maid is a cross-platform Flutter app for interfacing with GGUF / Llama models locally via Llama.cpp and interfacing remotely via Ollama. Currently Android, Windows and Linux are supported with plans to support Mac and IOS in the future.

Maid is working great with Ollama now and once #991 goes through it will work even better.

Changed files:
filename: README.md
patch: @@ -216,6 +216,10 @@ See the [API documentation](./docs/api.md) for all endpoints.
 
 ## Community Integrations
 
+### Mobile
+
+- [Maid](https://github.com/danemadsen/Maid) (Mobile Artificial Intelligence Distribution)
+
 ### Web & Desktop
 
 - [HTML UI](https://github.com/rtcfirefly/ollama-ui)
Repository: facebook/react
Pull request: Remove warning for ref cleanup function

Resources
- RFC: https://github.com/reactjs/rfcs/pull/205
- Warning implemented in https://github.com/facebook/react/pull/22313
- Warning enabled in https://github.com/facebook/react/pull/23145
- Feature added in https://github.com/facebook/react/pull/25686

We have warned to prevent the old behavior since 18.0.0.

The new feature has been on in canary for a while but still triggering the warning. This PR cleans up the warning for 19


Changed files:
filename: packages/react-dom/src/__tests__/refs-test.js
patch: @@ -706,45 +706,4 @@ describe('refs return clean up function', () => {
     expect(setup).toHaveBeenCalledTimes(1);
     expect(cleanUp).toHaveBeenCalledTimes(1);
   });
-
-  it('warns if clean up function is returned when called with null', async () => {
-    const container = document.createElement('div');
-    const cleanUp = jest.fn();
-    const setup = jest.fn();
-    let returnCleanUp = false;
-
-    const root = ReactDOMClient.createRoot(container);
-    await act(() => {
-      root.render(
-        <div
-          ref={_ref => {
-            setup(_ref);
-            if (returnCleanUp) {
-              return cleanUp;
-            }
-          }}
-        />,
-      );
-    });
-
-    expect(setup).toHaveBeenCalledTimes(1);
-    expect(cleanUp).toHaveBeenCalledTimes(0);
-
-    returnCleanUp = true;
-
-    await expect(async () => {
-      await act(() => {
-        root.render(
-          <div
-            ref={_ref => {
-              setup(_ref);
-              if (returnCleanUp) {
-                return cleanUp;
-              }
-            }}
-          />,
-        );
-      });
-    }).toErrorDev('Unexpected return value from a callback ref in div');
-  });
 });

filename: packages/react-reconciler/src/ReactFiberCommitWork.js
patch: @@ -318,30 +318,20 @@ function safelyDetachRef(current: Fiber, nearestMountedAncestor: Fiber | null) {
         }
       }
     } else if (typeof ref === 'function') {
-      let retVal;
       try {
         if (shouldProfile(current)) {
           try {
             startLayoutEffectTimer();
-            retVal = ref(null);
+            ref(null);
           } finally {
             recordLayoutEffectDuration(current);
           }
         } else {
-          retVal = ref(null);
+          ref(null);
         }
       } catch (error) {
         captureCommitPhaseError(current, nearestMountedAncestor, error);
       }
-      if (__DEV__) {
-        if (typeof retVal === 'function') {
-          console.error(
-            'Unexpected return value from a callback ref in %s. ' +
-              'A callback ref should not return a function.',
-            getComponentNameFromFiber(current),
-          );
-        }
-      }
     } else {
       // $FlowFixMe[incompatible-use] unable to narrow type to RefObject
       ref.current = null;
Repository: denoland/deno
Pull request: ci: increase ecosystem tests timeout to 2m

60s is too little for that test repo

Changed files:
filename: tools/ecosystem_compat_tests.ts
patch: @@ -17,7 +17,7 @@ async function runPackageManager(pm: string, cmd: string) {
   const result =
     await $`cd nextjs-demo ; rm -rf node_modules ; ${Deno.execPath()} run -A --no-config npm:${pm} ${cmd}`
       .stdout("inheritPiped").stderr("inheritPiped").noThrow().timeout(
-        "60s",
+        "120s",
       );
   const duration = Date.now() - state;
   return {
Repository: ggml-org/llama.cpp
Pull request: fixed a missing case for transposed copy

This PR should fix https://github.com/ggml-org/llama.cpp/issues/17076. Also added a test case in `test-backend-ops` to capture the bug


Changed files:
filename: ggml/src/ggml-cuda/cpy.cu
patch: @@ -198,16 +198,14 @@ static void ggml_cpy_flt_cuda(
     if (transposed) {
         GGML_ASSERT(ne == ne00*ne01*ne02);  // ne[3] is 1 assumed
         int ne00n, ne01n, ne02n;
-        if (nb00 < nb02) {
+        if (nb00 <= nb02) { // most likely safe to handle nb00 = nb02 case here
             ne00n = ne00;
             ne01n = ne01;
             ne02n = ne02;
         } else if (nb00 > nb02) {
             ne00n = ne00;
             ne01n = ne01*ne02;
             ne02n = 1;
-        } else {
-            GGML_ASSERT(false);
         }
 
         dim3 dimGrid( (ne01n + CUDA_CPY_TILE_DIM_2D - 1) / CUDA_CPY_TILE_DIM_2D,

filename: tests/test-backend-ops.cpp
patch: @@ -6648,6 +6648,7 @@ static std::vector<std::unique_ptr<test_case>> make_test_cases_eval() {
     test_cases.emplace_back(new test_cpy(GGML_TYPE_F16, GGML_TYPE_F16, {256, 4, 1, 1}, {0, 0, 0, 0}, {0, 0, 0, 0}, true));
     test_cases.emplace_back(new test_cpy(GGML_TYPE_F32, GGML_TYPE_F32, {256, 4, 1, 1}, {0, 0, 0, 0}, {0, 0, 0, 0}, true));
     test_cases.emplace_back(new test_cpy(GGML_TYPE_BF16, GGML_TYPE_BF16, {256, 4, 1, 1}, {0, 0, 0, 0}, {0, 0, 0, 0}, true));
+    test_cases.emplace_back(new test_cpy(GGML_TYPE_F32, GGML_TYPE_F32, {256, 1, 4, 1}, {1, 2, 0, 3}, {0, 0, 0, 0}));
 
     test_cases.emplace_back(new test_cont());
     test_cases.emplace_back(new test_cont(GGML_TYPE_F32, {2, 1, 1 ,1}));
Repository: nodejs/node
Pull request: test: replace `.filter()[0]` with `.find()`

Minor adjustment.

Changed files:
filename: test/parallel/test-tick-processor-arguments.js
patch: @@ -16,7 +16,7 @@ tmpdir.refresh();
 spawnSync(process.execPath, [ '--prof', '-p', '42' ], { cwd: tmpdir.path });
 
 const files = fs.readdirSync(tmpdir.path);
-const logfile = files.filter((name) => /\.log$/.test(name))[0];
+const logfile = files.find((name) => /\.log$/.test(name));
 assert(logfile);
 
 // Make sure that the --preprocess argument is passed through correctly,

filename: test/parallel/test-worker-message-port-transfer-fake-js-transferable-internal.js
patch: @@ -13,7 +13,7 @@ const { once } = require('events');
   assert.strictEqual(fh.constructor.name, 'FileHandle');
 
   const kTransfer = Object.getOwnPropertySymbols(Object.getPrototypeOf(fh))
-    .filter((symbol) => symbol.description === 'messaging_transfer_symbol')[0];
+    .find((symbol) => symbol.description === 'messaging_transfer_symbol');
   assert.strictEqual(typeof kTransfer, 'symbol');
   fh[kTransfer] = () => {
     return {

filename: test/parallel/test-worker-message-port-transfer-fake-js-transferable.js
patch: @@ -17,7 +17,7 @@ module.exports = {
   assert.strictEqual(fh.constructor.name, 'FileHandle');
 
   const kTransfer = Object.getOwnPropertySymbols(Object.getPrototypeOf(fh))
-    .filter((symbol) => symbol.description === 'messaging_transfer_symbol')[0];
+    .find((symbol) => symbol.description === 'messaging_transfer_symbol');
   assert.strictEqual(typeof kTransfer, 'symbol');
   fh[kTransfer] = () => {
     return {
Repository: denoland/deno
Pull request: feat(ext/node): implement FileHandle.readLines()

Closes https://github.com/denoland/deno/issues/31104


Also related: https://github.com/denoland/deno/issues/29972 and https://github.com/denoland/deno/issues/25554

Changed files:
filename: ext/node/polyfills/internal/fs/handle.ts
patch: @@ -4,6 +4,8 @@ import { EventEmitter } from "node:events";
 import { Buffer } from "node:buffer";
 import { Mode, promises, read, ReadStream, write, WriteStream } from "node:fs";
 import type { ReadAsyncOptions } from "node:fs";
+import { createInterface } from "node:readline";
+import type { Interface as ReadlineInterface } from "node:readline";
 import { core, primordials } from "ext:core/mod.js";
 export type { BigIntStats, Stats } from "ext:deno_node/_fs/_fs_stat.ts";
 import {
@@ -219,6 +221,13 @@ export class FileHandle extends EventEmitter {
     return new WriteStream(undefined, { ...options, fd: this.fd });
   }
 
+  readLines(options?: CreateReadStreamOptions): ReadlineInterface {
+    return createInterface({
+      input: this.createReadStream({ ...options, autoClose: false }),
+      crlfDelay: Infinity,
+    });
+  }
+
   [SymbolAsyncDispose]() {
     return this.close();
   }

filename: tests/node_compat/config.toml
patch: @@ -455,6 +455,7 @@
 "parallel/test-fs-open-numeric-flags.js" = {}
 "parallel/test-fs-open.js" = {}
 "parallel/test-fs-promises-exists.js" = {}
+"parallel/test-fs-promises-file-handle-readLines.mjs" = {}
 "parallel/test-fs-promises-readfile-empty.js" = {}
 "parallel/test-fs-promisified.js" = {}
 "parallel/test-fs-read-empty-buffer.js" = {}
Repository: ggml-org/llama.cpp
Pull request: CUDA: fix should_use_mmvf for ne11 == 1

See https://github.com/ggml-org/llama.cpp/pull/16988#discussion_r2504160305 .

The logic for preventing misaligned pointers on strides not divisible by the size of the data type is stricter than necessary, ~~for a single column we only need to check the stride of dimension 0~~ the strides in question are for `src0` rather than `src1`, strictly speaking we would need to be checking that tensor too. @am17an can you share the model and command line you had used to test this?

Changed files:
filename: ggml/src/ggml-cuda/mmf.cu
patch: @@ -129,7 +129,13 @@ bool ggml_cuda_should_use_mmf(enum ggml_type type, int cc, int warp_size, const
     if (src0_ne[0] % (warp_size * (4/ts)) != 0) {
         return false;
     }
-    for (size_t i = 0; i < GGML_MAX_DIMS; ++i) {
+
+    if (src0_nb[0] != ts) {
+        return false;
+    }
+
+    // Pointers not aligned to the size of half2/nv_bfloat162/float2 would result in a crash:
+    for (size_t i = 1; i < GGML_MAX_DIMS; ++i) {
         if (src0_nb[i] % (2*ts) != 0) {
             return false;
         }

filename: ggml/src/ggml-cuda/mmvf.cu
patch: @@ -720,12 +720,19 @@ bool ggml_cuda_should_use_mmvf(enum ggml_type type, int cc, const int64_t * src0
     if (src0_ne[0] % 2 != 0) {
         return false;
     }
+
     const size_t ts = ggml_type_size(type);
-    for (size_t i = 0; i < GGML_MAX_DIMS; ++i) {
+    if (src0_nb[0] != ts) {
+        return false;
+    }
+
+    // Pointers not aligned to the size of half2/nv_bfloat162/float2 would result in a crash:
+    for (size_t i = 1; i < GGML_MAX_DIMS; ++i) {
         if (src0_nb[i] % (2*ts) != 0) {
             return false;
         }
     }
+
     switch (type) {
         case GGML_TYPE_F32:
             if (GGML_CUDA_CC_IS_NVIDIA(cc)) {
Repository: huggingface/transformers
Pull request: Add bfloat16 support detection for MPS in is_torch_bf16_gpu_available()

Add `bfloat16` support detection for MPS (Apple Silicon) in `is_torch_bf16_gpu_available()`

# What does this PR do?

Makes sure to allow it and not throw on `bf16` usage with "Your setup doesn't support bf16/gpu." from `TrainingArguments`.

### Why?
`bfloat16` has been supported for a few years now in Metal [1](https://www.reddit.com/r/LocalLLaMA/comments/14pz4v0/apples_metal_is_getting_bfloat16_support/) and torch.mps [1](https://github.com/pytorch/pytorch/issues/150121) [2](https://github.com/pytorch/pytorch/issues/141864).

**IMPORTANT**! On Apple M1 and M2 bfloat16 is emulated in software _(by Apple's Metal framework)_ using float32 for hardware instead, meaning there is no performance benefit, so on a M1 or M2 you should rather use float16 or float32.




Changed files:
filename: src/transformers/utils/import_utils.py
patch: @@ -636,6 +636,9 @@ def is_torch_bf16_gpu_available() -> bool:
         return True
     if is_torch_npu_available():
         return torch.npu.is_bf16_supported()
+    if is_torch_mps_available():
+        # Note: Emulated in software by Metal using fp32 for hardware without native support (like M1/M2)
+        return torch.backends.mps.is_macos_or_newer(14, 0)
     return False