helloadhavan/github_issues huggingface dataset:
Repository: nodejs/node
Pull request: Revert "test: ensure message event fires in worker message port test"

This reverts commit 9790315e158a0560932595ff9df9c598e1c2c285.

Refs: https://github.com/nodejs/node/pull/59952

<!--
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: test/parallel/test-worker-message-port-infinite-message-loop.js
patch: @@ -27,14 +27,3 @@ port2.postMessage(0);
 // This is part of the test -- the event loop should be available and not stall
 // out due to the recursive .postMessage() calls.
 setTimeout(common.mustCall(), 0);
-
-// Assert that the 'message' handler was actually called.
-//
-// We do not want to assert a specific call count, so common.mustCall cannot be
-// used in the port1.on('message' callback directly.
-process.once(
-  'beforeExit',
-  common.mustCall(() => {
-    assert(count > 0, 'count should be greater than 0');
-  })
-);
Repository: ggml-org/llama.cpp
Pull request: cuda : print less debug logs when disabling cuda graphs

Avoid printing large amount of debug logs when the CUDA graphs are disabled due to GPU architecture. Without this check, we print this debug log on every compute.

Changed files:
filename: ggml/src/ggml-cuda/ggml-cuda.cu
patch: @@ -3730,8 +3730,10 @@ static bool ggml_cuda_graph_set_enabled(ggml_backend_cuda_context * cuda_ctx) {
 
     if (cuda_ctx->cuda_graph->graph == nullptr) {
         if (ggml_cuda_info().devices[cuda_ctx->device].cc < GGML_CUDA_CC_AMPERE) {
+            if (!cuda_ctx->cuda_graph->disable_due_to_gpu_arch) {
+                GGML_LOG_DEBUG("%s: disabling CUDA graphs due to GPU architecture\n", __func__);
+            }
             cuda_ctx->cuda_graph->disable_due_to_gpu_arch = true;
-            GGML_LOG_DEBUG("%s: disabling CUDA graphs due to GPU architecture\n", __func__);
         }
     }
Repository: vercel/next.js
Pull request: [test] Move all files to .ts (6/6)


Changed files:
filename: test/integration/typescript-hmr/test/index.test.ts
patch: @@ -24,7 +24,7 @@ describe('TypeScript HMR', () => {
         // Events can be finicky in CI. This switches to a more reliable
         // polling method.
         CHOKIDAR_USEPOLLING: 'true',
-        CHOKIDAR_INTERVAL: 500,
+        CHOKIDAR_INTERVAL: '500',
       },
     })
   })
@@ -102,18 +102,10 @@ describe('TypeScript HMR', () => {
         await new Promise((resolve) => setTimeout(resolve, 500))
       }
       await fs.writeFile(pagePath, errContent)
-      const res = await check(
-        async () => {
-          const html = await browser.eval(
-            'document.querySelector("p").innerText'
-          )
-          return html.match(/hello with error/) ? 'success' : 'fail'
-        },
-        /success/,
-        false
-      )
-
-      expect(res).toBe(true)
+      await check(async () => {
+        const html = await browser.eval('document.querySelector("p").innerText')
+        return html.match(/hello with error/) ? 'success' : 'fail'
+      }, /success/)
     } finally {
       if (browser) browser.close()
       await fs.writeFile(pagePath, origContent)

filename: test/integration/typescript-paths/test/index.test.ts
patch: @@ -16,7 +16,7 @@ const appDir = join(__dirname, '..')
 let appPort
 let app
 
-async function get$(path, query) {
+async function get$(path, query?: any) {
   const html = await renderViaHTTP(appPort, path, query)
   return cheerio.load(html)
 }

filename: test/integration/typescript-workspaces-paths/packages/www/test/index.test.ts
patch: @@ -8,7 +8,7 @@ const appDir = join(__dirname, '..')
 let appPort
 let app
 
-async function get$(path, query) {
+async function get$(path, query?: any) {
   const html = await renderViaHTTP(appPort, path, query)
   return cheerio.load(html)
 }

filename: test/integration/typescript-workspaces-paths/tsconfig.json
patch: @@ -27,5 +27,6 @@
     "moduleResolution": "bundler",
     "resolveJsonModule": true,
     "isolatedModules": true
-  }
+  },
+  "exclude": ["node_modules", "**/*.test.ts", "**/*.test.tsx"]
 }

