helloadhavan/github_issues huggingface dataset:
Repository: vercel/next.js
Pull request: Turbopack: dedupe additional traced references

Fix a duplicated `[externals]/next/dist/server/app-render/work-unit-async-storage.external.js [external]`
This was due to the additional references containing duplicates in one case, but not in the other. So just always dedupe them.

But this whole test is very odd: 
https://github.com/vercel/next.js/blob/94ef480642bc44e46e9a286b191d6a3dc42a9fb4/test/e2e/app-dir/app-external/app/async-storage/page.js#L1-L6


Closes PACK-4385

Changed files:
filename: turbopack/crates/turbopack/src/lib.rs
patch: @@ -26,7 +26,7 @@ use graph::{aggregate, AggregatedGraph, AggregatedGraphNodeContent};
 use module_options::{ModuleOptions, ModuleOptionsContext, ModuleRuleEffect, ModuleType};
 use tracing::{field::Empty, Instrument};
 use turbo_rcstr::RcStr;
-use turbo_tasks::{ResolvedVc, Value, ValueToString, Vc};
+use turbo_tasks::{FxIndexSet, ResolvedVc, Value, ValueToString, Vc};
 use turbo_tasks_fs::{glob::Glob, FileSystemPath};
 pub use turbopack_core::condition;
 use turbopack_core::{
@@ -840,7 +840,8 @@ impl AssetContext for ModuleAssetContext {
                                             external_result
                                                 .primary_modules_raw_iter()
                                                 .map(|rvc| *rvc),
-                                        );
+                                        )
+                                        .collect::<FxIndexSet<_>>();
 
                                     modules
                                         .into_iter()
Repository: nodejs/node
Pull request: module: simplify `findPackageJSON` implementation

