helloadhavan/github_issues huggingface dataset:
Repository: vercel/next.js
Pull request: Update Rspack production test manifest

This auto-generated PR updates the production integration test manifest used when testing Rspack.

Changed files:
filename: test/rspack-build-tests-manifest.json
patch: @@ -1777,6 +1777,15 @@
     "flakey": [],
     "runtimeError": false
   },
+  "test/e2e/app-dir/cache-components-errors/cache-components-console-patch.test.ts": {
+    "passed": [
+      "Cache Components Errors Sync IO in console methods Console Patching does not fail the build for Sync IO if console.log is patched to call new Date() internally"
+    ],
+    "failed": [],
+    "pending": [],
+    "flakey": [],
+    "runtimeError": false
+  },
   "test/e2e/app-dir/cache-components-errors/cache-components-errors.module-scope.test.ts": {
     "passed": [
       "Lazy Module Init should build statically even if module scope uses sync APIs like current time and random"
@@ -7018,6 +7027,20 @@
     "flakey": [],
     "runtimeError": false
   },
+  "test/e2e/app-dir/trace-build-file/trace-build-file.test.ts": {
+    "passed": [
+      "trace-build-file should contain high-level build trace events",
+      "trace-build-file should create .next/trace-build file during production build",
+      "trace-build-file should have consistent traceId across all events",
+      "trace-build-file should have next-build as root span with proper hierarchy",
+      "trace-build-file should only contain allowlisted events",
+      "trace-build-file should work with basic page rendering"
+    ],
+    "failed": [],
+    "pending": [],
+    "flakey": [],
+    "runtimeError": false
+  },
   "test/e2e/app-dir/trailingslash/trailingslash.test.ts": {
     "passed": [
       "app-dir trailingSlash handling should contain trailing slash to canonical url",
@@ -21062,10 +21085,11 @@
   },
   "test/production/pnpm-support/index.test.ts": {
     "passed": [
-      "pnpm support should build with dependencies installed via pnpm",
+      "pnpm support should build with dependencies installed via pnpm"
+    ],
+    "failed": [
       "pnpm support should execute client-side JS on each page in output: \"standalone\""
     ],
-    "failed": [],
     "pending": [],
     "flakey": [],
     "runtimeError": false
Repository: facebook/react
Pull request: [prettier] Combine compiler and runtime configs

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):
* #30028
* #30026
* #30025
* #30024
* #30023
* #30022
* __->__ #30021

Merges the existing config to the root one so we can have a single
configuration file. I've tried to keep the compiler config as much as
possible in this PR so that no formatting changes occur.

Changed files:
filename: scripts/prettier/index.js
patch: @@ -56,10 +56,9 @@ const files = glob
       '**/*.d.ts',
       '**/node_modules/**',
       '**/cjs/**',
-      'packages/**/*.ts',
-      'compiler/**/node_modules/**',
-      'compiler/**/dist/**',
-      'compiler/**/__snapshots__/**',
+      '**/dist/**',
+      '**/__snapshots__/**',
+      'packages/**/*.ts', // runtime prettier uses Flow parser
       ...ignoredPathsListedInPrettierIgnoreInGlobFormat,
     ],
   })
Repository: facebook/react
Pull request: [compiler:codegen] Wrap non-ascii characters in JsxExpressionContainer

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

