helloadhavan/github_issues huggingface dataset:
Repository: ggml-org/llama.cpp
Pull request: cuda : add missing F32<->I32 entries in ggml_cuda_cpy_fn

Forgotten in #15783 causing assertion error whenever graph copy op pointers are stored.

Changed files:
filename: ggml/src/ggml-cuda/cpy.cu
patch: @@ -441,6 +441,10 @@ void* ggml_cuda_cpy_fn(const ggml_tensor * src0, ggml_tensor * src1) {
         return (void*) cpy_flt<cpy_1_flt<nv_bfloat16, nv_bfloat16>>;
     } else if (src0->type == GGML_TYPE_BF16 && src1->type == GGML_TYPE_F32) {
         return (void*) cpy_flt<cpy_1_flt<nv_bfloat16, float>>;
+    } else if (src0->type == GGML_TYPE_F32 && src1->type == GGML_TYPE_I32) {
+        return (void*) cpy_flt<cpy_1_flt<float, int32_t>>;
+    } else if (src0->type == GGML_TYPE_I32 && src1->type == GGML_TYPE_F32) {
+        return (void*) cpy_flt<cpy_1_flt<int32_t, float>>;
     } else {
         GGML_ABORT("%s: unsupported type combination (%s to %s)\n", __func__,
                 ggml_type_name(src0->type), ggml_type_name(src1->type));
Repository: facebook/react
Pull request: Add lint tests that should fail

These though fail.

Anon default export: https://github.com/facebook/react/issues/21181
Promise callbacks: https://github.com/facebook/react/issues/26186
Returning anon functions: https://github.com/facebook/react/issues/22520

Changed files:
filename: packages/eslint-plugin-react-hooks/__tests__/ESLintRulesOfHooks-test.js
patch: @@ -521,6 +521,39 @@ const tests = {
         }
       `,
     },
+    {
+      code: normalizeIndent`
+        export const notAComponent = () => {
+           return () => {
+            useState();
+          }
+        }
+      `,
+      // TODO: this should error but doesn't.
+      // errors: [functionError('use', 'notAComponent')],
+    },
+    {
+      code: normalizeIndent`
+        export default () => {
+          if (isVal) {
+            useState(0);
+          }
+        }
+      `,
+      // TODO: this should error but doesn't.
+      // errors: [genericError('useState')],
+    },
+    {
+      code: normalizeIndent`
+        function notAComponent() {
+          return new Promise.then(() => {
+            useState();
+          });
+        }
+      `,
+      // TODO: this should error but doesn't.
+      // errors: [genericError('useState')],
+    },
   ],
   invalid: [
     {
Repository: vercel/next.js
Pull request: fix: revert client segment route changes for sub shell generation

Reverts changes to the `routes-manifest.json` from #81321. Incorrect route sorting was causing some routing errors.

Changed files:
filename: packages/next/src/build/index.ts
patch: @@ -3103,44 +3103,18 @@ export default async function build(
                 }
 
                 let prefetchDataRoute: string | undefined
-                let dynamicRoute = routesManifest.dynamicRoutes.find(
-                  (r) => r.page === route.pathname
-                )
                 if (!isAppRouteHandler && isAppPPREnabled) {
                   prefetchDataRoute = path.posix.join(
                     `${normalizedRoute}${RSC_PREFETCH_SUFFIX}`
                   )
-
-                  // If the dynamic route wasn't found, then we need to create
-                  // it. This ensures that for each fallback shell there's an
-                  // entry in the app routes manifest which enables routing for
-                  // this fallback shell.
-                  if (!dynamicRoute) {
-                    dynamicRoute = pageToRoute(route.pathname)
-
-                    // This route is not for the internal router, but instead
-                    // for external routers.
-                    dynamicRoute.skipInternalRouting = true
-
-                    // Push this to the end of the array. The dynamic routes are
-                    // sorted by page later.
-                    routesManifest.dynamicRoutes.push(dynamicRoute)
-                  }
                 }
 
                 if (!isAppRouteHandler && metadata?.segmentPaths) {
-                  // If PPR isn't enabled, then we might not find the dynamic
-                  // route by pathname. If that's the case, we need to find the
-                  // route by page.
+                  const dynamicRoute = routesManifest.dynamicRoutes.find(
+                    (r) => r.page === page
+                  )
                   if (!dynamicRoute) {
-                    dynamicRoute = routesManifest.dynamicRoutes.find(
-                      (r) => r.page === page
-                    )
-
-                    // If it can't be found by page, we must throw an error.
-                    if (!dynamicRoute) {
-                      throw new InvariantError('Dynamic route not found')
-                    }
+                    throw new InvariantError('Dynamic route not found')
                   }
 
                   dynamicRoute.prefetchSegmentDataRoutes ??= []

filename: test/e2e/app-dir/sub-shell-generation/sub-shell-generation.test.ts
patch: @@ -4,6 +4,8 @@ import * as cheerio from 'cheerio'
 describe('sub-shell-generation', () => {
   const { next, isNextDev, isNextDeploy } = nextTestSetup({
     files: __dirname,
+    // FIXME: re-enable once we've re-enabled the sub-shell generation in Vercel
+    skipDeployment: true,
   })
 
   if (isNextDev) {
Repository: denoland/deno
Pull request: fix(cli): Correct a small typo in help output

Fixes a typo in the description of the DENO_EMIT_CACHE_MODE help description.

closes: #29394



Changed files:
filename: cli/args/flags.rs
patch: @@ -1190,7 +1190,7 @@ static ENV_VARIABLES_HELP: &str = cstr!(
                           <p(245)>(defaults to $HOME/.deno/bin)</>
   <g>DENO_KV_DB_MODE</>        Controls whether Deno.openKv() API should use disk based or in-memory
                          database.
-  <g>DENO_EMIT_CACHE_MODE</>   Control is the transpiled sources should be cached.
+  <g>DENO_EMIT_CACHE_MODE</>   Control if the transpiled sources should be cached.
   <g>DENO_NO_PACKAGE_JSON</>   Disables auto-resolution of package.json
   <g>DENO_NO_UPDATE_CHECK</>   Set to disable checking if a newer Deno version is available
   <g>DENO_SERVE_ADDRESS</>     Override address for Deno.serve
Repository: electron/electron
Pull request: test: fix timing issue in `utilityProcess` test fixtures

#### Description of Change

Followup to #45690. The same race condition described there also exists in the `esm.js` and `dns-result-order.js` fixtures. This PR ensures that stdout's buffers are flushed before calling `process.exit()`.

This race condition's worth fixing in `electron/electron`; but FWIW, I'm only seeing this test fail on a downstream build's CI boxes, not in `electron/electron`'s GitHub Actions.

#### Checklist

- [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: none.

Changed files:
filename: spec/fixtures/api/utility-process/dns-result-order.js
patch: @@ -1,4 +1,6 @@
 const dns = require('node:dns');
 
-console.log(dns.getDefaultResultOrder());
-process.exit(0);
+const write = (writable, chunk) => new Promise((resolve) => writable.write(chunk, resolve));
+
+write(process.stdout, `${dns.getDefaultResultOrder()}\n`)
+  .then(() => process.exit(0));

filename: spec/fixtures/api/utility-process/esm.mjs
patch: @@ -1,2 +1,4 @@
-console.log(import.meta.url);
-process.exit(0);
+const write = (writable, chunk) => new Promise((resolve) => writable.write(chunk, resolve));
+
+write(process.stdout, `${import.meta.url}\n`)
+  .then(() => process.exit(0));
Repository: denoland/deno
Pull request: test(ext/node): run .mjs test files

`run_all_test_unmodified.ts` missed running `.mjs` test scripts in Node test cases. This PR fixes it.

Note: There are 196 .mjs test cases in vendored node test cases. This seems affecting node compat result in a negative way (I got the number `1482/4125 (35.93%)` from the local run)

Note: There seems no `.ts` or `.cjs` test cases (They only appear in fixtures), but I also added them just in case.

Changed files:
filename: tests/node_compat/run_all_test_unmodified.ts
patch: @@ -384,7 +384,9 @@ async function main() {
   const tests = [] as string[];
   const categories = {} as Record<string, string[]>;
   for await (
-    const test of expandGlob("tests/node_compat/runner/suite/**/test-*.js")
+    const test of expandGlob(
+      "tests/node_compat/runner/suite/**/test-*{.mjs,.cjs.,.js,.ts}",
+    )
   ) {
     if (!test.isFile) continue;
     const relUrl = toFileUrl(test.path).href.replace(testDirUrl, "");
Repository: ggml-org/llama.cpp
Pull request: metal : avoid call free for non-owned buffer

App crash with `malloc: *** error for object xxx: pointer being freed was not allocated` on doing free context with mmap enabled. It seems caused by #15906.

Changed files:
filename: ggml/src/ggml-metal/ggml-metal-device.m
patch: @@ -824,6 +824,7 @@ bool ggml_metal_device_supports_op(ggml_metal_device_t dev, const struct ggml_te
 
     // if false, the Metal buffer data is allocated in private GPU memory and is not shared with the host
     bool is_shared;
+    bool owned;
 
     // multiple buffers are used only to avoid the maximum buffer size limitation when using mmap
     int n_buffers;
@@ -956,6 +957,7 @@ ggml_metal_buffer_t ggml_metal_buffer_init(ggml_metal_device_t dev, size_t size,
     if (shared) {
         res->all_data = ggml_metal_host_malloc(size_aligned);
         res->is_shared = true;
+        res->owned = true;
     } else {
         // dummy, non-NULL value - we'll populate this after creating the Metal buffer below
         res->all_data = (void *) 0x000000400ULL;
@@ -1014,6 +1016,7 @@ ggml_metal_buffer_t ggml_metal_buffer_map(ggml_metal_device_t dev, void * ptr, s
     res->all_size = size;
 
     res->is_shared = true;
+    res->owned = false;
 
     res->n_buffers = 0;
 
@@ -1107,7 +1110,7 @@ void ggml_metal_buffer_free(ggml_metal_buffer_t buf) {
 
     ggml_metal_buffer_rset_free(buf);
 
-    if (buf->is_shared) {
+    if (buf->is_shared && buf->owned) {
 #if TARGET_OS_OSX
         vm_deallocate((vm_map_t)mach_task_self(), (vm_address_t)buf->all_data, buf->all_size);
 #else
Repository: ggml-org/llama.cpp
Pull request: metal : handle nil cv during pipeline creation

alt #16064
fix #15977

Changed files:
filename: ggml/src/ggml-metal/ggml-metal-device.m
patch: @@ -327,12 +327,19 @@ ggml_metal_pipeline_t ggml_metal_library_compile_pipeline(ggml_metal_library_t l
 
         GGML_LOG_DEBUG("%s: compiling pipeline: base = '%s', name = '%s'\n", __func__, base, name);
 
-        id<MTLFunction> mtl_function = [lib->obj newFunctionWithName:base_func constantValues:(cv ? cv->obj : nil) error:&error];
+        id<MTLFunction> mtl_function;
+        if (!cv) {
+            mtl_function = [lib->obj newFunctionWithName:base_func];
+        } else {
+            mtl_function = [lib->obj newFunctionWithName:base_func constantValues:cv->obj error:&error];
+        }
         if (!mtl_function) {
             ggml_critical_section_end();
 
             GGML_LOG_ERROR("%s: error: failed to compile pipeline: base = '%s', name = '%s'\n", __func__, base, name);
-            GGML_LOG_ERROR("%s: error: %s\n", __func__, [[error description] UTF8String]);
+            if (error) {
+                GGML_LOG_ERROR("%s: error: %s\n", __func__, [[error description] UTF8String]);
+            }
 
             return nil;
         }
Repository: nodejs/node
Pull request: test: remove references to create(De|C)ipher

Both `createCipher()` and `createDecipher()` were removed in Node.js 22.

<!--
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-crypto-authenticated.js
patch: @@ -245,7 +245,7 @@ for (const test of TEST_CASES) {
   assert.strictEqual(text.toString('utf8'), 'node');
 }
 
-// Test that create(De|C)ipher(iv)? throws if the mode is CCM and an invalid
+// Test that create(De|C)ipheriv throws if the mode is CCM and an invalid
 // authentication tag length has been specified.
 {
   for (const authTagLength of [-1, true, false, NaN, 5.5]) {
@@ -303,7 +303,7 @@ for (const test of TEST_CASES) {
   }
 }
 
-// Test that create(De|C)ipher(iv)? throws if the mode is CCM or OCB and no
+// Test that create(De|C)ipheriv throws if the mode is CCM or OCB and no
 // authentication tag has been specified.
 {
   for (const mode of ['ccm', 'ocb']) {
@@ -315,7 +315,7 @@ for (const test of TEST_CASES) {
       message: `authTagLength required for aes-256-${mode}`
     });
 
-    // CCM decryption and create(De|C)ipher are unsupported in FIPS mode.
+    // CCM decryption is unsupported in FIPS mode.
     if (!isFipsEnabled) {
       assert.throws(() => {
         crypto.createDecipheriv(`aes-256-${mode}`,
Repository: ggml-org/llama.cpp
Pull request: CANN: remove print

Just remove a printf

Changed files:
filename: ggml/src/ggml-cann/ggml-cann.cpp
patch: @@ -1728,7 +1728,6 @@ static bool ggml_cann_compute_forward(ggml_backend_cann_context& ctx,
             ggml_cann_get_rows(ctx, dst);
             break;
         case GGML_OP_SET_ROWS:
-            std::cout << "lcg GGML_OP_SET_ROWS"<< std::endl;
             ggml_cann_set_rows(ctx, dst);
             break;
         case GGML_OP_DUP:
Repository: denoland/deno
Pull request: fix(coverage): pass DENO_COVERAGE_DIR env var correctly

This was missed in https://github.com/denoland/deno/pull/28291

This PR fixes the env var set when code coverage is enabled.

This prepares for supporting coverage from child process https://github.com/denoland/deno/issues/16440

Changed files:
filename: cli/main.rs
patch: @@ -308,7 +308,7 @@ async fn run_subcommand(
           // this is set in order to ensure spawned processes use the same
           // coverage directory
           env::set_var(
-            "DENO_UNSTABLE_COVERAGE_DIR",
+            "DENO_COVERAGE_DIR",
             PathBuf::from(coverage_dir).canonicalize()?,
           );
         }

filename: tests/testdata/coverage/complex_test.ts
patch: @@ -34,3 +34,18 @@ Deno.test("sub process with deno eval", () => {
     throw new Error("Failed");
   }
 });
+
+Deno.test("DENO_COVERAGE_DIR is set and passed down to child process", () => {
+  const coverageDir = Deno.env.get("DENO_COVERAGE_DIR");
+  if (coverageDir === undefined) {
+    throw new Error("DENO_COVERAGE_DIR is not set");
+  }
+  const code = "console.log(Deno.env.get('DENO_COVERAGE_DIR'))";
+  const { stdout } = new Deno.Command(Deno.execPath(), {
+    args: ["eval", code],
+  }).outputSync();
+  const output = new TextDecoder().decode(stdout);
+  if (output.trim() !== coverageDir) {
+    throw new Error("Failed");
+  }
+});
Repository: huggingface/transformers
Pull request: Fix EfficientLoFTR model id in tests

# What does this PR do?

Fix the incorrect model id in the tests

## Before submitting
- [x] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] 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).
- [x] Did you write any new necessary tests?

## Who can review?

@qubvel 

Changed files:
filename: tests/models/efficientloftr/test_modeling_efficientloftr.py
patch: @@ -273,7 +273,7 @@ def check_attention_output(inputs_dict, config, model_class):
 
     @slow
     def test_model_from_pretrained(self):
-        from_pretrained_ids = ["stevenbucaille/efficientloftr"]
+        from_pretrained_ids = ["zju-community/efficientloftr"]
         for model_name in from_pretrained_ids:
             model = EfficientLoFTRForKeypointMatching.from_pretrained(model_name)
             self.assertIsNotNone(model)
@@ -414,12 +414,12 @@ def prepare_imgs():
 class EfficientLoFTRModelIntegrationTest(unittest.TestCase):
     @cached_property
     def default_image_processor(self):
-        return AutoImageProcessor.from_pretrained("stevenbucaille/efficientloftr") if is_vision_available() else None
+        return AutoImageProcessor.from_pretrained("zju-community/efficientloftr") if is_vision_available() else None
 
     @slow
     def test_inference(self):
         model = EfficientLoFTRForKeypointMatching.from_pretrained(
-            "stevenbucaille/efficientloftr", attn_implementation="eager"
+            "zju-community/efficientloftr", attn_implementation="eager"
         ).to(torch_device)
         preprocessor = self.default_image_processor
         images = prepare_imgs()
Repository: denoland/deno
Pull request: fix(ext/node): implement `before` and `after` hooks in `node:test`

Ref https://github.com/denoland/deno/issues/29360 and https://github.com/denoland/deno/issues/28837. Needed for `node:sqlite` tests

Changed files:
filename: ext/node/polyfills/testing.ts
patch: @@ -6,6 +6,8 @@ const {
   ArrayPrototypePush,
   ArrayPrototypeForEach,
   SafePromiseAll,
+  TypeError,
+  SafeArrayIterator,
   SafePromisePrototypeFinally,
   Symbol,
 } = primordials;
@@ -54,6 +56,8 @@ const skippedSymbol = Symbol("skipped");
 
 class NodeTestContext {
   #denoContext: Deno.TestContext;
+  #afterHooks: (() => void)[] = [];
+  #beforeHooks: (() => void)[] = [];
   #parent: NodeTestContext | undefined;
   #skipped = false;
 
@@ -109,6 +113,16 @@ class NodeTestContext {
     const prepared = prepareOptions(name, options, fn, {});
     // deno-lint-ignore no-this-alias
     const parentContext = this;
+    const after = async () => {
+      for (const hook of new SafeArrayIterator(this.#afterHooks)) {
+        await hook();
+      }
+    };
+    const before = async () => {
+      for (const hook of new SafeArrayIterator(this.#beforeHooks)) {
+        await hook();
+      }
+    };
     return PromisePrototypeThen(
       this.#denoContext.step({
         name: prepared.name,
@@ -118,11 +132,16 @@ class NodeTestContext {
             parentContext,
           );
           try {
+            await before();
             await prepared.fn(newNodeTextContext);
+            await after();
           } catch (err) {
             if (!newNodeTextContext[skippedSymbol]) {
               throw err;
             }
+            try {
+              await after();
+            } catch { /* ignore, test is already failing */ }
           }
         },
         ignore: prepared.options.todo || prepared.options.skip,
@@ -134,12 +153,18 @@ class NodeTestContext {
     );
   }
 
-  before(_fn, _options) {
-    notImplemented("test.TestContext.before");
+  before(fn, _options) {
+    if (typeof fn !== "function") {
+      throw new TypeError("before() requires a function");
+    }
+    ArrayPrototypePush(this.#beforeHooks, fn);
   }
 
-  after(_fn, _options) {
-    notImplemented("test.TestContext.after");
+  after(fn, _options) {
+    if (typeof fn !== "function") {
+      throw new TypeError("after() requires a function");
+    }
+    ArrayPrototypePush(this.#afterHooks, fn);
   }
 
   beforeEach(_fn, _options) {
Repository: facebook/react
Pull request: Convert ReactMultiChildText to createRoot


Changed files:
filename: packages/react-dom/src/__tests__/ReactMultiChildText-test.js
patch: @@ -11,7 +11,6 @@
 
 const React = require('react');
 const ReactDOMClient = require('react-dom/client');
-const ReactTestUtils = require('react-dom/test-utils');
 const act = require('internal-test-utils').act;
 
 // Helpers
@@ -174,46 +173,67 @@ describe('ReactMultiChildText', () => {
     ]);
   });
 
-  it('should throw if rendering both HTML and children', () => {
-    expect(function () {
-      ReactTestUtils.renderIntoDocument(
-        <div dangerouslySetInnerHTML={{__html: 'abcdef'}}>ghjkl</div>,
-      );
-    }).toThrow();
+  it('should throw if rendering both HTML and children', async () => {
+    const container = document.createElement('div');
+    const root = ReactDOMClient.createRoot(container);
+    await expect(
+      act(() => {
+        root.render(
+          <div dangerouslySetInnerHTML={{__html: 'abcdef'}}>ghjkl</div>,
+        );
+      }),
+    ).rejects.toThrow();
   });
 
-  it('should render between nested components and inline children', () => {
-    ReactTestUtils.renderIntoDocument(
-      <div>
-        <h1>
-          <span />
-          <span />
-        </h1>
-      </div>,
-    );
-
-    expect(function () {
-      ReactTestUtils.renderIntoDocument(
-        <div>
-          <h1>A</h1>
-        </div>,
-      );
-    }).not.toThrow();
-
-    expect(function () {
-      ReactTestUtils.renderIntoDocument(
-        <div>
-          <h1>{['A']}</h1>
-        </div>,
-      );
-    }).not.toThrow();
+  it('should render between nested components and inline children', async () => {
+    let container = document.createElement('div');
+    let root = ReactDOMClient.createRoot(container);
 
-    expect(function () {
-      ReactTestUtils.renderIntoDocument(
+    await act(() => {
+      root.render(
         <div>
-          <h1>{['A', 'B']}</h1>
+          <h1>
+            <span />
+            <span />
+          </h1>
         </div>,
       );
-    }).not.toThrow();
+    });
+
+    container = document.createElement('div');
+    root = ReactDOMClient.createRoot(container);
+    await expect(
+      act(() => {
+        root.render(
+          <div>
+            <h1>A</h1>
+          </div>,
+        );
+      }),
+    ).resolves.not.toThrow();
+
+    container = document.createElement('div');
+    root = ReactDOMClient.createRoot(container);
+    await expect(
+      act(() => {
+        root.render(
+          <div>
+            <h1>{['A']}</h1>
+          </div>,
+        );
+      }),
+    ).resolves.not.toThrow();
+
+    container = document.createElement('div');
+    root = ReactDOMClient.createRoot(container);
+    await expect(
+      act(() => {
+        root.render(
+          <div>
+            <h1>{['A', 'B']}</h1>
+          </div>,
+        );
+      }),
+    ).resolves.not.toThrow();
   });
 });