Fixes: https://github.com/nodejs/node/pull/55412#discussion_r1816314305
<!--
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: lib/internal/modules/package_json_reader.js
patch: @@ -7,7 +7,6 @@ const {
   RegExpPrototypeExec,
   StringPrototypeIndexOf,
   StringPrototypeSlice,
-  StringPrototypeStartsWith,
 } = primordials;
 const {
   fileURLToPath,
@@ -285,22 +284,14 @@ function findPackageJSON(specifier, base = 'data:') {
     validateString(specifier, 'specifier');
   }
 
-  let parentURL;
-  if (isURL(base)) {
-    parentURL = new URL(base);
-  } else {
+  let parentURL = base;
+  if (!isURL(base)) {
     validateString(base, 'base');
-    if (
-      path.isAbsolute(base) ||
-      (URLCanParse(base) && !StringPrototypeStartsWith(base, 'file:'))
-    ) {
-      parentURL = pathToFileURL(path.toNamespacedPath(base));
-    } else {
-      parentURL = URL.parse(base) || pathToFileURL(base);
-    }
+    parentURL = path.isAbsolute(base) ? pathToFileURL(base) : new URL(base);
   }
 
   if (specifier && specifier[0] !== '.' && specifier[0] !== '/' && !URLCanParse(specifier)) {
+    // If `specifier` is a bare specifier.
     const { packageJSONPath } = getPackageJSONURL(specifier, parentURL);
     return packageJSONPath;
   }
Repository: facebook/react
Pull request: Revert changes to react-devtools-inline Webpack config from PR #22760

Resolves #22958

Changed files:
filename: packages/react-devtools-inline/webpack.config.js
patch: @@ -33,14 +33,6 @@ const babelOptions = {
   ),
 };
 
-const builtModulesDir = resolve(
-  __dirname,
-  '..',
-  '..',
-  'build',
-  'oss-experimental',
-);
-
 module.exports = {
   mode: __DEV__ ? 'development' : 'production',
   devtool: __DEV__ ? 'eval-cheap-source-map' : 'source-map',
@@ -57,10 +49,10 @@ module.exports = {
     libraryTarget: 'commonjs2',
   },
   externals: {
-    react: resolve(builtModulesDir, 'react'),
-    'react-dom': resolve(builtModulesDir, 'react-dom/unstable_testing'),
-    'react-is': resolve(builtModulesDir, 'react-is'),
-    scheduler: resolve(builtModulesDir, 'scheduler'),
+    react: 'react',
+    'react-dom': 'react-dom',
+    'react-is': 'react-is',
+    scheduler: 'scheduler',
   },
   node: {
     // source-maps package has a dependency on 'fs'
Repository: ggml-org/llama.cpp
Pull request: fix typo: `n_ctx_pre_seq` -> `n_ctx_per_seq`

Fixed a typo in src/llama-context.cpp:117: `n_ctx_pre_seq` --> `n_ctx_per_seq`

Changed files:
filename: src/llama-context.cpp
patch: @@ -114,7 +114,7 @@ llama_context::llama_context(
     }
 
     if (n_ctx_per_seq > hparams.n_ctx_train) {
-        LLAMA_LOG_WARN("%s: n_ctx_pre_seq (%u) > n_ctx_train (%u) -- possible training context overflow\n",
+        LLAMA_LOG_WARN("%s: n_ctx_per_seq (%u) > n_ctx_train (%u) -- possible training context overflow\n",
                 __func__, n_ctx_per_seq, hparams.n_ctx_train);
     }
Repository: facebook/react
Pull request: Re-added deleted files array to react-devtools package.json

Fixes #22959

This was an accidental regression introduced in #22949.

Changed files:
filename: packages/react-devtools/package.json
patch: @@ -11,7 +11,13 @@
   "bin": {
     "react-devtools": "./bin.js"
   },
-  "files": [],
+  "files": [
+    "bin.js",
+    "app.html",
+    "app.js",
+    "index.js",
+    "icons"
+  ],
   "scripts": {
     "start": "node bin.js"
   },
Repository: huggingface/transformers
Pull request: Fixes: Corrects file path for CUDA kernels

# What does this PR do?
Corrects the file path used to locate the CUDA kernels for the Deformable Attention module. This ensures that the kernels are loaded correctly, resolving potential errors during module initialization and usage.

## Who can review?

- vision models: @amyeroberts, @qubvel

Changed files:
filename: src/transformers/models/deprecated/deta/modeling_deta.py
patch: @@ -57,7 +57,7 @@ def load_cuda_kernels():
 
     global MultiScaleDeformableAttention
 
-    root = Path(__file__).resolve().parent.parent.parent / "kernels" / "deta"
+    root = Path(__file__).resolve().parent.parent.parent.parent / "kernels" / "deta"
     src_files = [
         root / filename
         for filename in [
Repository: vercel/next.js
Pull request: Update Turbopack development test manifest

This auto-generated PR updates the development integration test manifest used when testing Turbopack.

Changed files:
filename: test/turbopack-dev-tests-manifest.json
patch: @@ -2471,8 +2471,8 @@
   "test/development/app-dir/hmr-symlink/hmr-symlink.test.ts": {
     "passed": [
       "HMR symlinks tracks updates to symlinked target",
-      "HMR symlinks tracks updates to the symlink",
-      "HMR symlinks tracks updates to the middle of a symlink chain"
+      "HMR symlinks tracks updates to the middle of a symlink chain",
+      "HMR symlinks tracks updates to the symlink"
     ],
     "failed": [],
     "pending": [],
@@ -7836,7 +7836,9 @@
       "redirects and rewrites navigation using link should redirect from next.config.js correctly with empty query params",
       "redirects and rewrites navigation using link should redirect using catchall from next.config.js correctly",
       "redirects and rewrites navigation using link should rewrite from middleware correctly",
-      "redirects and rewrites navigation using link should rewrite from next.config.js correctly"
+      "redirects and rewrites navigation using link should rewrite from next.config.js correctly",
+      "redirects and rewrites redirects to exotic url schemes preserving slashes",
+      "redirects and rewrites redirects to exotic url schemes without adding unwanted slashes"
     ],
     "failed": [],
     "pending": [],
@@ -10968,7 +10970,9 @@
   },
   "test/e2e/persistent-caching/persistent-caching.test.ts": {
     "passed": [
-      "persistent-caching should allow to change files while stopped",
+      "persistent-caching should allow to change files while stopped (run 1)",
+      "persistent-caching should allow to change files while stopped (run 2)",
+      "persistent-caching should allow to change files while stopped (run 3)",
       "persistent-caching should persistent cache loaders"
     ],
     "failed": [],
Repository: ggml-org/llama.cpp
Pull request: fix wrong template in GLM4-0414

Reopening https://github.com/ggml-org/llama.cpp/pull/13099 because I broke my repo with a wrong git command and it automatically closed the PR.



@ngxson 
- I moved the check for GLM4 above so it gets higher priority.
> Instead of changing BOS, I think what should be done is to set add_add_bos(False) to prevent tokenize function from adding BOS to the sentence

I am not sure if I can do that. add_bos_token is automatically set to false by the HF model. I am forced to set it to PAD token because otherwise it would break the jinja templating system `./llama-server --jinja`.
The jinja code ignores the add_bos_token value and removes any BOS token it encounters.

This is the relevant code block.
https://github.com/ggml-org/llama.cpp/blob/e291450b7602d7a36239e4ceeece37625f838373/common/chat.cpp#L651
If I don't set the BOS token it would break the /props endpoint

ORIGINAL:
```
GLM4-0414 models were using the wrong legacy template, leading to a missing `[gMASK]<sop>` preamble.
The old code was returning `LLM_CHAT_TEMPLATE_GLMEDGE`

As a workaround you needed to launch `llama-server` with `--chat-template chatglm4`

After the patch the gguf should be regenerated or edited manually.
```


Changed files:
filename: convert_hf_to_gguf.py
patch: @@ -5154,7 +5154,7 @@ def set_vocab(self):
         special_vocab._set_special_token("eos", tokenizer.get_added_vocab()["
"])
         special_vocab._set_special_token("eot", tokenizer.get_added_vocab()["
"])
         special_vocab._set_special_token("unk", tokenizer.get_added_vocab()["
"])
-        special_vocab._set_special_token("bos", tokenizer.get_added_vocab()["[gMASK]"])
+        special_vocab._set_special_token("bos", tokenizer.get_added_vocab()["
"])
         special_vocab.add_to_gguf(self.gguf_writer)
 
     def set_gguf_parameters(self):

filename: src/llama-chat.cpp
patch: @@ -122,6 +122,8 @@ llm_chat_template llm_chat_detect_template(const std::string & tmpl) {
         }
     } else if (tmpl_contains("
") && tmpl_contains("
")) {
         return LLM_CHAT_TEMPLATE_PHI_3;
+    } else if (tmpl_contains("[gMASK]<sop>")) {
+        return LLM_CHAT_TEMPLATE_CHATGML_4;
     } else if (tmpl_contains("
") && tmpl_contains("
")) {
         return tmpl_contains("
") ? LLM_CHAT_TEMPLATE_FALCON_3 : LLM_CHAT_TEMPLATE_GLMEDGE;
     } else if (tmpl_contains("<|{{ item['role'] }}|>") && tmpl_contains("
")) {
@@ -155,8 +157,6 @@ llm_chat_template llm_chat_detect_template(const std::string & tmpl) {
     } else if (tmpl_contains("[gMASK]sop")) {
         // chatglm3-6b
         return LLM_CHAT_TEMPLATE_CHATGML_3;
-    } else if (tmpl_contains("[gMASK]<sop>")) {
-        return LLM_CHAT_TEMPLATE_CHATGML_4;
     } else if (tmpl_contains(LU8("<用户>"))) {
         // MiniCPM-3B-OpenHermes-2.5-v2-GGUF
         return LLM_CHAT_TEMPLATE_MINICPM;
Repository: huggingface/transformers
Pull request: enhance require_deterministic_for_xpu

While revisiting this PR https://github.com/huggingface/transformers/pull/30774,  we are for "still try to set it to deterministic for XPU (in the decorator body) and use it (despite you might get some failures at some points as I mentioned). You might get lucky" option from @ydshieh. XPU is seeking the same level of usability and coverage as CUDA. So, we need enable these numerical cases w/ deterministic enabled, if some still fail, we Intel guys need investigate.

I enhance the require_deterministic_for_xpu decorator, so if it's XPU, while enter the body, we will save the deterministic state and set it to True; while leaving, we will restore the prior deterministic state. So, we don't impact the global setting, just make it case specific.

@ydshieh , pls help review, thx.

Changed files:
filename: src/transformers/testing_utils.py
patch: @@ -139,7 +139,6 @@
     is_torch_available,
     is_torch_bf16_available_on_device,
     is_torch_bf16_gpu_available,
-    is_torch_deterministic,
     is_torch_fp16_available_on_device,
     is_torch_greater_or_equal,
     is_torch_hpu_available,
@@ -1073,12 +1072,19 @@ def require_torch_bf16_gpu(test_case):
 
 
 def require_deterministic_for_xpu(test_case):
-    if is_torch_xpu_available():
-        return unittest.skipUnless(is_torch_deterministic(), "test requires torch to use deterministic algorithms")(
-            test_case
-        )
-    else:
-        return test_case
+    @wraps(test_case)
+    def wrapper(*args, **kwargs):
+        if is_torch_xpu_available():
+            original_state = torch.are_deterministic_algorithms_enabled()
+            try:
+                torch.use_deterministic_algorithms(True)
+                return test_case(*args, **kwargs)
+            finally:
+                torch.use_deterministic_algorithms(original_state)
+        else:
+            return test_case(*args, **kwargs)
+
+    return wrapper
 
 
 def require_torch_tf32(test_case):

filename: tests/models/encoder_decoder/test_modeling_encoder_decoder.py
patch: @@ -936,6 +936,7 @@ def prepare_config_and_inputs(self):
         }
 
     @slow
+    @require_deterministic_for_xpu
     def test_roberta2roberta_summarization(self):
         model = EncoderDecoderModel.from_pretrained("google/roberta2roberta_L-24_bbc")
         model.to(torch_device)
@@ -1080,6 +1081,7 @@ def test_encoder_decoder_model_shared_weights(self):
         pass
 
     @slow
+    @require_deterministic_for_xpu
     def test_bert2gpt2_summarization(self):
         model = EncoderDecoderModel.from_pretrained("patrickvonplaten/bert2gpt2-cnn_dailymail-fp16")
 

filename: tests/models/speech_encoder_decoder/test_modeling_speech_encoder_decoder.py
patch: @@ -634,6 +634,7 @@ def prepare_config_and_inputs(self):
     def test_encoder_decoder_model_from_pretrained_configs(self):
         pass
 
+    @require_deterministic_for_xpu
     @unittest.skip(reason="Cannot save full model as Speech2TextModel != Speech2TextEncoder")
     def test_save_and_load_from_pretrained(self):
         pass
Repository: denoland/deno
Pull request: fix(http): Adjust hostname display for Windows when using 0.0.0.0

fix #24687

Changed files:
filename: ext/http/00_serve.ts
patch: @@ -657,7 +657,8 @@ function serve(arg1, arg2) {
   // If the hostname is "0.0.0.0", we display "localhost" in console
   // because browsers in Windows don't resolve "0.0.0.0".
   // See the discussion in https://github.com/denoland/deno_std/issues/1165
-  const hostname = addr.hostname == "0.0.0.0" || addr.hostname == "::"
+  const hostname = (addr.hostname == "0.0.0.0" || addr.hostname == "::") &&
+      (Deno.build.os === "windows")
     ? "localhost"
     : addr.hostname;
   addr.hostname = hostname;

filename: tests/integration/serve_tests.rs
patch: @@ -21,8 +21,8 @@ async fn deno_serve_port_0() {
   let mut buffer = [0; 52];
   let _read = stdout.read(&mut buffer).unwrap();
   let msg = std::str::from_utf8(&buffer).unwrap();
-  let port_regex = Regex::new(r"(\d+)").unwrap();
-  let port = port_regex.find(msg).unwrap().as_str();
+  let port_regex = Regex::new(r":(\d+)").unwrap();
+  let port = port_regex.captures(msg).unwrap().get(1).unwrap().as_str();
 
   let cert = reqwest::Certificate::from_pem(include_bytes!(
     "../testdata/tls/RootCA.crt"
@@ -64,8 +64,8 @@ async fn deno_serve_no_args() {
   let mut buffer = [0; 52];
   let _read = stdout.read(&mut buffer).unwrap();
   let msg = std::str::from_utf8(&buffer).unwrap();
-  let port_regex = Regex::new(r"(\d+)").unwrap();
-  let port = port_regex.find(msg).unwrap().as_str();
+  let port_regex = Regex::new(r":(\d+)").unwrap();
+  let port = port_regex.captures(msg).unwrap().get(1).unwrap().as_str();
 
   let cert = reqwest::Certificate::from_pem(include_bytes!(
     "../testdata/tls/RootCA.crt"

filename: tests/specs/serve/basic/__test__.jsonc
patch: @@ -1,5 +1,15 @@
 {
-  "args": "serve --port 12345 main.ts",
-  "output": "main.out",
-  "tempDir": true
+  "tempDir": true,
+  "tests": {
+    "basic_win": {
+      "if": "windows",
+      "args": "serve --host 0.0.0.0 --port 12345 main.ts",
+      "output": "main.out"
+    },
+    "basic_not_win": {
+      "if": "unix",
+      "args": "serve --host 0.0.0.0 --port 12345 main.ts",
+      "output": "main_not_win.out"
+    }
+  }
 }

filename: tests/specs/serve/basic/main_not_win.out
patch: @@ -0,0 +1 @@
+deno serve: Listening on http://0.0.0.0:12345/

filename: tests/unit/serve_test.ts
patch: @@ -748,9 +748,11 @@ Deno.test(
     const consoleLog = console.log;
     console.log = (msg) => {
       try {
-        const match = msg.match(/Listening on http:\/\/localhost:(\d+)\//);
+        const match = msg.match(
+          /Listening on http:\/\/(localhost|0\.0\.0\.0):(\d+)\//,
+        );
         assert(!!match, `Didn't match ${msg}`);
-        const port = +match[1];
+        const port = +match[2];
         assert(port > 0 && port < 65536);
       } finally {
         ac.abort();
Repository: nodejs/node
Pull request: tools: fix update-undici script

The `build:node` npm script now expects esbuild to be installed and
bin-linked.

Closes: https://github.com/nodejs/node/issues/56061



Changed files:
filename: tools/dep_updaters/update-undici.sh
patch: @@ -80,7 +80,7 @@ cd "$ROOT"
 
   # Rebuild components from source
   rm lib/llhttp/llhttp*.*
-  "$NODE" "$NPM" install --no-bin-link --ignore-scripts
+  "$NODE" "$NPM" install --ignore-scripts
   "$NODE" "$NPM" run build:wasm > lib/llhttp/wasm_build_env.txt
   "$NODE" "$NPM" run build:node
   "$NODE" "$NPM" prune --production
Repository: facebook/react
Pull request: Build both a partial renderer and fizz renderer of the legacy API for FB

This lets us test how the new architecture performs without comparing it to other infra changes related to streaming.

I renamed the streaming one to ReactDOMServerStreaming. The references to Fizz in www need to be updated to point to this file.

I'll open an adhoc sync with just those files.


Changed files:
filename: scripts/rollup/bundles.js
patch: @@ -259,9 +259,14 @@ const bundles = [
 
   /******* React DOM Server *******/
   {
-    bundleTypes: __EXPERIMENTAL__
-      ? [UMD_DEV, UMD_PROD, NODE_DEV, NODE_PROD]
-      : [UMD_DEV, UMD_PROD, NODE_DEV, NODE_PROD, FB_WWW_DEV, FB_WWW_PROD],
+    bundleTypes: [
+      UMD_DEV,
+      UMD_PROD,
+      NODE_DEV,
+      NODE_PROD,
+      FB_WWW_DEV,
+      FB_WWW_PROD,
+    ],
     moduleType: RENDERER,
     entry: 'react-dom/src/server/ReactDOMLegacyServerBrowser',
     name: 'react-dom-server-legacy.browser',
@@ -317,7 +322,7 @@ const bundles = [
     bundleTypes: __EXPERIMENTAL__ ? [FB_WWW_DEV, FB_WWW_PROD] : [],
     moduleType: RENDERER,
     entry: 'react-server-dom-relay/src/ReactDOMServerFB',
-    global: 'ReactDOMServer',
+    global: 'ReactDOMServerStreaming',
     minifyWithProdErrorCodes: false,
     wrapWithModuleBoundaries: false,
     externals: ['react'],
Repository: electron/electron
Pull request: fix: Launch apps with XDG_ACTIVATION_TOKEN in ozone/wayland

Backport of #43480

See that PR for details.


Notes: Fixed other apps not being focused when launched from electron ozone/wayland


Changed files:
filename: shell/common/platform_util_linux.cc
patch: @@ -22,6 +22,7 @@
 #include "base/posix/eintr_wrapper.h"
 #include "base/process/kill.h"
 #include "base/process/launch.h"
+#include "base/run_loop.h"
 #include "base/strings/escape.h"
 #include "base/strings/string_util.h"
 #include "base/threading/thread_restrictions.h"
@@ -269,8 +270,21 @@ std::string GetErrorDescription(int error_code) {
 bool XDGUtil(const std::vector<std::string>& argv,
              const base::FilePath& working_directory,
              const bool wait_for_exit,
+             const bool focus_launched_process,
              platform_util::OpenCallback callback) {
   base::LaunchOptions options;
+  if (focus_launched_process) {
+    base::RunLoop run_loop(base::RunLoop::Type::kNestableTasksAllowed);
+    base::RepeatingClosure quit_loop = run_loop.QuitClosure();
+    base::nix::CreateLaunchOptionsWithXdgActivation(base::BindOnce(
+        [](base::RepeatingClosure quit_loop, base::LaunchOptions* options_out,
+           base::LaunchOptions options) {
+          *options_out = std::move(options);
+          std::move(quit_loop).Run();
+        },
+        std::move(quit_loop), &options));
+    run_loop.Run();
+  }
   options.current_directory = working_directory;
   options.allow_new_privs = true;
   // xdg-open can fall back on mailcap which eventually might plumb through
@@ -302,11 +316,12 @@ bool XDGOpen(const base::FilePath& working_directory,
              const bool wait_for_exit,
              platform_util::OpenCallback callback) {
   return XDGUtil({"xdg-open", path}, working_directory, wait_for_exit,
-                 std::move(callback));
+                 /*focus_launched_process=*/true, std::move(callback));
 }
 
 bool XDGEmail(const std::string& email, const bool wait_for_exit) {
   return XDGUtil({"xdg-email", email}, base::FilePath(), wait_for_exit,
+                 /*focus_launched_process=*/true,
                  platform_util::OpenCallback());
 }
 
@@ -375,7 +390,8 @@ bool MoveItemToTrash(const base::FilePath& full_path, bool delete_on_fail) {
     argv = {"gio", "trash", filename};
   }
 
-  return XDGUtil(argv, base::FilePath(), true, platform_util::OpenCallback());
+  return XDGUtil(argv, base::FilePath(), true, /*focus_launched_process=*/false,
+                 platform_util::OpenCallback());
 }
 
 namespace internal {
Repository: ggml-org/llama.cpp
Pull request: examples: remove the unnecessary include

*Make sure to read the [contributing guidelines](https://github.com/ggml-org/llama.cpp/blob/master/CONTRIBUTING.md) before submitting a PR*

I found that the same header file was included twice, so I removed the duplicate include to clean up the code.

Changed files:
filename: examples/llava/clip-impl.h
patch: @@ -2,8 +2,6 @@
 #include "gguf.h"
 #include "clip.h"
 
-#include "clip.h"
-
 #include <climits>
 #include <cstdarg>
 #include <string>