helloadhavan/github_issues huggingface dataset:
Repository: electron/electron
Pull request: fix: set `XDG_CURRENT_DESKTOP` env var back to original value before invoking xdg utils

Backport of #45310

See that PR for details.


Notes: Fixed `electron.shell.openExternal` and `electron.shell.openPath` to honor user-defined system defaults on Linux


Changed files:
filename: shell/common/platform_util_linux.cc
patch: @@ -13,6 +13,7 @@
 
 #include "base/cancelable_callback.h"
 #include "base/containers/contains.h"
+#include "base/containers/map_util.h"
 #include "base/environment.h"
 #include "base/files/file_util.h"
 #include "base/files/scoped_file.h"
@@ -55,6 +56,8 @@ const char kFreedesktopPortalName[] = "org.freedesktop.portal.Desktop";
 const char kFreedesktopPortalPath[] = "/org/freedesktop/portal/desktop";
 const char kFreedesktopPortalOpenURI[] = "org.freedesktop.portal.OpenURI";
 
+const char kOriginalXdgCurrentDesktopEnvVar[] = "ORIGINAL_XDG_CURRENT_DESKTOP";
+
 const char kMethodOpenDirectory[] = "OpenDirectory";
 
 class ShowItemHelper {
@@ -279,6 +282,12 @@ bool XDGUtil(const std::vector<std::string>& argv,
     base::nix::CreateLaunchOptionsWithXdgActivation(base::BindOnce(
         [](base::RepeatingClosure quit_loop, base::LaunchOptions* options_out,
            base::LaunchOptions options) {
+          // Correct the XDG_CURRENT_DESKTOP environment variable before calling
+          // XDG, in case it was changed for compatibility.
+          if (const auto* orig = base::FindOrNull(
+                  options.environment, kOriginalXdgCurrentDesktopEnvVar))
+            options.environment.emplace(base::nix::kXdgCurrentDesktopEnvVar,
+                                        *orig);
           *options_out = std::move(options);
           std::move(quit_loop).Run();
         },
Repository: facebook/react
Pull request: Add issue template for React Compiler

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):
* __->__ #29140

Adds a GitHub issue template form so we can automatically categorize
issues and get more information upfront. I mostly referenced the
DevTools bug report template and made some tweaks.

Changed files:
filename: .github/ISSUE_TEMPLATE/compiler_bug_report.yml
patch: @@ -7,7 +7,7 @@ body:
   attributes:
     label: What kind of issue is this?
     description: |
-      Please indicate if this issue affects the following tools provided by React Compiler
+      Please indicate if this issue affects the following tools provided by React Compiler.
     options:
       - label: React Compiler core (the JS output is incorrect, or your app works incorrectly after optimization)
       - label: babel-plugin-react-compiler (build issue installing or using the Babel plugin)
@@ -17,7 +17,7 @@ body:
   attributes:
     label: Link to repro
     description: |
-      Please provide a repro by either sharing a [Playground link](https://playground.react.dev), or a public GitHub repo so the React team can reproduce the error being reported. (Please no localhost URLs.)
+      Please provide a repro by either sharing a [Playground link](https://playground.react.dev), or a public GitHub repo so the React team can reproduce the error being reported. Please do not share localhost links!
     placeholder: |
       e.g. public GitHub repo, or Playground link
   validations:
Repository: nodejs/node
Pull request: build: remove config.status under `make distclean`

refs: #21371

Changed files:
filename: Makefile
patch: @@ -220,7 +220,7 @@ testclean: ## Remove test artifacts.
 distclean: ## Remove all build and test artifacts.
 	$(RM) -r out
 	$(RM) config.gypi icu_config.gypi
-	$(RM) config.mk
+	$(RM) config.mk config.status
 	$(RM) -r $(NODE_EXE) $(NODE_G_EXE)
 	$(RM) -r node_modules
 	$(RM) -r deps/icu
Repository: ollama/ollama
Pull request: windows CUDA support

Fix #403 
- Support cuda build in Windows
- Import "containerd/console" lib to support colorful output in Windows terminal

![image](https://github.com/jmorganca/ollama/assets/558657/0018234e-e61c-4c55-a627-dd667ffbbbdf)


Changed files:
filename: .gitignore
patch: @@ -7,3 +7,4 @@ dist
 ollama
 ggml-metal.metal
 .cache
+*.exe

filename: llm/llama.cpp/generate_windows.go
patch: @@ -14,3 +14,11 @@ package llm
 //go:generate cmake -S gguf -B gguf/build/cpu -DLLAMA_K_QUANTS=on -DLLAMA_NATIVE=off -DLLAMA_AVX=on -DLLAMA_AVX2=off -DLLAMA_AVX512=off -DLLAMA_FMA=off -DLLAMA_F16C=off
 //go:generate cmake --build gguf/build/cpu --target server --config Release
 //go:generate cmd /c move gguf\build\cpu\bin\Release\server.exe gguf\build\cpu\bin\Release\ollama-runner.exe
+
+//go:generate cmake -S ggml -B ggml/build/cuda -DLLAMA_CUBLAS=on -DLLAMA_ACCELERATE=on -DLLAMA_K_QUANTS=on
+//go:generate cmake --build ggml/build/cuda --target server --config Release
+//go:generate cmd /c move ggml\build\cuda\bin\Release\server.exe ggml\build\cuda\bin\Release\ollama-runner.exe
+
+//go:generate cmake -S gguf -B gguf/build/cuda -DLLAMA_CUBLAS=on -DLLAMA_ACCELERATE=on -DLLAMA_K_QUANTS=on -DLLAMA_NATIVE=off -DLLAMA_AVX=on -DLLAMA_AVX2=off -DLLAMA_AVX512=off -DLLAMA_FMA=off -DLLAMA_F16C=off
+//go:generate cmake --build gguf/build/cuda --target server --config Release
+//go:generate cmd /c move gguf\build\cuda\bin\Release\server.exe gguf\build\cuda\bin\Release\ollama-runner.exe

filename: llm/llama.go
patch: @@ -84,6 +84,7 @@ func chooseRunners(workDir, runnerType string) []ModelRunner {
 	case "windows":
 		// TODO: select windows GPU runner here when available
 		runners = []ModelRunner{
+			{Path: path.Join(buildPath, "cuda", "bin", "Release", "ollama-runner.exe"), Accelerated: true},
 			{Path: path.Join(buildPath, "cpu", "bin", "Release", "ollama-runner.exe")},
 		}
 	default:
@@ -269,7 +270,7 @@ func NumGPU(numLayer, fileSizeBytes int64, opts api.Options) int {
 	if opts.NumGPU != -1 {
 		return opts.NumGPU
 	}
-	if runtime.GOOS == "linux" {
+	if runtime.GOOS == "linux" || runtime.GOOS == "windows" {
 		freeBytes, err := CheckVRAM()
 		if err != nil {
 			if !errors.Is(err, errNvidiaSMI) {
Repository: ollama/ollama
Pull request: exponential back-off

Exponential back-off on concurrent slot failure.

Changed files:
filename: llm/llama.go
patch: @@ -545,8 +545,7 @@ type prediction struct {
 }
 
 const maxBufferSize = 512 * format.KiloByte
-const maxRetries = 3
-const retryDelay = 1 * time.Second
+const maxRetries = 6
 
 type PredictOpts struct {
 	Prompt           string
@@ -610,9 +609,11 @@ func (llm *llama) Predict(ctx context.Context, predict PredictOpts, fn func(Pred
 		request["grammar"] = jsonGrammar
 	}
 
+	retryDelay := 100 * time.Microsecond
 	for retries := 0; retries < maxRetries; retries++ {
 		if retries > 0 {
 			time.Sleep(retryDelay) // wait before retrying
+			retryDelay *= 2        // exponential backoff
 		}
 
 		// Handling JSON marshaling with special characters unescaped.
Repository: ggml-org/llama.cpp
Pull request: ggml-cpu : use template for argsort

This can make a significant difference for large arrays.

```
  Device description: 13th Gen Intel(R) Core(TM) i9-13900K
  Device memory: 175085 MB (175085 MB free)

PR:
  ARGSORT(type=f32,ne=[65000,16,1,1],order=0):                  1033 runs -  4128.78 us/run -     8125 kB/run -    1.88 GB/s

master:
  ARGSORT(type=f32,ne=[65000,16,1,1],order=0):                  1033 runs -  7251.82 us/run -     8125 kB/run -    1.07 GB/s
```

Changed files:
filename: ggml/src/ggml-cpu/ops.cpp
patch: @@ -7665,6 +7665,18 @@ void ggml_compute_forward_timestep_embedding(
 
 // ggml_compute_forward_argsort
 
+template<enum ggml_sort_order order>
+struct argsort_cmp {
+    const float * data;
+    bool operator()(int32_t a, int32_t b) const {
+        if constexpr (order == GGML_SORT_ORDER_ASC) {
+            return data[a] < data[b];
+        } else {
+            return data[a] > data[b];
+        }
+    }
+};
+
 static void ggml_compute_forward_argsort_f32(
     const ggml_compute_params * params,
     ggml_tensor * dst) {
@@ -7691,16 +7703,18 @@ static void ggml_compute_forward_argsort_f32(
             dst_data[j] = j;
         }
 
-        std::function<bool(int32_t, int32_t)> cmp;
-
-        // note: this might be causing memory allocations? ideally should be avoided if it's the case
         switch (order) {
-            case GGML_SORT_ORDER_ASC:  cmp = [src_data](int32_t a, int32_t b) { return src_data[a] < src_data[b]; }; break;
-            case GGML_SORT_ORDER_DESC: cmp = [src_data](int32_t a, int32_t b) { return src_data[a] > src_data[b]; }; break;
-            default: GGML_ABORT("invalid sort order");
-        }
+            case GGML_SORT_ORDER_ASC:
+                std::sort(dst_data, dst_data + ne0, argsort_cmp<GGML_SORT_ORDER_ASC>{src_data});
+                break;
 
-        std::sort(dst_data, dst_data + ne0, cmp);
+            case GGML_SORT_ORDER_DESC:
+                std::sort(dst_data, dst_data + ne0, argsort_cmp<GGML_SORT_ORDER_DESC>{src_data});
+                break;
+
+            default:
+                GGML_ABORT("invalid sort order");
+        }
     }
 }
 

filename: tests/test-backend-ops.cpp
patch: @@ -7631,6 +7631,8 @@ static std::vector<std::unique_ptr<test_case>> make_test_cases_perf() {
         test_cases.emplace_back(new test_sum(GGML_TYPE_F32, it));
     }
 
+    test_cases.emplace_back(new test_argsort(GGML_TYPE_F32, {65000, 16, 1, 1}));
+
     return test_cases;
 }
Repository: huggingface/transformers
Pull request: feat(serve): add healthcheck test

Adding a test to make sure we don't remove the healthcheck endpoint

Changed files:
filename: tests/commands/test_serving.py
patch: @@ -710,3 +710,29 @@ def test_full_request(self):
                 "As an AI language model, I am designed to assist with various tasks and provide information on different topics related to sports."
             )
         )
+
+
+class ServeInfrastructureTest(unittest.TestCase):
+    @classmethod
+    def setUpClass(cls):
+        cls.port = 8042
+        args = ServeArguments(port=cls.port)
+        serve_command = ServeCommand(args)
+        thread = Thread(target=serve_command.run)
+        thread.daemon = True
+        thread.start()
+
+    def test_healthcheck(self):
+        """Tests that the healthcheck endpoint works."""
+        response = None
+        retries = 10
+        while retries > 0:
+            try:
+                response = requests.get(f"http://localhost:{self.port}/health")
+                break
+            except requests.exceptions.ConnectionError:
+                time.sleep(0.1)
+                retries -= 1
+        self.assertIsNotNone(response, "Failed to connect to the server health endpoint.")
+        self.assertEqual(response.status_code, 200)
+        self.assertEqual(response.json(), {"status": "ok"})
Repository: denoland/deno
Pull request: test: fix `utimeSyncFileSuccess` in `js_unit_test::worker_test`

`../testdata/workers/worker_types.ts` didn't even exist, causing the test to fail.

See #30770

Changed files:
filename: tests/unit/worker_test.ts
patch: @@ -15,7 +15,7 @@ Deno.test(
   { permissions: { read: true } },
   function utimeSyncFileSuccess() {
     const w = new Worker(
-      resolveWorker("worker_types.ts"),
+      resolveWorker("test_worker.js"),
       { type: "module" },
     );
     assert(w);
Repository: ollama/ollama
Pull request: Fix Readme "Database -> MindsDB" link

This pull request fixes markdown ("MindsDB" link in Readme)

Changed files:
filename: README.md
patch: @@ -256,7 +256,7 @@ See the [API documentation](./docs/api.md) for all endpoints.
 
 ### Database
 
-- [MindsDB] (https://github.com/mindsdb/mindsdb/blob/staging/mindsdb/integrations/handlers/ollama_handler/README.md)
+- [MindsDB](https://github.com/mindsdb/mindsdb/blob/staging/mindsdb/integrations/handlers/ollama_handler/README.md)
   
 ### Package managers
Repository: denoland/deno
Pull request: ci: fix 'promote_to_release' script for windows

Closes https://github.com/denoland/deno/issues/31320

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

## Release Notes

* **Chores**
  * Streamlined Windows binary handling during the release process with simplified artifact naming and optimized binary patching workflow.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Changed files:
filename: .github/workflows/promote_to_release.yml
patch: @@ -66,7 +66,7 @@ jobs:
           trusted-signing-account-name: deno-cli-code-signing
           certificate-profile-name: deno-cli-code-signing-cert
           files-folder: .
-          files-folder-filter: deno-x86_64-pc-windows-msvc-${{github.event.inputs.releaseKind}}.exe
+          files-folder-filter: deno.exe
           file-digest: SHA256
           timestamp-rfc3161: http://timestamp.acs.microsoft.com
           timestamp-digest: SHA256
@@ -83,12 +83,12 @@ jobs:
         run: |
           $SignTool = Get-ChildItem -Path "C:\Program Files*\Windows Kits\*\bin\*\x64\signtool.exe" -Recurse -ErrorAction SilentlyContinue | Select-Object -First 1
           $SignToolPath = $SignTool.FullName
-          & $SignToolPath verify /pa /v "deno-x86_64-pc-windows-msvc-${{github.event.inputs.releaseKind}}.exe"
+          & $SignToolPath verify /pa /v "deno.exe"
 
       - name: Create archives
         run: |
-          Compress-Archive -Path "deno-x86_64-pc-windows-msvc-${{github.event.inputs.releaseKind}}.exe" -DestinationPath "deno-x86_64-pc-windows-msvc.zip" -Force
-          Compress-Archive -Path "denort-x86_64-pc-windows-msvc-${{github.event.inputs.releaseKind}}.exe" -DestinationPath "denort-x86_64-pc-windows-msvc.zip" -Force
+          Compress-Archive -Path "deno.exe" -DestinationPath "deno-x86_64-pc-windows-msvc.zip" -Force
+          Compress-Archive -Path "denort.exe" -DestinationPath "denort-x86_64-pc-windows-msvc.zip" -Force
 
       - name: Upload Windows archives
         uses: actions/upload-artifact@v4

filename: tools/release/promote_to_release_windows.ts
patch: @@ -15,15 +15,12 @@ const BINARIES = ["deno.exe", "denort.exe"];
 async function patchBinary(inputPath: string, channel: string) {
   console.log(`Patching ${inputPath}...`);
 
-  const input = await Deno.readFile(inputPath);
+  await Deno.rename(inputPath, `${inputPath}.bak`);
+  const input = await Deno.readFile(`${inputPath}.bak`);
   const output = patchver(input, channel);
 
-  // Extract filename without extension and create output name
-  const baseName = inputPath.replace(/\.exe$/, "");
-  const outputPath = `${baseName}-x86_64-pc-windows-msvc-${channel}.exe`;
-
-  await Deno.writeFile(outputPath, output);
-  console.log(`Created ${outputPath}`);
+  await Deno.writeFile(inputPath, output);
+  console.log(`Created ${inputPath}`);
 }
 
 async function main() {
Repository: nodejs/node
Pull request: doc: add RafaelGSS as steward July 25

As titled

Changed files:
filename: doc/contributing/security-release-process.md
patch: @@ -37,6 +37,7 @@ The current security stewards are documented in the main Node.js
 | NodeSource   | Rafael          | 2024-Jul-08  |
 | NodeSource   | Rafael          | 2025-Jan-21  |
 | NodeSource   | Rafael          | 2025-May-14  |
+| NodeSource   | Rafael          | 2025-July-15 |
 | Datadog      | Bryan           |              |
 | IBM          | Joe             |              |
 | Platformatic | Matteo          |              |
Repository: ollama/ollama
Pull request: Update README.md

Adding integration to databases section

Changed files:
filename: README.md
patch: @@ -254,6 +254,10 @@ See the [API documentation](./docs/api.md) for all endpoints.
 - [gptel Emacs client](https://github.com/karthink/gptel)
 - [Oatmeal](https://github.com/dustinblackman/oatmeal)
 
+### Database
+
+- [MindsDB] (https://github.com/mindsdb/mindsdb/blob/staging/mindsdb/integrations/handlers/ollama_handler/README.md)
+  
 ### Package managers
 
 - [Pacman](https://archlinux.org/packages/extra/x86_64/ollama/)
Repository: denoland/deno
Pull request: fix(ext/node): sqlite `setAllowUnknownNamedParameters` error message

Allows https://github.com/nodejs/node/blob/v24.2.0/test/parallel/test-sqlite-named-parameters.js to pass.

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

* **Bug Fixes**
  * Corrected an error message for SQLite named parameters validation to display the expected parameter name accurately.

* **Tests**
  * Added new test coverage for SQLite named parameters functionality.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Changed files:
filename: ext/node/ops/sqlite/validators.rs
patch: @@ -110,7 +110,7 @@ pub(super) fn allow_unknown_named_params_bool(
   }
 
   Err(Error::InvalidArgType(
-    "The \"allowUnknownNamedParameters\" argument must be a boolean.",
+    "The \"enabled\" argument must be a boolean.",
   ))
 }
 

filename: tests/node_compat/config.toml
patch: @@ -973,6 +973,7 @@
 "parallel/test-source-map-enable.js" = {}
 "parallel/test-sqlite-data-types.js" = {}
 "parallel/test-sqlite-database-sync-dispose.js" = {}
+"parallel/test-sqlite-named-parameters.js" = {}
 "parallel/test-sqlite-session.js" = {}
 "parallel/test-sqlite-transactions.js" = {}
 "parallel/test-sqlite-typed-array-and-data-view.js" = {}
Repository: facebook/react
Pull request: Lazily freeze in case anything in the currently initializing chunk is blocked

Fixed #29129.


Changed files:
filename: packages/react-client/src/ReactFlightClient.js
patch: @@ -641,7 +641,12 @@ function createElement(
     }
     // TODO: We should be freezing the element but currently, we might write into
     // _debugInfo later. We could move it into _store which remains mutable.
-    Object.freeze(element.props);
+    if (initializingChunkBlockedModel !== null) {
+      const freeze = Object.freeze.bind(Object, element.props);
+      initializingChunk.then(freeze, freeze);
+    } else {
+      Object.freeze(element.props);
+    }
   }
   return element;
 }

filename: packages/react-server-dom-webpack/src/__tests__/ReactFlightDOMBrowser-test.js
patch: @@ -198,6 +198,55 @@ describe('ReactFlightDOMBrowser', () => {
     });
   });
 
+  it('should resolve client components (with async chunks) when referenced in props', async () => {
+    let resolveClientComponentChunk;
+
+    const ClientOuter = clientExports(function ClientOuter({
+      Component,
+      children,
+    }) {
+      return <Component>{children}</Component>;
+    });
+
+    const ClientInner = clientExports(
+      function ClientInner({children}) {
+        return <span>{children}</span>;
+      },
+      '42',
+      '/test.js',
+      new Promise(resolve => (resolveClientComponentChunk = resolve)),
+    );
+
+    function Server() {
+      return <ClientOuter Component={ClientInner}>Hello, World!</ClientOuter>;
+    }
+
+    const stream = ReactServerDOMServer.renderToReadableStream(
+      <Server />,
+      webpackMap,
+    );
+
+    function ClientRoot({response}) {
+      return use(response);
+    }
+
+    const response = ReactServerDOMClient.createFromReadableStream(stream);
+    const container = document.createElement('div');
+    const root = ReactDOMClient.createRoot(container);
+
+    await act(() => {
+      root.render(<ClientRoot response={response} />);
+    });
+
+    expect(container.innerHTML).toBe('');
+
+    await act(() => {
+      resolveClientComponentChunk();
+    });
+
+    expect(container.innerHTML).toBe('<span>Hello, World!</span>');
+  });
+
   it('should progressively reveal server components', async () => {
     let reportedErrors = [];
 

filename: packages/react-server-dom-webpack/src/__tests__/utils/WebpackMock.js
patch: @@ -69,10 +69,15 @@ exports.clientExports = function clientExports(
   moduleExports,
   chunkId,
   chunkFilename,
+  blockOnChunk,
 ) {
   const chunks = [];
   if (chunkId) {
     chunks.push(chunkId, chunkFilename);
+
+    if (blockOnChunk) {
+      webpackChunkMap[chunkId] = blockOnChunk;
+    }
   }
   const idx = '' + webpackModuleIdx++;
   webpackClientModules[idx] = moduleExports;
Repository: nodejs/node
Pull request: doc: clarify ERR_FS_FILE_TOO_LARGE explanation to reflect fs.readFile() I/O limit

Fix: clarify ERR_FS_FILE_TOO_LARGE message to reflect fs.readFile() I/O limit

The error previously suggested the issue might be due to Buffer limitations,
but in fact it's an internal constraint of fs.readFile(). Updated the
documentation to avoid confusion and guide users toward fs.createReadStream()
for large files.

ref #55864 


<!--
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/errors.md
patch: @@ -1362,8 +1362,10 @@ Path is a directory.
 
 ### `ERR_FS_FILE_TOO_LARGE`
 
-An attempt has been made to read a file whose size is larger than the maximum
-allowed size for a `Buffer`.
+An attempt was made to read a file larger than the supported 2 GiB limit for
+`fs.readFile()`. This is not a limitation of `Buffer`, but an internal I/O constraint.
+For handling larger files, consider using `fs.createReadStream()` to read the
+file in chunks.
 
 <a id="ERR_FS_WATCH_QUEUE_OVERFLOW"></a>
Repository: huggingface/transformers
Pull request: Fetch one missing test data

# What does this PR do?

It was missed .. 

Changed files:
filename: tests/test_processing_common.py
patch: @@ -332,7 +332,9 @@ def test_processor_text_has_no_visual(self):
                             {"type": "text", "text": "What is the capital of France?"},
                             {
                                 "type": "image",
-                                "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/coco_sample.png",
+                                "url": url_to_local_path(
+                                    "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/coco_sample.png"
+                                ),
                             },
                         ],
                     },