This PR extends the previous logic added in #29141 to also account for
other kinds of non-ascii characters such as `\n`. Because these control
characters are individual special characters (and not 2 characters `\`
and `n`) we match based on unicode which was already being checked for
non-Latin characters.

This allows control characters to continue to be compiled equivalently
to its original source if it was provided in a JsxExpressionContainer.
However note that this PR does not convert JSX attributes that are
StringLiterals to JsxExpressionContainer, to preserve the original
source code as it was written.

Alternatively we could always emit a JsxExpressionContainer if it was
used in the source and not try to down level it to some other node
kind. But since we already do this I opted to keep this behavior.

Partially addresses #29648.

Changed files:
filename: compiler/apps/playground/components/Editor/Output.tsx
patch: @@ -104,7 +104,7 @@ async function tabify(source: string, compilerOutput: CompilerOutput) {
       passName,
       <TextTabContent
         output={text}
-        diff={lastPassOutput ?? null}
+        diff={passName !== "HIR" ? lastPassOutput : null}
         showInfoPanel={true}
       ></TextTabContent>
     );
@@ -195,7 +195,7 @@ function Output({ store, compilerOutput }: Props) {
       if (result.kind === "hir" || result.kind === "reactive") {
         currResult += `function ${result.fnName}\n\n${result.value}`;
       }
-      if (currResult !== lastResult) {
+      if (passName !== "HIR" && currResult !== lastResult) {
         changedPasses.add(passName);
       }
       lastResult = currResult;

filename: scripts/rollup/build.js
patch: @@ -85,9 +85,11 @@ function parseRequestedNames(names, toCase) {
   return result;
 }
 
+const argvType = Array.isArray(argv.type) ? argv.type : [argv.type];
 const requestedBundleTypes = argv.type
-  ? parseRequestedNames([argv.type], 'uppercase')
+  ? parseRequestedNames(argvType, 'uppercase')
   : [];
+
 const requestedBundleNames = parseRequestedNames(argv._, 'lowercase');
 const forcePrettyOutput = argv.pretty;
 const isWatchMode = argv.watch;
@@ -528,8 +530,8 @@ function shouldSkipBundle(bundle, bundleType) {
     return true;
   }
   if (requestedBundleTypes.length > 0) {
-    const isAskingForDifferentType = requestedBundleTypes.every(
-      requestedType => bundleType.indexOf(requestedType) === -1
+    const isAskingForDifferentType = requestedBundleTypes.some(
+      requestedType => !bundleType.includes(requestedType)
     );
     if (isAskingForDifferentType) {
       return true;
Repository: denoland/deno
Pull request: fix(ext/sqlite): double free of Session after database closed


Changed files:
filename: ext/node/ops/sqlite/session.rs
patch: @@ -112,6 +112,9 @@ impl Session {
     }
 
     self.freed.set(true);
+    if self.db.borrow().is_none() {
+      return Ok(());
+    }
     // Safety: `self.inner` is a valid session. double free is
     // prevented by `freed` flag.
     unsafe {
Repository: ollama/ollama
Pull request: Ensure the libraries are present

When we store our libraries in a temp dir, a reaper might clean them when we are idle, so make sure to check for them before we reload.

Changed files:
filename: llm/llm.go
patch: @@ -120,15 +120,15 @@ func New(workDir, model string, adapters, projectors []string, opts api.Options)
 
 	opts.RopeFrequencyBase = 0.0
 	opts.RopeFrequencyScale = 0.0
-	return newLlmServer(info, model, adapters, projectors, opts)
+	return newLlmServer(info, workDir, model, adapters, projectors, opts)
 }
 
 // Give any native cgo implementations an opportunity to initialize
 func Init(workdir string) error {
 	return nativeInit(workdir)
 }
 
-func newLlmServer(gpuInfo gpu.GpuInfo, model string, adapters, projectors []string, opts api.Options) (LLM, error) {
+func newLlmServer(gpuInfo gpu.GpuInfo, workDir, model string, adapters, projectors []string, opts api.Options) (LLM, error) {
 	dynLibs := getDynLibs(gpuInfo)
 
 	// Check to see if the user has requested a specific library instead of auto-detecting
@@ -143,6 +143,16 @@ func newLlmServer(gpuInfo gpu.GpuInfo, model string, adapters, projectors []stri
 		}
 	}
 
+	// We stage into a temp directory, and if we've been idle for a while, it may have been reaped
+	_, err := os.Stat(dynLibs[0])
+	if err != nil {
+		slog.Info(fmt.Sprintf("%s has disappeared, reloading libraries", dynLibs[0]))
+		err = nativeInit(workDir)
+		if err != nil {
+			return nil, err
+		}
+	}
+
 	err2 := fmt.Errorf("unable to locate suitable llm library")
 	for _, dynLib := range dynLibs {
 		srv, err := newDynExtServer(dynLib, model, adapters, projectors, opts)
Repository: ggml-org/llama.cpp
Pull request: common : throttle download progress output to reduce IO flush

This change limits progress updates to approximately every 0.1% of the file size to minimize stdio overhead.

Also fixes compiler warnings regarding `__func__` in lambdas.

Changed files:
filename: common/download.cpp
patch: @@ -517,36 +517,43 @@ static bool common_pull_file(httplib::Client & cli,
         headers.emplace("Range", "bytes=" + std::to_string(existing_size) + "-");
     }
 
-    std::atomic<size_t> downloaded{existing_size};
+    const char * func = __func__; // avoid __func__ inside a lambda
+    size_t downloaded = existing_size;
+    size_t progress_step = 0;
 
     auto res = cli.Get(resolve_path, headers,
         [&](const httplib::Response &response) {
             if (existing_size > 0 && response.status != 206) {
-                LOG_WRN("%s: server did not respond with 206 Partial Content for a resume request. Status: %d\n", __func__, response.status);
+                LOG_WRN("%s: server did not respond with 206 Partial Content for a resume request. Status: %d\n", func, response.status);
                 return false;
             }
             if (existing_size == 0 && response.status != 200) {
-                LOG_WRN("%s: download received non-successful status code: %d\n", __func__, response.status);
+                LOG_WRN("%s: download received non-successful status code: %d\n", func, response.status);
                 return false;
             }
             if (total_size == 0 && response.has_header("Content-Length")) {
                 try {
                     size_t content_length = std::stoull(response.get_header_value("Content-Length"));
                     total_size = existing_size + content_length;
                 } catch (const std::exception &e) {
-                    LOG_WRN("%s: invalid Content-Length header: %s\n", __func__, e.what());
+                    LOG_WRN("%s: invalid Content-Length header: %s\n", func, e.what());
                 }
             }
             return true;
         },
         [&](const char *data, size_t len) {
             ofs.write(data, len);
             if (!ofs) {
-                LOG_ERR("%s: error writing to file: %s\n", __func__, path_tmp.c_str());
+                LOG_ERR("%s: error writing to file: %s\n", func, path_tmp.c_str());
                 return false;
             }
             downloaded += len;
-            print_progress(downloaded, total_size);
+            progress_step += len;
+
+            if (progress_step >= total_size / 1000 || downloaded == total_size) {
+                print_progress(downloaded, total_size);
+                progress_step = 0;
+            }
             return true;
         },
         nullptr
Repository: nodejs/node
Pull request: doc: fix grammar in global dispatcher usage

Add missing preposition "by" to clarify how to change the global dispatcher.

<!--
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/globals.md
patch: @@ -537,7 +537,7 @@ The dispatcher must be compatible with `undici`'s
 fetch(url, { dispatcher: new MyAgent() });
 ```
 
-It is possible to change the global dispatcher in Node.js installing `undici` and using
+It is possible to change the global dispatcher in Node.js by installing `undici` and using
 the `setGlobalDispatcher()` method. Calling this method will affect both `undici` and
 Node.js.
Repository: facebook/react
Pull request: www: remove dynamic scheduler feature flag: enableProfiling


I removed the wrong feature flag in #29995, this is the correct one to match D58682445.


Changed files:
filename: packages/scheduler/src/forks/SchedulerFeatureFlags.www-dynamic.js
patch: @@ -11,8 +11,6 @@
 // Use __VARIANT__ to simulate a GK. The tests will be run twice: once
 // with the __VARIANT__ set to `true`, and once set to `false`.
 
-export const enableProfiling = __VARIANT__;
-
 export const userBlockingPriorityTimeout = 250;
 export const normalPriorityTimeout = 5000;
 export const lowPriorityTimeout = 10000;

filename: packages/scheduler/src/forks/SchedulerFeatureFlags.www.js
patch: @@ -10,8 +10,6 @@
 // $FlowFixMe[cannot-resolve-module]
 const dynamicFeatureFlags = require('SchedulerFeatureFlags');
 
-const {enableProfiling: enableProfilingFeatureFlag} = dynamicFeatureFlags;
-
 export const {
   userBlockingPriorityTimeout,
   normalPriorityTimeout,
@@ -20,5 +18,4 @@ export const {
 
 export const frameYieldMs = 10;
 export const enableSchedulerDebugging = true;
-export const enableProfiling: boolean =
-  __PROFILE__ && enableProfilingFeatureFlag;
+export const enableProfiling = __DEV__;
Repository: ggml-org/llama.cpp
Pull request: vulkan : fix FA mask load with bounds check (coopmat2)

Bug was caused by variable shadowing in flash_attn_cm2, introduced in #17186

It was only observable with coopmat2 and `GGML_KQ_MASK_PAD=1`

Repro:
1. modify `ggml.h` and set `GGML_KQ_MASK_PAD 1`
2. run `test-backend-ops-o FLASH_ATTN_EXT`

Changed files:
filename: ggml/src/ggml-vulkan/vulkan-shaders/flash_attn_cm2.comp
patch: @@ -156,7 +156,7 @@ void main() {
                 tensorLayoutM = setTensorLayoutStrideNV(tensorLayoutM, m_stride, 1);
                 tensorLayoutM = setTensorLayoutClampValueNV(tensorLayoutM, 0xfc00); // -inf in float16_t
 
-                coopmat<float16_t, gl_ScopeWorkgroup, Br, Bc, gl_MatrixUseAccumulator> mv, mvmax;
+                coopmat<float16_t, gl_ScopeWorkgroup, Br, Bc, gl_MatrixUseAccumulator> mvmax;
 
                 coopMatLoadTensorNV(mv, data_m, m_offset, sliceTensorLayoutNV(tensorLayoutM, i * Br, Br, j * Bc, Bc));
Repository: vercel/next.js
Pull request: Update Rspack production test manifest

This auto-generated PR updates the production integration test manifest used when testing Rspack.

Changed files:
filename: test/rspack-build-tests-manifest.json
patch: @@ -21062,11 +21062,10 @@
   },
   "test/production/pnpm-support/index.test.ts": {
     "passed": [
-      "pnpm support should build with dependencies installed via pnpm"
-    ],
-    "failed": [
+      "pnpm support should build with dependencies installed via pnpm",
       "pnpm support should execute client-side JS on each page in output: \"standalone\""
     ],
+    "failed": [],
     "pending": [],
     "flakey": [],
     "runtimeError": false
Repository: nodejs/node
Pull request: benchmark: add --track to benchmark

This option will measure how long the benchmark
takes to run. Example:

```
$ ./node benchmark/run.js --track assert

assert/assertion-error.js
assert/assertion-error.js size=2 n=200: 22,987.24012781365
assert/assertion-error.js size=75 n=200: 296.2362823364434
[740ms] assert/assertion-error.js

...
```

Changed files:
filename: benchmark/run.js
patch: @@ -3,6 +3,7 @@
 const path = require('path');
 const { spawn, fork } = require('node:child_process');
 const CLI = require('./_cli.js');
+const { styleText } = require('node:util');
 
 const cli = new CLI(`usage: ./node run.js [options] [--] <category> ...
   Run each benchmark in the <category> directory a single time, more than one
@@ -16,6 +17,7 @@ const cli = new CLI(`usage: ./node run.js [options] [--] <category> ...
                             Default: 1
   --set    variable=value   set benchmark variable (can be repeated)
   --format [simple|csv]     optional value that specifies the output format
+  --track                   Display the time elapsed to run each benchmark file.
   test                      only run a single configuration from the options
                             matrix
   all                       each benchmark category is run one after the other
@@ -25,7 +27,7 @@ const cli = new CLI(`usage: ./node run.js [options] [--] <category> ...
     --set CPUSET=0-2          Specifies that benchmarks should run on CPU cores 0 to 2.
 
   Note: The CPUSET format should match the specifications of the 'taskset' command on your system.
-`, { arrayArgs: ['set', 'filter', 'exclude'] });
+`, { arrayArgs: ['set', 'filter', 'exclude'], boolArgs: ['track'] });
 
 const benchmarks = cli.benchmarks();
 
@@ -107,7 +109,12 @@ async function run() {
     }
 
     while (runs-- > 0) {
+      const start = performance.now();
       await runBenchmark(filename);
+      if (format !== 'csv' && cli.optional.track) {
+        const ms = styleText(['bold', 'yellow'], `${Math.round(performance.now() - start)}ms`);
+        console.log(`[${ms}] ${filename}`);
+      }
     }
   }
 }
Repository: facebook/react
Pull request: Plumbing of isomorphic code

Need to tighten up this a bit.

react-dom isomorphic currently depends on react-reconciler which is mostly DCE but it's pulled in which makes it hard to make other bundling changes.

ReactFlightServer can have a hard dependency on the module that imports its internals since even if other internals are aliased it still always needs the server one.

Changed files:
filename: packages/react-dom/src/ReactDOMSharedInternals.js
patch: @@ -10,7 +10,9 @@
 import type {EventPriority} from 'react-reconciler/src/ReactEventPriorities';
 import type {HostDispatcher} from './shared/ReactDOMTypes';
 
-import {NoEventPriority} from 'react-reconciler/src/ReactEventPriorities';
+// This should line up with NoEventPriority from react-reconciler/src/ReactEventPriorities
+// but we can't depend on the react-reconciler from this isomorphic code.
+export const NoEventPriority: EventPriority = (0: any);
 
 type ReactDOMInternals = {
   d /* ReactDOMCurrentDispatcher */: HostDispatcher,

filename: packages/react-server/src/ReactFlightServer.js
patch: @@ -118,9 +118,7 @@ import {
   objectName,
 } from 'shared/ReactSerializationErrors';
 
-import type {SharedStateServer} from 'react/src/ReactSharedInternalsServer';
-import ReactSharedInternalsImpl from 'shared/ReactSharedInternals';
-const ReactSharedInternals: SharedStateServer = (ReactSharedInternalsImpl: any);
+import ReactSharedInternals from './ReactSharedInternalsServer';
 import isArray from 'shared/isArray';
 import getPrototypeOf from 'shared/getPrototypeOf';
 import binaryToComparableString from 'shared/binaryToComparableString';

filename: packages/react-server/src/ReactSharedInternalsServer.js
patch: @@ -7,9 +7,11 @@
  * @flow
  */
 
+import type {SharedStateServer} from 'react/src/ReactSharedInternalsServer';
+
 import * as React from 'react';
 
-const ReactSharedInternalsServer =
+const ReactSharedInternalsServer: SharedStateServer =
   // $FlowFixMe: It's defined in the one we resolve to.
   React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
Repository: huggingface/transformers
Pull request: Update after #41007

# What does this PR do?

Kudos to @vasqu to point out it's a missing torch.no_grad()

https://github.com/huggingface/transformers/pull/41007#discussion_r2363556135

https://github.com/huggingface/transformers/pull/41007#discussion_r2364096801

Changed files:
filename: tests/models/phimoe/test_modeling_phimoe.py
patch: @@ -14,7 +14,6 @@
 
 """Testing suite for the PyTorch PhiMoE model."""
 
-import copy
 import unittest
 
 from parameterized import parameterized
@@ -59,6 +58,7 @@ def forward(
                 past_key_values=self.cache,
             ).logits
 
+        @torch.no_grad()
         @staticmethod
         def generate(model: PhimoeForCausalLM, prompt_tokens: torch.LongTensor, max_seq_len: int) -> list[int]:
             model = PhimoeMiniWithStaticCache(model, 1, max_seq_len + prompt_tokens.shape[-1])
@@ -194,19 +194,6 @@ def test_phimoe_instruct_generation(self):
 
     def test_phimoe_instruct_with_static_cache(self):
         model = self.get_model()
-        # Can't run with the real checkpoint, even if offloaded. Let's just use a tiny dummy one
-        config = copy.deepcopy(model.config)
-        config.num_hidden_layers = 2
-        # make `head_dim = 128`
-        config.hidden_size = 512
-        config.num_attention_heads = 4
-        config.num_key_value_heads = 1
-        config.intermediate_size = 512
-        config.max_position_embeddinqgs = 64
-        config.num_local_experts = 4
-        torch.manual_seed(42)
-        model = PhimoeForCausalLM(config).to(torch_device)
-        model.eval()
         tokenizer = AutoTokenizer.from_pretrained("microsoft/Phi-3.5-MoE-instruct")
 
         messages = [
@@ -221,12 +208,9 @@ def test_phimoe_instruct_with_static_cache(self):
         )
 
         response_tokens = PhimoeMiniWithStaticCache.generate(model, inputs, max_seq_len=30)
-
         output_text = tokenizer.batch_decode(torch.tensor([response_tokens], dtype=torch.long, device=torch_device))
 
-        # This is dummy outputs. We actually check if it could run with static cache, not the output quality.
         EXPECTED_OUTPUT = [
-            "
 You are a helpful digital assistant. Please provide safe, ethical and accurate information to the user.

 Can you provide ways to eat combinations of bananas and dragonfruits?

 awards"
+            "
 You are a helpful digital assistant. Please provide safe, ethical and accurate information to the user.

 Can you provide ways to eat combinations of bananas and dragonfruits?

 C"
         ]
-
         self.assertListEqual(output_text, EXPECTED_OUTPUT)
Repository: ollama/ollama
Pull request: fix response on token error

only template response body if it's not empty

Changed files:
filename: server/auth.go
patch: @@ -111,8 +111,14 @@ func getAuthToken(ctx context.Context, redirData AuthRedirect) (string, error) {
 	defer resp.Body.Close()
 
 	if resp.StatusCode >= http.StatusBadRequest {
-		body, _ := io.ReadAll(resp.Body)
-		return "", fmt.Errorf("on pull registry responded with code %d: %s", resp.StatusCode, body)
+		responseBody, err := io.ReadAll(resp.Body)
+		if err != nil {
+			return "", fmt.Errorf("%d: %v", resp.StatusCode, err)
+		} else if len(responseBody) > 0 {
+			return "", fmt.Errorf("%d: %s", resp.StatusCode, responseBody)
+		}
+
+		return "", fmt.Errorf("%s", resp.Status)
 	}
 
 	respBody, err := io.ReadAll(resp.Body)