helloadhavan/github_issues huggingface dataset:
Repository: facebook/react
Pull request: Update ExhaustiveDepts

<!--
  Thanks for submitting a pull request!
  We appreciate you spending the time to work on these changes. Please provide enough information so that others can review your pull request. The three fields below are mandatory.

  Before submitting a pull request, please make sure the following is done:

  1. Fork [the repository](https://github.com/facebook/react) and create your branch from `main`.
  2. Run `yarn` in the repository root.
  3. If you've fixed a bug or added code that should be tested, add tests!
  4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch TestName` is helpful in development.
  5. Run `yarn test --prod` to test in the production environment. It supports the same options as `yarn test`.
  6. If you need a debugger, run `yarn debug-test --watch TestName`, open `chrome://inspect`, and press "Inspect".
  7. Format your code with [prettier](https://github.com/prettier/prettier) (`yarn prettier`).
  8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only check changed files.
  9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`).
  10. If you haven't already, complete the CLA.

  Learn more about contributing: https://reactjs.org/docs/how-to-contribute.html
-->

## Summary

<!--
 Explain the **motivation** for making this change. What existing problem does the pull request solve?
-->

## How did you test this change?

<!--
  Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes the user interface.
  How exactly did you verify that your PR solves the issue you wanted to solve?
  If you leave this empty, your PR will very likely be closed.
-->


Changed files:
filename: packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js
patch: @@ -352,7 +352,7 @@ export default {
       const currentRefsInEffectCleanup = new Map();
 
       // Is this reference inside a cleanup function for this effect node?
-      // We can check by traversing scopes upwards  from the reference, and checking
+      // We can check by traversing scopes upwards from the reference, and checking
       // if the last "return () => " we encounter is located directly inside the effect.
       function isInsideEffectCleanup(reference) {
         let curScope = reference.from;
Repository: electron/electron
Pull request: fix: detach native view when its removed from parent on macOS

Backport of #43627

See that PR for details.


Notes: Fixed potential use-after-free during view removal on macOS.


Changed files:
filename: shell/browser/ui/cocoa/delayed_native_view_host.mm
patch: @@ -15,6 +15,8 @@
 
 void DelayedNativeViewHost::ViewHierarchyChanged(
     const views::ViewHierarchyChangedDetails& details) {
+  if (!details.is_add && native_view())
+    Detach();
   NativeViewHost::ViewHierarchyChanged(details);
   if (details.is_add && GetWidget() && !native_view())
     Attach(native_view_);
Repository: vercel/next.js
Pull request: [test] Move test selectors as close to the actual value as possible

React will start outlining boundaries if they add too many bytes to the next completion. This doesn't have any perceivable effect but some of our tests use Cheerio to parse the flushed HTML without any JS applied so the expected values might end up in a template that's not within the element you're targetting with CSS selectors.

The real fix is using `next.browser` instead but that's slower so we just make sure React can't separate targetted elements and the expected values.

Changed files:
filename: test/e2e/app-dir/dynamic-io/app/headers/exercise/components.tsx
patch: @@ -104,8 +104,8 @@ function Get({
   return (
     <section>
       <h2>{expression}.get('...')</h2>
-      <div id={'get-x-sentinel'}>
-        <pre>{headers.get('x-sentinel')}</pre>
+      <div>
+        <pre id={'get-x-sentinel'}>{headers.get('x-sentinel')}</pre>
       </div>
     </section>
   )
@@ -194,8 +194,8 @@ function ForEach({
   headers.forEach((value, header) => {
     if (header.startsWith('x-sentinel')) {
       output.push(
-        <div key={header} id={'for-each-' + header}>
-          <pre>{value}</pre>
+        <div key={header}>
+          <pre id={'for-each-' + header}>{value}</pre>
         </div>
       )
     }
@@ -300,8 +300,8 @@ function ForOf({
   for (let [headerName, value] of headers) {
     if (headerName.startsWith('x-sentinel')) {
       output.push(
-        <div key={headerName} id={'for-of-' + headerName}>
-          <pre>{value}</pre>
+        <div key={headerName}>
+          <pre id={'for-of-' + headerName}>{value}</pre>
         </div>
       )
     }
@@ -326,8 +326,8 @@ function Spread({
     .filter(([headerName]) => headerName.startsWith('x-sentinel'))
     .map((v) => {
       return (
-        <div key={v[0]} id={'spread-' + v[0]}>
-          <pre>{v[1]}</pre>
+        <div key={v[0]}>
+          <pre id={'spread-' + v[0]}>{v[1]}</pre>
         </div>
       )
     })
Repository: huggingface/transformers
Pull request: Small typo lines 47 and 199 perf_infer_gpu_one.md

# What does this PR do?

Fix a small typo.

## Before submitting
- [x] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [ ] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
      Pull Request section?
- [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
      to it if that's the case.
- [ ] Did you make sure to update the documentation with your changes? Here are the
      [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and
      [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
- [ ] Did you write any new necessary tests?


Changed files:
filename: docs/source/en/perf_infer_gpu_one.md
patch: @@ -44,7 +44,7 @@ Place all inputs on the same device as the model.
 from transformers import BitsAndBytesConfig, AutoTokenizer, AutoModelForCausalLM
 
 quantization_config = BitsAndBytesConfig(load_in_8bit=True)
-tokenizer = AutoTokenizer("meta-llama/Llama-3.1-8B")
+tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-3.1-8B")
 model = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-3.1-8B", device_map="auto", quantization_config=quantization_config)
 
 prompt = "Hello, my llama is cute"
@@ -196,7 +196,7 @@ model = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-3.1-8B", device_m
 input_text = "Hello, my llama is cute"
 inputs = tokenizer(input_text, return_tensors="pt").to("cuda")
 
-with sdpa_kernel(SDPBackend.FLASH_ATTENTION)::
+with sdpa_kernel(SDPBackend.FLASH_ATTENTION):
     outputs = model.generate(**inputs)
 
 print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Repository: denoland/deno
Pull request: ci: upgrade release template

Removes `deno-lambda` section that is now deprecated: https://github.com/denoland/deno-lambda/pull/307

Changed files:
filename: tools/release/release_doc_template.md
patch: @@ -151,13 +151,6 @@ verify on GitHub that everything looks correct.
 - [ ] This will open a PR. Review and merge it.
 - [ ] Create a `$VERSION` tag (_without_ `v` prefix).
 
-## Updating `deno-lambda`
-
-- [ ] Run the version bump workflow:
-      https://github.com/denoland/deno-lambda/actions/workflows/bump.yml
-- [ ] This will open a PR. Review and merge it.
-- [ ] Create a `$VERSION` tag (_without_ `v` prefix).
-
 ## All done!
 
 - [ ] Write a message in company's #cli channel:
Repository: facebook/react
Pull request: [Transition Tracing] Push Transition When Offscreen Becomes Visible

This PR pushes all of a suspense boundary's transitions onto the transition stack when it goes from hidden to visible so we can pass it to any child suspense boundaries or tracing markers.


Changed files:
filename: packages/react-reconciler/src/ReactFiberBeginWork.new.js
patch: @@ -779,7 +779,17 @@ function updateOffscreenComponent(
         prevCachePool = prevState.cachePool;
       }
 
-      pushTransition(workInProgress, prevCachePool, null);
+      let transitions = null;
+      if (
+        workInProgress.memoizedState !== null &&
+        workInProgress.memoizedState.transitions !== null
+      ) {
+        // We have now gone from hidden to visible, so any transitions should
+        // be added to the stack to get added to any Offscreen/suspense children
+        transitions = workInProgress.memoizedState.transitions;
+      }
+
+      pushTransition(workInProgress, prevCachePool, transitions);
 
       // Since we're not hidden anymore, reset the state
       workInProgress.memoizedState = null;

filename: packages/react-reconciler/src/ReactFiberBeginWork.old.js
patch: @@ -779,7 +779,17 @@ function updateOffscreenComponent(
         prevCachePool = prevState.cachePool;
       }
 
-      pushTransition(workInProgress, prevCachePool, null);
+      let transitions = null;
+      if (
+        workInProgress.memoizedState !== null &&
+        workInProgress.memoizedState.transitions !== null
+      ) {
+        // We have now gone from hidden to visible, so any transitions should
+        // be added to the stack to get added to any Offscreen/suspense children
+        transitions = workInProgress.memoizedState.transitions;
+      }
+
+      pushTransition(workInProgress, prevCachePool, transitions);
 
       // Since we're not hidden anymore, reset the state
       workInProgress.memoizedState = null;
Repository: ggml-org/llama.cpp
Pull request: [CANN]: Add SOC TYPE printing in cmake configuration processing

Print information Optimization: Add SOC TYPE printing in cmake configuration processing when SOC_TYPE is manually specified in gem-cann cmake building arguments.

*Make sure to read the [contributing guidelines](https://github.com/ggml-org/llama.cpp/blob/master/CONTRIBUTING.md) before submitting a PR*


Changed files:
filename: ggml/src/ggml-cann/CMakeLists.txt
patch: @@ -30,6 +30,7 @@ string(TOLOWER ${SOC_TYPE} SOC_VERSION) # SOC_VERSION need lower
 string(REGEX MATCH "[0-9]+[a-zA-Z]" SOC_TYPE_MAJOR_SN "${SOC_VERSION}")
 set(SOC_TYPE_COMPILE_OPTION "ASCEND_${SOC_TYPE_MAJOR_SN}")
 string(TOUPPER ${SOC_TYPE_COMPILE_OPTION} SOC_TYPE_COMPILE_OPTION)
+message(STATUS "CANN: SOC_VERSION =  ${SOC_VERSION}")
 
 if (CANN_INSTALL_DIR)
     # Only Support Linux.
Repository: electron/electron
Pull request: fix: crash when focusing `WebView` `webContents`

#### Description of Change

Closes https://github.com/electron/electron/issues/43818.

Fixes an issue where calling `Focus` on a `WebView`'s `webContents` would trigger a fatal `NOTREACHED` error. Attaching a webContents as an inner contents via `AttachInnerWebContents` results in the contents' view being a `WebContentsViewChildFrame`, which has never implemented `Focus`.

This happened as a result of CL:5539619 - it never worked before, but now crashed instead of silently failing.

#### Checklist
<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

- [x] PR description included and stakeholders cc'd
- [x] `npm test` passes
- [x] tests are [changed or added](https://github.com/electron/electron/blob/main/docs/development/testing.md)
- [x] [PR release notes](https://github.com/electron/clerk/blob/main/README.md) describe the change in a way relevant to app developers, and are [capitalized, punctuated, and past tense](https://github.com/electron/clerk/blob/main/README.md#examples).

#### Release Notes

Notes: Fixed a crash when calling `focus` on a `WebView`'s `webContents`.

Changed files:
filename: shell/browser/api/electron_api_web_contents.cc
patch: @@ -3339,6 +3339,12 @@ void WebContents::Focus() {
   if (owner_window())
     owner_window()->Focus(true);
 #endif
+
+  // WebView uses WebContentsViewChildFrame, which doesn't have a Focus impl
+  // and triggers a fatal NOTREACHED.
+  if (is_guest())
+    return;
+
   web_contents()->Focus();
 }
 
@@ -3782,7 +3788,8 @@ void WebContents::SetBackgroundColor(std::optional<SkColor> maybe_color) {
 
   content::RenderWidgetHostView* rwhv = rfh->GetView();
   if (rwhv) {
-    // RenderWidgetHostView doesn't allow setting an alpha that's not 0 or 255.
+    // RenderWidgetHostView doesn't allow setting an alpha that's not 0 or
+    // 255.
     rwhv->SetBackgroundColor(is_opaque ? color : SK_ColorTRANSPARENT);
     static_cast<content::RenderWidgetHostViewBase*>(rwhv)
         ->SetContentBackgroundColor(color);

filename: spec/api-web-contents-spec.ts
patch: @@ -1207,6 +1207,22 @@ describe('webContents module', () => {
         expect(currentFocused).to.be.true();
         expect(childFocused).to.be.false();
       });
+
+      it('does not crash when focusing a WebView webContents', async () => {
+        const w = new BrowserWindow({
+          show: false,
+          webPreferences: {
+            nodeIntegration: true,
+            webviewTag: true
+          }
+        });
+
+        w.show();
+        await w.loadURL('data:text/html,<webview src="data:text/html,hi"></webview>');
+
+        const wc = webContents.getAllWebContents().find((wc) => wc.getType() === 'webview')!;
+        expect(() => wc.focus()).to.not.throw();
+      });
     });
 
     const moveFocusToDevTools = async (win: BrowserWindow) => {
Repository: vercel/next.js
Pull request: test: split basic HMR test into multiple files

Split long-running basic hmr test to parallelize and reduce CI time.

As @huozhi mentioned at https://github.com/vercel/next.js/pull/73613#pullrequestreview-2485717304, the tests won't be separated to `__test__` dir but flattened out on the same level as the fixture dirs.

Port of https://github.com/vercel/next.js/pull/73616, confirmed no new changes.

x-ref: https://github.com/vercel/next.js/commits/canary/test/development/basic/hmr/basic.test.ts

Changed files:
filename: test/development/basic/hmr/basic-no-base-path-no-asset-prefix.test.ts
patch: @@ -0,0 +1,7 @@
+import { runBasicHmrTest } from './run-basic-hmr-test.util'
+
+const nextConfig = { basePath: '', assetPrefix: '' }
+
+describe(`HMR - basic, nextConfig: ${JSON.stringify(nextConfig)}`, () => {
+  runBasicHmrTest(nextConfig)
+})

filename: test/development/basic/hmr/basic-no-base-path-yes-asset-prefix.test.ts
patch: @@ -0,0 +1,7 @@
+import { runBasicHmrTest } from './run-basic-hmr-test.util'
+
+const nextConfig = { basePath: '', assetPrefix: '/asset-prefix' }
+
+describe(`HMR - basic, nextConfig: ${JSON.stringify(nextConfig)}`, () => {
+  runBasicHmrTest(nextConfig)
+})

filename: test/development/basic/hmr/basic-yes-base-path-no-asset-prefix.test.ts
patch: @@ -0,0 +1,7 @@
+import { runBasicHmrTest } from './run-basic-hmr-test.util'
+
+const nextConfig = { basePath: '/docs', assetPrefix: '' }
+
+describe(`HMR - basic, nextConfig: ${JSON.stringify(nextConfig)}`, () => {
+  runBasicHmrTest(nextConfig)
+})

filename: test/development/basic/hmr/basic-yes-base-path-yes-asset-prefix.test.ts
patch: @@ -0,0 +1,7 @@
+import { runBasicHmrTest } from './run-basic-hmr-test.util'
+
+const nextConfig = { basePath: '/docs', assetPrefix: '/asset-prefix' }
+
+describe(`HMR - basic, nextConfig: ${JSON.stringify(nextConfig)}`, () => {
+  runBasicHmrTest(nextConfig)
+})

filename: test/development/basic/hmr/run-basic-hmr-test.util.ts
patch: @@ -5,14 +5,11 @@ import {
   waitFor,
 } from 'next-test-utils'
 import { createNext, nextTestSetup } from 'e2e-utils'
-import type { NextConfig } from 'next'
-
-describe.each([
-  { basePath: '', assetPrefix: '' },
-  { basePath: '', assetPrefix: '/asset-prefix' },
-  { basePath: '/docs', assetPrefix: '' },
-  { basePath: '/docs', assetPrefix: '/asset-prefix' },
-])('basic HMR, nextConfig: %o', (nextConfig: Partial<NextConfig>) => {
+
+export function runBasicHmrTest(nextConfig: {
+  basePath: string
+  assetPrefix: string
+}) {
   const { next } = nextTestSetup({
     files: __dirname,
     nextConfig,
@@ -113,4 +110,4 @@ describe.each([
     await reloadPromise
     await secondNext.destroy()
   })
-})
+}
Repository: facebook/react
Pull request: Move the Error creation to be lazy

Creating an Error captures a stack trace which can be somewhat expensive. We shouldn't do that twice for every render.

This also ensures that the stack trace is more useful because you can follow through the Node.js code to see the cause.

Changed files:
filename: packages/react-dom/src/server/ReactDOMFizzServerNode.js
patch: @@ -29,7 +29,8 @@ function createDrainHandler(destination, request) {
 }
 
 function createAbortHandler(request, reason) {
-  return () => abort(request, reason);
+  // eslint-disable-next-line react-internal/prod-error-codes
+  return () => abort(request, new Error(reason));
 }
 
 type Options = {|
@@ -49,7 +50,7 @@ type Options = {|
 type PipeableStream = {|
   // Cancel any pending I/O and put anything remaining into
   // client rendered mode.
-  abort(): void,
+  abort(reason: mixed): void,
   pipe<T: Writable>(destination: T): T,
 |};
 
@@ -94,21 +95,16 @@ function renderToPipeableStream(
         'error',
         createAbortHandler(
           request,
-          // eslint-disable-next-line react-internal/prod-error-codes
-          new Error('The destination stream errored while writing data.'),
+          'The destination stream errored while writing data.',
         ),
       );
       destination.on(
         'close',
-        createAbortHandler(
-          request,
-          // eslint-disable-next-line react-internal/prod-error-codes
-          new Error('The destination stream closed early.'),
-        ),
+        createAbortHandler(request, 'The destination stream closed early.'),
       );
       return destination;
     },
-    abort(reason) {
+    abort(reason: mixed) {
       abort(request, reason);
     },
   };
Repository: denoland/deno
Pull request: fix: add test ensuring als works across dynamic import

The fix is in https://github.com/denoland/deno_core/pull/888

Fixes: https://github.com/denoland/deno/issues/25275

Changed files:
filename: tests/unit_node/async_hooks_test.ts
patch: @@ -160,3 +160,15 @@ Deno.test(async function worksWithAsyncAPIs() {
     test();
   });
 });
+
+Deno.test(async function worksWithDynamicImports() {
+  const store = new AsyncLocalStorage();
+  // @ts-expect-error implicit any
+  globalThis.alsDynamicImport = () => store.getStore();
+  const dataUrl =
+    `data:application/javascript,export const data = alsDynamicImport()`;
+  await store.run("data", async () => {
+    const { data } = await import(dataUrl);
+    assertEquals(data, "data");
+  });
+});
Repository: denoland/deno
Pull request: fix(ext/node): export request and response clases from `http2` module

Closes https://github.com/denoland/deno/issues/20612
Closes https://github.com/denoland/deno/issues/23326

This makes `qwik` work.


https://github.com/user-attachments/assets/c09df01a-a793-40dd-bdd2-aee21cb1ae11



Changed files:
filename: ext/node/polyfills/http2.ts
patch: @@ -2295,7 +2295,7 @@ function onStreamTimeout(kind) {
   };
 }
 
-class Http2ServerRequest extends Readable {
+export class Http2ServerRequest extends Readable {
   readableEnded = false;
 
   constructor(stream, headers, options, rawHeaders) {
@@ -2523,7 +2523,7 @@ function isConnectionHeaderAllowed(name, value) {
     value === "trailers";
 }
 
-class Http2ServerResponse extends Stream {
+export class Http2ServerResponse extends Stream {
   writable = false;
   req = null;
 

filename: tests/unit_node/http2_test.ts
patch: @@ -378,3 +378,8 @@ Deno.test("[node/http2 client] connection states", async () => {
 
   assertEquals(actual, expected);
 });
+
+Deno.test("request and response exports", () => {
+  assert(http2.Http2ServerRequest);
+  assert(http2.Http2ServerResponse);
+});
Repository: huggingface/transformers
Pull request: add xpu memory check 

## What does this PR do?
The issue addressed in this PR https://github.com/huggingface/transformers/pull/37920 also applies to other GPUs. Otherwise, the device index in `device_map` on Intel GPU and NV GPU doesn't align with each other. On CUDA, this is {"": 0}, but on XPU this is {"": 1}, which leads to following test fails:

```bash
tests/peft_integration/test_peft_integration.py::PeftIntegrationTester::test_peft_from_pretrained_kwargs
```

cc @gante and @Rocketknight1


Changed files:
filename: src/transformers/modeling_utils.py
patch: @@ -114,6 +114,7 @@
     is_torch_npu_available,
     is_torch_sdpa_available,
     is_torch_xla_available,
+    is_torch_xpu_available,
     logging,
     replace_return_docstrings,
     strtobool,
@@ -1286,11 +1287,14 @@ def _get_device_map(
         if hf_quantizer is not None:
             max_memory = hf_quantizer.adjust_max_memory(max_memory)
 
-        # CUDA: `max_memory` contains non-reserved memory. There may be *unused* reserved memory in the GPU, which we
+        # `max_memory` contains non-reserved memory. There may be *unused* reserved memory in the GPU, which we
         # can use to allocate parameters.
         for device_name in max_memory.keys():
             if isinstance(device_name, int):  # it's a GPU device
-                unused_memory = torch.cuda.memory_reserved(device_name) - torch.cuda.memory_allocated(device_name)
+                if is_torch_xpu_available():
+                    unused_memory = torch.xpu.memory_reserved(device_name) - torch.xpu.memory_allocated(device_name)
+                else:
+                    unused_memory = torch.cuda.memory_reserved(device_name) - torch.cuda.memory_allocated(device_name)
                 max_memory[device_name] += unused_memory
         device_map_kwargs["max_memory"] = max_memory
Repository: ggml-org/llama.cpp
Pull request: opencl: mark `MUL_MAT` supports non-contiguous tensors for f32

The f32 variant of mul mat actually supports non-contiguous tensors.

Changed files:
filename: ggml/src/ggml-opencl/ggml-opencl.cpp
patch: @@ -1877,7 +1877,7 @@ static bool ggml_opencl_supports_op(ggml_backend_dev_t dev, const struct ggml_te
             if (op->src[0]->type == GGML_TYPE_F16) {
                 return true;
             } else if (op->src[0]->type == GGML_TYPE_F32) {
-                return op->src[1]->type == GGML_TYPE_F32 && ggml_is_contiguous(op->src[0]) && ggml_is_contiguous(op->src[1]);
+                return op->src[1]->type == GGML_TYPE_F32;
             } else if (op->src[0]->type == GGML_TYPE_Q4_0 ||
                        op->src[0]->type == GGML_TYPE_Q6_K) {
                 return op->src[1]->type == GGML_TYPE_F32 && ggml_is_contiguous(op->src[0]) && ggml_is_contiguous(op->src[1]);