helloadhavan/github_issues huggingface dataset:
Repository: facebook/react
Pull request: Fixed wrong method call for LRU cache

Noticed this bug when inspecting a downstream issue problem. DevTools calls a `remove` method but the LRU cache library doesn't actually define a "remove" method, rather it has a `del` method. (Newer versions of the library have a `delete` method.)

Related to https://github.com/RecordReplay/devtools/issues/6318

Changed files:
filename: packages/react-devtools-shared/src/inspectedElementMutableSource.js
patch: @@ -102,7 +102,7 @@ export function inspectElement({
       case 'not-found':
         // This is effectively a no-op.
         // If the Element is still in the Store, we can eagerly remove it from the Map.
-        inspectedElementCache.remove(id);
+        inspectedElementCache.del(id);
 
         throw Error(`Element "${id}" not found`);
 

filename: packages/react-devtools-shared/src/types.js
patch: @@ -86,9 +86,9 @@ export type HookSourceLocationKey = string;
 export type HookNames = Map<HookSourceLocationKey, HookName>;
 
 export type LRUCache<K, V> = {|
+  del: (key: K) => void,
   get: (key: K) => V,
   has: (key: K) => boolean,
-  remove: (key: K) => void,
   reset: () => void,
   set: (key: K, value: V) => void,
 |};
Repository: ggml-org/llama.cpp
Pull request: use LOG_WARN to replace `std::cerr`

*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-vulkan/ggml-vulkan.cpp
patch: @@ -9264,8 +9264,7 @@ static ggml_backend_buffer_t ggml_backend_vk_host_buffer_type_alloc_buffer(ggml_
     try {
         ptr = ggml_vk_host_malloc(vk_instance.devices[0], size);
     } catch (vk::SystemError& e) {
-        std::cerr << "ggml_vulkan: Failed to allocate pinned memory." << std::endl;
-        std::cerr << "ggml_vulkan: " << e.what() << std::endl;
+        GGML_LOG_WARN("ggml_vulkan: Failed to allocate pinned memory (%s)\n", e.what());
         // fallback to cpu buffer
         return ggml_backend_buft_alloc_buffer(ggml_backend_cpu_buffer_type(), size);
     }
Repository: ggml-org/llama.cpp
Pull request: tts : fix n_ubatch + make WavTokenizer cache-less

fix #13712 

- Set the WavTokenizer `n_ubatch == n_batch` since it is computing embeddings
- Use `llama_encode()` instead of `llama_decode()` with the WavTokenizer context
- The WavTokenizer does not need a KV cache, so we now no longer create it. This saves about ~800 MB of memory.

Changed files:
filename: src/llama-model.cpp
patch: @@ -13189,6 +13189,7 @@ llama_memory_i * llama_model::create_memory(const llama_memory_params & params,
         case LLM_ARCH_JINA_BERT_V2:
         case LLM_ARCH_NOMIC_BERT:
         case LLM_ARCH_NOMIC_BERT_MOE:
+        case LLM_ARCH_WAVTOKENIZER_DEC:
             {
                 res = nullptr;
             } break;

filename: tools/tts/tts.cpp
patch: @@ -579,6 +579,8 @@ int main(int argc, char ** argv) {
 
     params.model = params.vocoder.model;
     params.embedding = true;
+    params.ctx_shift = false; // silence warning
+    params.n_ubatch = params.n_batch;
 
     common_init_result llama_init_cts = common_init_from_params(params);
 
@@ -1020,8 +1022,8 @@ lovely<|t_0.56|>






<|14
     }
     GGML_ASSERT(batch.n_tokens == n_codes);
 
-    if (llama_decode(ctx_cts, batch) != 0) {
-        LOG_ERR("%s: llama_decode() failed\n", __func__);
+    if (llama_encode(ctx_cts, batch) != 0) {
+        LOG_ERR("%s: llama_encode() failed\n", __func__);
         return 1;
     }
Repository: facebook/react
Pull request: ignore checking client entry point for UMD build

<!--
  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

it solve (React DOM UMD always warns in React 18 #24221)
for UMD build it does not matter entry point, so we can ignore checking entry point.

## How did you test this change?

build react-dom and check bundle file (react-dom.development.js)

<!--
  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/react-dom/src/client/ReactDOM.js
patch: @@ -149,7 +149,7 @@ function createRoot(
   options?: CreateRootOptions,
 ): RootType {
   if (__DEV__) {
-    if (!Internals.usingClientEntryPoint) {
+    if (!Internals.usingClientEntryPoint && !__UMD__) {
       console.error(
         'You are importing createRoot from "react-dom" which is not supported. ' +
           'You should instead import it from "react-dom/client".',
@@ -165,7 +165,7 @@ function hydrateRoot(
   options?: HydrateRootOptions,
 ): RootType {
   if (__DEV__) {
-    if (!Internals.usingClientEntryPoint) {
+    if (!Internals.usingClientEntryPoint && !__UMD__) {
       console.error(
         'You are importing hydrateRoot from "react-dom" which is not supported. ' +
           'You should instead import it from "react-dom/client".',
Repository: nodejs/node
Pull request: tools: fix loong64 build failed

<!--
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.
-->

Fix LoongArch64 build error
https://github.com/nodejs/unofficial-builds/issues/154
https://github.com/nodejs/node/issues/56280


Changed files:
filename: tools/v8_gypfiles/v8.gyp
patch: @@ -1230,6 +1230,11 @@
                     '<(V8_ROOT)/src/trap-handler/handler-outside-posix.cc',
                   ],
                 }],
+                ['(_toolset=="host" and host_arch=="x64" or _toolset=="target" and target_arch=="x64") and (OS=="linux")', {
+                  'sources': [
+                    '<(V8_ROOT)/src/trap-handler/handler-outside-simulator.cc',
+                  ],
+                }],
               ],
             }],
           ],
Repository: huggingface/transformers
Pull request: Fix: Correct tensor shape comment in Mamba modeling

# What does this PR do?

Correct a wrong tensor shape comment in Mamba modeling.

Fixes # (None, as no issue was explicitly mentioned)

The comment on line 307 of `src/transformers/models/mamba/modeling_mamba.py` incorrectly states the shape of the tensor `scan_output`. It should be `[batch, intermediade_size, seq_len]` instead of `[batch, seq_len, intermediade_size]`.

`scan_outputs` is a list of `seq_len` `[batch, intermediade_size]` tensors. When stack them on dimension `-1`, the correct shape should be `[batch, intermediade_size, seq_len]`.

## 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).
- [ ] Did you write any new necessary tests? (Not applicable for a comment correction)


## Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@ArthurZucker @alxndrTL 

Changed files:
filename: src/transformers/models/mamba/modeling_mamba.py
patch: @@ -301,10 +301,10 @@ def slow_forward(self, input_states, cache_params: Optional[MambaCache]=None, ca
         else:
             scan_outputs = []
             for i in range(seq_len):
-                ssm_state = discrete_A[:, :, i, :] * ssm_state + deltaB_u[:, :, i, :]      # [batch, intermediade_size, ssm_state]
-                scan_output = torch.matmul(ssm_state.to(dtype), C[:, i, :].unsqueeze(-1))  # [batch, intermediade_size, 1]
+                ssm_state = discrete_A[:, :, i, :] * ssm_state + deltaB_u[:, :, i, :]      # [batch, intermediate_size, ssm_state]
+                scan_output = torch.matmul(ssm_state.to(dtype), C[:, i, :].unsqueeze(-1))  # [batch, intermediate_size, 1]
                 scan_outputs.append(scan_output[:, :, 0])
-            scan_output = torch.stack(scan_outputs, dim=-1)                                # [batch, seq_len, intermediade_size]
+            scan_output = torch.stack(scan_outputs, dim=-1)                                # [batch, intermediate_size, seq_len]
             scan_output = scan_output + (hidden_states * self.D[None, :, None])
             scan_output = (scan_output * self.act(gate))
Repository: denoland/deno
Pull request: fix(cli): Map error kind to `PermissionDenied` when symlinking fails due to permissions

Fixes https://github.com/denoland/deno/issues/25333.

We fall back to junctions if the error kind is `PermissionDenied` but the std library actually sets the kind to `Uncategorized` if the symlink fails due to insufficient privileges. This was causing the fallback to not actually fall back in this case.

Changed files:
filename: cli/util/fs.rs
patch: @@ -496,9 +496,9 @@ pub fn hard_link_dir_recursive(from: &Path, to: &Path) -> Result<(), AnyError> {
 }
 
 pub fn symlink_dir(oldpath: &Path, newpath: &Path) -> Result<(), Error> {
-  let err_mapper = |err: Error| {
+  let err_mapper = |err: Error, kind: Option<ErrorKind>| {
     Error::new(
-      err.kind(),
+      kind.unwrap_or_else(|| err.kind()),
       format!(
         "{}, symlink '{}' -> '{}'",
         err,
@@ -510,12 +510,19 @@ pub fn symlink_dir(oldpath: &Path, newpath: &Path) -> Result<(), Error> {
   #[cfg(unix)]
   {
     use std::os::unix::fs::symlink;
-    symlink(oldpath, newpath).map_err(err_mapper)?;
+    symlink(oldpath, newpath).map_err(|e| err_mapper(e, None))?;
   }
   #[cfg(not(unix))]
   {
     use std::os::windows::fs::symlink_dir;
-    symlink_dir(oldpath, newpath).map_err(err_mapper)?;
+    symlink_dir(oldpath, newpath).map_err(|err| {
+      if let Some(code) = err.raw_os_error() {
+        if code as u32 == winapi::shared::winerror::ERROR_PRIVILEGE_NOT_HELD {
+          return err_mapper(err, Some(ErrorKind::PermissionDenied));
+        }
+      }
+      err_mapper(err, None)
+    })?;
   }
   Ok(())
 }
Repository: electron/electron
Pull request: build: stop dependabot doing things

Per the docs setting the PR limit to 0 keeps security updates but stops the "hey you wanna update this dep for no reason" PRs.

I left the "hey you wanna update this dep" PRs on for `main` with a limit of 2 per day because we should stay up to date with stuff, but like, it's not that important.

Notes: none

Changed files:
filename: .github/dependabot.yml
patch: @@ -52,7 +52,7 @@ updates:
       interval: daily
     labels:
       - "no-backport"
-    open-pull-requests-limit: 5
+    open-pull-requests-limit: 2
     target-branch: 33-x-y
   - package-ecosystem: npm
     directories:
@@ -63,7 +63,7 @@ updates:
       interval: daily
     labels:
       - "no-backport"
-    open-pull-requests-limit: 5
+    open-pull-requests-limit: 0
     target-branch: main
   - package-ecosystem: npm
     directories:
@@ -74,7 +74,7 @@ updates:
       interval: daily
     labels:
       - "no-backport"
-    open-pull-requests-limit: 5
+    open-pull-requests-limit: 0
     target-branch: 32-x-y
   - package-ecosystem: npm
     directories:
@@ -85,7 +85,7 @@ updates:
       interval: daily
     labels:
       - "no-backport"
-    open-pull-requests-limit: 5
+    open-pull-requests-limit: 0
     target-branch: 31-x-y
   - package-ecosystem: npm
     directories:
@@ -96,5 +96,5 @@ updates:
       interval: daily
     labels:
       - "no-backport"
-    open-pull-requests-limit: 5
+    open-pull-requests-limit: 0
     target-branch: 30-x-y
\ No newline at end of file
Repository: ggml-org/llama.cpp
Pull request: common: Include torch package for s390x

This pull request introduces the `torch` package into `requirements.txt` for the s390x architecture.

### Problem
At current, the `torch` package for the s390x architecture cannot be found on PyTorch's stable build; only the nightly builds include wheels for s390x.

As a result, trying to install packages using the `requirements.txt` would fail. Otherwise, conda would have to be used to resolve the `torch` dependency issue.

Additionally, going the conda route would require further manual patches as documented in my blog here: https://medium.com/@taronaeo/running-any-llm-on-mainframes-s390x-d5acc56ea649#:~:text=Step%205%3A%20Install%20Required%20Python%20Packages

### Resolution
This PR segregates the `torch~=2.2.1` requirement from all other platforms by using the requirement specifiers and only installs `torch` from the nightly build for the s390x architecture.

This effectively removes the friction of installing packages from `requirements.txt` on the s390x architecture.

### Verification
To ensure that this PR did not break anything, the `pip3 install -r requirements.txt` command has been tested on the following machines:
* Tested on IBM z15 Mainframe
* Tested on M3 MacBook Air
* Kindly request additional architectures to be tested

> [!NOTE]  
> Tests were conducted on an IBM z15 Mainframe with 16 IFLs (cores) and 160 GB Memory on an LPAR.

Please review this pull request and consider merging into the main repository. Thank you!

Changed files:
filename: requirements/requirements-convert_hf_to_gguf.txt
patch: @@ -1,3 +1,7 @@
 -r ./requirements-convert_legacy_llama.txt
 --extra-index-url https://download.pytorch.org/whl/cpu
-torch~=2.2.1
+torch~=2.2.1; platform_machine != "s390x"
+
+# torch s390x packages can only be found from nightly builds
+--extra-index-url https://download.pytorch.org/whl/nightly
+torch>=0.0.0.dev0; platform_machine == "s390x"

filename: requirements/requirements-convert_hf_to_gguf_update.txt
patch: @@ -1,3 +1,7 @@
 -r ./requirements-convert_legacy_llama.txt
 --extra-index-url https://download.pytorch.org/whl/cpu
-torch~=2.2.1
+torch~=2.2.1; platform_machine != "s390x"
+
+# torch s390x packages can only be found from nightly builds
+--extra-index-url https://download.pytorch.org/whl/nightly
+torch>=0.0.0.dev0; platform_machine == "s390x"

filename: requirements/requirements-convert_lora_to_gguf.txt
patch: @@ -1,2 +1,4 @@
 -r ./requirements-convert_hf_to_gguf.txt
 --extra-index-url https://download.pytorch.org/whl/cpu
+# torch s390x packages can only be found from nightly builds
+--extra-index-url https://download.pytorch.org/whl/nightly
Repository: denoland/deno
Pull request: fix(install): recommend using `deno install -g` when using a single http url

Closes https://github.com/denoland/deno/issues/25361

Changed files:
filename: cli/args/flags.rs
patch: @@ -237,7 +237,6 @@ pub struct InstallFlagsGlobal {
 
 #[derive(Clone, Debug, Eq, PartialEq)]
 pub enum InstallKind {
-  #[allow(unused)]
   Local(Option<AddFlags>),
   Global(InstallFlagsGlobal),
 }

filename: cli/tools/installer.rs
patch: @@ -15,6 +15,7 @@ use crate::factory::CliFactory;
 use crate::http_util::HttpClientProvider;
 use crate::util::fs::canonicalize_path_maybe_not_exists;
 
+use deno_core::anyhow::bail;
 use deno_core::anyhow::Context;
 use deno_core::error::generic_error;
 use deno_core::error::AnyError;
@@ -284,6 +285,24 @@ async fn install_local(
   Ok(())
 }
 
+fn check_if_installs_a_single_package_globally(
+  maybe_add_flags: Option<&AddFlags>,
+) -> Result<(), AnyError> {
+  let Some(add_flags) = maybe_add_flags else {
+    return Ok(());
+  };
+  if add_flags.packages.len() != 1 {
+    return Ok(());
+  }
+  let Ok(url) = Url::parse(&add_flags.packages[0]) else {
+    return Ok(());
+  };
+  if matches!(url.scheme(), "http" | "https") {
+    bail!("Failed to install \"{}\" specifier. If you are trying to install {} globally, run again with `-g` flag:\n  deno install -g {}", url.scheme(), url.as_str(), url.as_str());
+  }
+  Ok(())
+}
+
 pub async fn install_command(
   flags: Arc<Flags>,
   install_flags: InstallFlags,
@@ -297,6 +316,7 @@ pub async fn install_command(
       install_global(flags, global_flags).await
     }
     InstallKind::Local(maybe_add_flags) => {
+      check_if_installs_a_single_package_globally(maybe_add_flags.as_ref())?;
       install_local(flags, maybe_add_flags).await
     }
   }

filename: tests/specs/install/install_single_http_url_without_global_flag/__test__.jsonc
patch: @@ -0,0 +1,14 @@
+{
+  "steps": [
+    {
+      "args": "install http://example.com",
+      "output": "install_http.out",
+      "exitCode": 1
+    },
+    {
+      "args": "install https://example.com",
+      "output": "install_https.out",
+      "exitCode": 1
+    }
+  ]
+}

filename: tests/specs/install/install_single_http_url_without_global_flag/install_http.out
patch: @@ -0,0 +1,2 @@
+error: Failed to install "http" specifier. If you are trying to install http://example.com/ globally, run again with `-g` flag:
+  deno install -g http://example.com/

filename: tests/specs/install/install_single_http_url_without_global_flag/install_https.out
patch: @@ -0,0 +1,2 @@
+error: Failed to install "https" specifier. If you are trying to install https://example.com/ globally, run again with `-g` flag:
+  deno install -g https://example.com/
Repository: vercel/next.js
Pull request: Turbopack: fix task data category

### What?

fix a debug assertion in the test suite due to a wrong task data category

this bug was introduced in https://github.com/vercel/next.js/pull/78728 (15.4.0-canary.23)

Closes PACK-4534

Changed files:
filename: turbopack/crates/turbo-tasks-backend/src/backend/mod.rs
patch: @@ -421,7 +421,7 @@ impl<B: BackingStorage> TurboTasksBackendInner<B> {
         }
 
         let mut ctx = self.execute_context(turbo_tasks);
-        let mut task = ctx.task(task_id, TaskDataCategory::Meta);
+        let mut task = ctx.task(task_id, TaskDataCategory::All);
 
         fn listen_to_done_event<B: BackingStorage>(
             this: &TurboTasksBackendInner<B>,
@@ -492,7 +492,7 @@ impl<B: BackingStorage> TurboTasksBackendInner<B> {
                         &mut ctx,
                     );
                 }
-                task = ctx.task(task_id, TaskDataCategory::Meta);
+                task = ctx.task(task_id, TaskDataCategory::All);
             }
 
             let is_dirty =
Repository: huggingface/transformers
Pull request: [config] revert #37603

# What does this PR do?

#37603 introduced a regression by deleting a key from config which should not be deleted. This PR reverts the change

cc @BenjaminBossan to verify it works for PEFT


Changed files:
filename: src/transformers/configuration_utils.py
patch: @@ -845,6 +845,10 @@ def to_diff_dict(self) -> dict[str, Any]:
 
         self._remove_keys_not_serialized(serializable_config_dict)
 
+        # Key removed only in diff dict
+        if "_name_or_path" in serializable_config_dict:
+            del serializable_config_dict["_name_or_path"]
+
         if hasattr(self, "quantization_config"):
             serializable_config_dict["quantization_config"] = (
                 self.quantization_config.to_dict()
@@ -1005,8 +1009,6 @@ def _remove_keys_not_serialized(self, d: dict[str, Any]) -> None:
         # Do not serialize `base_model_pp_plan` for now
         if "base_model_pp_plan" in d:
             del d["base_model_pp_plan"]
-        if "_name_or_path" in d:
-            del d["_name_or_path"]
         for value in d.values():
             if isinstance(value, dict):
                 self._remove_keys_not_serialized(value)