filename: test/integration/undefined-webpack-config/test/index.test.ts
patch: @@ -31,9 +31,6 @@ const expectedErr =
         onStderr(msg) {
           output += msg || ''
         },
-        ontStdout(msg) {
-          output += msg || ''
-        },
       })
 
       expect(output).toMatch(expectedErr)
Repository: electron/electron
Pull request: fix: showMessageDialog should center dialog to parent

Backport of #48181

See that PR for details.


Notes: Fixed an issue where `dialog.showMessageDialog` showed a window incorrectly centered to monitor instead of parent window when passed.


Changed files:
filename: shell/browser/ui/message_box_win.cc
patch: @@ -160,6 +160,7 @@ DialogResult ShowTaskDialogWstr(gfx::AcceleratedWidget parent,
 
   if (parent) {
     config.hwndParent = parent;
+    config.dwFlags |= TDF_POSITION_RELATIVE_TO_WINDOW;
   }
 
   if (default_id > 0)
Repository: huggingface/transformers
Pull request: [`PEFT`] Fix the general test for prefix tuning

We now require exact masks! The test was utilizing the fact that we lazily cut masks cc @Rocketknight1 

Changed files:
filename: tests/utils/test_modeling_utils.py
patch: @@ -1818,6 +1818,8 @@ def test_cache_when_needed_at_train_time(self):
         self.assertTrue(model.training)
 
         # We can also disable the cache to skip a few operations, if the training loop doesn't need cache
+        # NOTE: after #41900, we need to pass the correct attention mask size
+        model_inputs["attention_mask"] = model_inputs["attention_mask"][:, :-num_virtual_tokens]
         model_outputs = model(**model_inputs, use_cache=False)
         self.assertIsNone(model_outputs.past_key_values)
         self.assertTrue(model.training)
Repository: ggml-org/llama.cpp
Pull request: context : do not reserve scheduler for warmups

cont #18547 

Fixes an increased compute buffer after the changes in #18547. No need to reserve for warmup runs as they typically use a small batch that should fit in the original buffers without causing reallocations.

Changed files:
filename: src/llama-context.cpp
patch: @@ -337,7 +337,7 @@ llama_context::llama_context(
         cparams.pipeline_parallel = pipeline_parallel;
 
         if (cparams.pipeline_parallel) {
-            LLAMA_LOG_INFO("%s: pipeline parallelism enabled (n_copies=%d)\n", __func__, ggml_backend_sched_get_n_copies(sched.get()));
+            LLAMA_LOG_INFO("%s: pipeline parallelism enabled\n", __func__);
         }
 
         sched_reserve();
@@ -537,7 +537,8 @@ void llama_context::sched_reserve() {
 
     const int64_t t_end_us = ggml_time_us();
 
-    LLAMA_LOG_INFO("%s: reserve took %.2f ms\n", __func__, (t_end_us - t_start_us)/1000.0);
+    LLAMA_LOG_INFO("%s: reserve took %.2f ms, sched copies = %d\n",
+            __func__, (t_end_us - t_start_us)/1000.0, ggml_backend_sched_get_n_copies(sched.get()));
 }
 
 void llama_context::synchronize() {
@@ -1011,7 +1012,8 @@ void llama_context::set_warmup(bool value) {
 
     cparams.warmup = value;
 
-    sched_need_reserve = true;
+    // warmups are usually with small batches, so no need to reserve
+    //sched_need_reserve = true;
 }
 
 bool llama_context::set_sampler(llama_seq_id seq_id, llama_sampler * sampler) {
Repository: ollama/ollama
Pull request: server: fix model reloads when setting `OLLAMA_NUM_PARALLEL`


Changed files:
filename: server/sched.go
patch: @@ -133,10 +133,6 @@ func (s *Scheduler) processPending(ctx context.Context) {
 				numParallel = 1
 				slog.Warn("multimodal models don't support parallel requests yet")
 			}
-			// Keep NumCtx and numParallel in sync
-			if numParallel > 1 {
-				pending.opts.NumCtx = pending.origNumCtx * numParallel
-			}
 
 			for {
 				cpus := s.getCpuFn()
@@ -234,9 +230,10 @@ func (s *Scheduler) processPending(ctx context.Context) {
 						// simplifying assumption of defaultParallel when in CPU mode
 						if numParallel <= 0 {
 							numParallel = defaultParallel
-							pending.opts.NumCtx = pending.origNumCtx * numParallel
 						}
 
+						pending.opts.NumCtx = pending.origNumCtx * numParallel
+
 						if loadedCount == 0 {
 							slog.Debug("cpu mode with first model, loading")
 							s.loadFn(pending, ggml, gpus, numParallel)
Repository: facebook/react
Pull request: [crud] Enable on RTR FB builds


Changed files:
filename: packages/shared/forks/ReactFeatureFlags.test-renderer.native-fb.js
patch: @@ -80,7 +80,7 @@ export const transitionLaneExpirationMs = 5000;
 export const useModernStrictMode = true;
 export const enableFabricCompleteRootInCommitPhase = false;
 export const enableSiblingPrerendering = true;
-export const enableUseResourceEffectHook = false;
+export const enableUseResourceEffectHook = true;
 
 // Flow magic to verify the exports of this file match the original version.
 ((((null: any): ExportsType): FeatureFlagsType): ExportsType);
Repository: facebook/react
Pull request: [crud] Only export uRC when flag is enabled



It's tricky to do feature detection of uRC currently because it's always present on the export. Let's conditionally export it instead.


Changed files:
filename: packages/react-reconciler/src/__tests__/ReactHooksWithNoopRenderer-test.js
patch: @@ -3276,6 +3276,11 @@ describe('ReactHooksWithNoopRenderer', () => {
       }
     }
 
+    // @gate !enableUseResourceEffectHook
+    it('is null when flag is disabled', async () => {
+      expect(useResourceEffect).toBeUndefined();
+    });
+
     // @gate enableUseResourceEffectHook
     it('validates create return value', async () => {
       function App({id}) {

filename: packages/react/src/ReactClient.js
patch: @@ -65,6 +65,7 @@ import {startTransition} from './ReactStartTransition';
 import {act} from './ReactAct';
 import {captureOwnerStack} from './ReactOwnerStack';
 import ReactCompilerRuntime from './ReactCompilerRuntime';
+import {enableUseResourceEffectHook} from 'shared/ReactFeatureFlags';
 
 const Children = {
   map,
@@ -90,7 +91,6 @@ export {
   useContext,
   useEffect,
   useEffectEvent as experimental_useEffectEvent,
-  useResourceEffect as experimental_useResourceEffect,
   useImperativeHandle,
   useDebugValue,
   useInsertionEffect,
@@ -131,3 +131,6 @@ export {
   act, // DEV-only
   captureOwnerStack, // DEV-only
 };
+
+export const experimental_useResourceEffect: typeof useResourceEffect | void =
+  enableUseResourceEffectHook ? useResourceEffect : undefined;
Repository: huggingface/transformers
Pull request: [typo] fix mrope-interleave annotation to avoid ambiguity

# What does this PR do?

Fixes a small typo in the MRoPE-I comment: the interleaved pattern should be [THWTHWTHW...TT]. 🫡


Changed files:
filename: src/transformers/models/qwen3_omni_moe/modeling_qwen3_omni_moe.py
patch: @@ -1292,7 +1292,7 @@ def forward(self, x, position_ids):
     def apply_interleaved_mrope(self, freqs, mrope_section):
         """Apply interleaved MRoPE to 3D rotary embeddings.
         Reorganizes frequency layout from chunked [TTT...HHH...WWW] to
-        interleaved [THTHWHTHW...TT], preserving frequency continuity.
+        interleaved [THWTHWTHW...TT], preserving frequency continuity.
         args:
             x: (3, bs, seq_len, head_dim // 2)
             mrope_section: (3,)

filename: src/transformers/models/qwen3_vl/modeling_qwen3_vl.py
patch: @@ -349,7 +349,7 @@ def forward(self, x, position_ids):
     def apply_interleaved_mrope(self, freqs, mrope_section):
         """Apply interleaved MRoPE to 3D rotary embeddings.
         Reorganizes frequency layout from chunked [TTT...HHH...WWW] to
-        interleaved [THTHWHTHW...TT], preserving frequency continuity.
+        interleaved [THWTHWTHW...TT], preserving frequency continuity.
         args:
             x: (3, bs, seq_len, head_dim // 2)
             mrope_section: (3,)

filename: src/transformers/models/qwen3_vl/modular_qwen3_vl.py
patch: @@ -366,7 +366,7 @@ def __init__(self, config: Qwen3VLTextConfig, device=None):
     def apply_interleaved_mrope(self, freqs, mrope_section):
         """Apply interleaved MRoPE to 3D rotary embeddings.
         Reorganizes frequency layout from chunked [TTT...HHH...WWW] to
-        interleaved [THTHWHTHW...TT], preserving frequency continuity.
+        interleaved [THWTHWTHW...TT], preserving frequency continuity.
         args:
             x: (3, bs, seq_len, head_dim // 2)
             mrope_section: (3,)

filename: src/transformers/models/qwen3_vl_moe/modeling_qwen3_vl_moe.py
patch: @@ -847,7 +847,7 @@ def forward(self, x, position_ids):
     def apply_interleaved_mrope(self, freqs, mrope_section):
         """Apply interleaved MRoPE to 3D rotary embeddings.
         Reorganizes frequency layout from chunked [TTT...HHH...WWW] to
-        interleaved [THTHWHTHW...TT], preserving frequency continuity.
+        interleaved [THWTHWTHW...TT], preserving frequency continuity.
         args:
             x: (3, bs, seq_len, head_dim // 2)
             mrope_section: (3,)
Repository: facebook/react
Pull request: [playground] Allow (Arrow)FunctionExpressions

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

This was a pet peeve where our playground could only compile top level
FunctionDeclarations. Just synthesize a fake identifier if it doesn't
have one.

Changed files:
filename: compiler/apps/playground/components/Editor/EditorImpl.tsx
patch: @@ -182,15 +182,6 @@ function getFunctionIdentifier(
   return Array.isArray(id) === false && id.isIdentifier() ? id.node : null;
 }
 
-let count = 0;
-function withIdentifier(id: t.Identifier | null): t.Identifier {
-  if (id != null && id.name != null) {
-    return id;
-  } else {
-    return t.identifier(`anonymous_${count++}`);
-  }
-}
-
 function compile(source: string): [CompilerOutput, 'flow' | 'typescript'] {
   const results = new Map<string, PrintedCompilerPipelineValue[]>();
   const error = new CompilerError();
@@ -208,6 +199,14 @@ function compile(source: string): [CompilerOutput, 'flow' | 'typescript'] {
   } else {
     language = 'typescript';
   }
+  let count = 0;
+  const withIdentifier = (id: t.Identifier | null): t.Identifier => {
+    if (id != null && id.name != null) {
+      return id;
+    } else {
+      return t.identifier(`anonymous_${count++}`);
+    }
+  };
   try {
     // Extract the first line to quickly check for custom test directives
     const pragma = source.substring(0, source.indexOf('\n'));
Repository: ollama/ollama
Pull request: sched: don't error if paging to disk on Windows and macOS

macOS and Windows don't error when paging to disk, so loosen this check for now to not return an error to users that could still run the model (albeit a little slowly). It also stops us from double counting memory on Apple Silicon Macs.

In the future, we should still select an upper limit on memory for macOS and Windows to avoid timeouts, etc. This PR is meant to unblock 0.1.49 and doesn't include that yet.

Changed files:
filename: server/sched.go
patch: @@ -197,25 +197,36 @@ func (s *Scheduler) processPending(ctx context.Context) {
 						break
 					}
 
-					// Block attempting to load a model larger than system memory + GPU memory
 					estimate := llm.EstimateGPULayers(gpus, ggml, pending.model.ProjectorPaths, pending.opts)
 					maxSize := systemMem.FreeMemory
-					for _, gpu := range gpus {
-						if gpu.Library == "cpu" {
-							continue
-						}
-						if loadedCount == 0 {
-							// If no other models are loaded, set the limit based on what's available
-							maxSize += gpu.FreeMemory
-						} else {
-							// Other models could be unloaded, favor total memory for limit
-							maxSize += gpu.TotalMemory
+
+					// Add available GPU memory to the total pool
+					// macOS hardware has unified memory so don't double count
+					if runtime.GOOS != "darwin" {
+						for _, gpu := range gpus {
+							if gpu.Library == "cpu" {
+								continue
+							}
+							if loadedCount == 0 {
+								// If no other models are loaded, set the limit based on what's available
+								maxSize += gpu.FreeMemory
+							} else {
+								// Other models could be unloaded, favor total memory for limit
+								maxSize += gpu.TotalMemory
+							}
 						}
 					}
+
+					// Block attempting to load a model larger than system memory + GPU memory
 					if estimate.TotalSize > maxSize {
 						slog.Warn("model request too large for system", "requested", format.HumanBytes2(estimate.TotalSize), "system", format.HumanBytes2(maxSize))
-						pending.errCh <- fmt.Errorf("requested model (%s) is too large for this system (%s)", format.HumanBytes2(estimate.TotalSize), format.HumanBytes2(maxSize))
-						break
+
+						// Linux will crash if over-allocating memory - return an error to the user.
+						// TODO (jmorganca): add reasonable upper limits for darwin and windows as well
+						if runtime.GOOS == "linux" {
+							pending.errCh <- fmt.Errorf("requested model (%s) is too large for this system (%s)", format.HumanBytes2(estimate.TotalSize), format.HumanBytes2(maxSize))
+							break
+						}
 					}
 
 					// Evaluate if the model will fit in the available system memory, or if we should unload a model first
Repository: nodejs/node
Pull request: src: use string_view in `WriteReport()`

Since 075936b4133e, `TriggerNodeReport()` takes `std::string_view` arguments directly.

<!--
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: src/node_report_module.cc
patch: @@ -34,18 +34,18 @@ void WriteReport(const FunctionCallbackInfo<Value>& info) {
   Local<Value> error;
 
   CHECK_EQ(info.Length(), 4);
-  String::Utf8Value message(isolate, info[0].As<String>());
-  String::Utf8Value trigger(isolate, info[1].As<String>());
+  Utf8Value message(isolate, info[0].As<String>());
+  Utf8Value trigger(isolate, info[1].As<String>());
 
-  if (info[2]->IsString())
-    filename = *String::Utf8Value(isolate, info[2]);
+  if (info[2]->IsString()) filename = Utf8Value(isolate, info[2]).ToString();
   if (!info[3].IsEmpty())
     error = info[3];
   else
     error = Local<Value>();
 
   // Return value is the report filename
-  filename = TriggerNodeReport(env, *message, *trigger, filename, error);
+  filename = TriggerNodeReport(
+      env, message.ToStringView(), trigger.ToStringView(), filename, error);
   Local<Value> ret;
   if (ToV8Value(env->context(), filename, env->isolate()).ToLocal(&ret)) {
     info.GetReturnValue().Set(ret);
Repository: facebook/react
Pull request: Mark ping time as update

This ensures that we mark the time from ping until we render as "Blocked".

We intentionally don't want to show the event time even if it's something like "load" because it draws attention away from interactions etc.

<img width="577" alt="Screenshot 2024-11-21 at 7 22 39 PM" src="https://github.com/user-attachments/assets/70cca2e8-bd5e-489f-98f0-b4dfee5940af">


Changed files:
filename: packages/react-reconciler/src/ReactFiberWorkLoop.js
patch: @@ -269,6 +269,7 @@ import {
   startYieldTimer,
   yieldStartTime,
   yieldReason,
+  startPingTimerByLanes,
 } from './ReactProfilerTimer';
 import {setCurrentTrackFromLanes} from './ReactFiberPerformanceTrack';
 
@@ -3961,6 +3962,10 @@ function pingSuspendedRoot(
 
   markRootPinged(root, pingedLanes);
 
+  if (enableProfilerTimer && enableComponentPerformanceTrack) {
+    startPingTimerByLanes(pingedLanes);
+  }
+
   warnIfSuspenseResolutionNotWrappedWithActDEV(root);
 
   if (

filename: packages/react-reconciler/src/ReactProfilerTimer.js
patch: @@ -108,6 +108,24 @@ export function startUpdateTimerByLane(lane: Lane): void {
   }
 }
 
+export function startPingTimerByLanes(lanes: Lanes): void {
+  if (!enableProfilerTimer || !enableComponentPerformanceTrack) {
+    return;
+  }
+  // Mark the update time and clamp anything before it because we don't want
+  // to show the event time for pings but we also don't want to clear it
+  // because we still need to track if this was a repeat.
+  if (includesSyncLane(lanes) || includesBlockingLane(lanes)) {
+    if (blockingUpdateTime < 0) {
+      blockingClampTime = blockingUpdateTime = now();
+    }
+  } else if (includesTransitionLane(lanes)) {
+    if (transitionUpdateTime < 0) {
+      transitionClampTime = transitionUpdateTime = now();
+    }
+  }
+}
+
 export function trackSuspendedTime(lanes: Lanes, renderEndTime: number) {
   if (!enableProfilerTimer || !enableComponentPerformanceTrack) {
     return;