helloadhavan/github_issues huggingface dataset:
Repository: denoland/deno
Pull request: fix: do not panic when failing to write to http cache

Closes https://github.com/denoland/deno/issues/26189
Closes https://github.com/denoland/deno/issues/26575

Changed files:
filename: Cargo.lock
patch: @@ -1356,9 +1356,9 @@ dependencies = [
 
 [[package]]
 name = "deno_cache_dir"
-version = "0.13.0"
+version = "0.13.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "186a102b13b4512841f5f40784cd25822042d22954afe3b5b070d406d15eb4f2"
+checksum = "693ca429aebf945de5fef30df232044f9f80be4cc5a5e7c8d767226c43880f5a"
 dependencies = [
  "base32",
  "deno_media_type",

filename: Cargo.toml
patch: @@ -111,7 +111,7 @@ console_static_text = "=0.8.1"
 dashmap = "5.5.3"
 data-encoding = "2.3.3"
 data-url = "=0.3.0"
-deno_cache_dir = "=0.13.0"
+deno_cache_dir = "=0.13.1"
 deno_package_json = { version = "0.1.2", default-features = false }
 dlopen2 = "0.6.1"
 ecb = "=0.1.2"
Repository: facebook/react
Pull request: Don't close "Needs Investigation" issues

If it "needs investigation" it's not stale. It means it needs investigation. It's a possible bug.

Changed files:
filename: .github/stale.yml
patch: @@ -10,6 +10,7 @@ exemptLabels:
   - "Resolution: Backlog"
   - "Type: Bug"
   - "Type: Discussion"
+  - "Type: Needs Investigation"
   - "Type: Regression"
 # Label to use when marking an issue as stale
 staleLabel: "Resolution: Stale"
Repository: facebook/react
Pull request: Fix a warning typo

lol

Changed files:
filename: packages/react-native-renderer/src/ReactNativeFiberInspector.js
patch: @@ -221,7 +221,7 @@ if (__DEV__) {
       );
     } else {
       console.error(
-        'getInspectorDataForViewAtPoint expects to receieve a host component',
+        'getInspectorDataForViewAtPoint expects to receive a host component',
       );
 
       return;
Repository: huggingface/transformers
Pull request: [qwen-vl] Look for vocab size in text config

# What does this PR do?

Fixes https://github.com/huggingface/transformers/issues/38331. We had two PRs merged one after another and the current state of PR while backwards compatible, will fail when users create a new Qwen-architecture model following the new standards

Changed files:
filename: src/transformers/models/qwen2_5_vl/modeling_qwen2_5_vl.py
patch: @@ -1864,7 +1864,7 @@ class Qwen2_5_VLForConditionalGeneration(Qwen2_5_VLPreTrainedModel, GenerationMi
     def __init__(self, config):
         super().__init__(config)
         self.model = Qwen2_5_VLModel(config)
-        self.lm_head = nn.Linear(config.hidden_size, config.vocab_size, bias=False)
+        self.lm_head = nn.Linear(config.text_config.hidden_size, config.text_config.vocab_size, bias=False)
 
         self.post_init()
 

filename: src/transformers/models/qwen2_vl/modeling_qwen2_vl.py
patch: @@ -1741,7 +1741,7 @@ class Qwen2VLForConditionalGeneration(Qwen2VLPreTrainedModel, GenerationMixin):
     def __init__(self, config):
         super().__init__(config)
         self.model = Qwen2VLModel(config)
-        self.lm_head = nn.Linear(config.hidden_size, config.vocab_size, bias=False)
+        self.lm_head = nn.Linear(config.text_config.hidden_size, config.text_config.vocab_size, bias=False)
 
         self.post_init()
Repository: facebook/react
Pull request: Revert "Move MS Windows build to CircleCI"

I'm reverting this because it slowed our CI times from ~6 minutes to ~23 minutes. That's because it runs the build command without concurrency.

I don't remember why the Windows jobs exist. I can see why testing on a Windows machine is useful, but I don't think we should have to build the artifacts on Windows. We could re-use the artifacts from the normal build job.

Let's figure it out then re-land.

Changed files:
filename: .circleci/config.yml
patch: @@ -1,7 +1,4 @@
-version: 2.1
-
-orbs:
-  win: circleci/windows@2.4.0
+version: 2
 
 aliases:
   - &docker
@@ -51,9 +48,6 @@ aliases:
           paths:
             - bundle-sizes.json
 
-  - &ms_windows_environment
-    JAVA_HOME: C:\Program Files\Java\jdk1.8.0
-
 jobs:
   setup:
     docker: *docker
@@ -470,38 +464,6 @@ jobs:
             RELEASE_CHANNEL: experimental
           command: yarn test-build-prod --maxWorkers=2
 
-  test_ms_windows:
-    executor:
-      name: win/default
-    environment: *ms_windows_environment
-    steps:
-      - run:
-          # Fix line endings in Windows.
-          command: git config --global core.autocrlf input
-      - checkout
-      - restore_cache:
-          keys:
-            - v2-win-node-{{ arch }}-{{ .Branch }}-{{ checksum "yarn.lock" }}
-            - v2-win-node-{{ arch }}-{{ .Branch }}-
-            - v2-win-node-{{ arch }}-
-      - run:
-          command: node --version
-      - run:
-          command: choco install yarn
-      - *run_yarn
-      - save_cache:
-          key: v2-win-node-{{ arch }}-{{ .Branch }}-{{ checksum "yarn.lock" }}
-          paths:
-            - C:\Users\circleci\AppData\Local\Yarn
-      - run:
-          command: yarn lint
-      - run:
-          command: yarn build
-      - run:
-          command: yarn test
-      - run:
-          command: yarn prettier
-
 workflows:
   version: 2
   stable:
@@ -616,9 +578,3 @@ workflows:
       - test_fuzz:
           requires:
             - setup
-
-  ms_windows:
-    jobs:
-      - test_ms_windows
-
-

filename: appveyor.yml
patch: @@ -0,0 +1,41 @@
+image: Visual Studio 2017
+
+# Fix line endings in Windows. (runs before repo cloning)
+init:
+  - git config --global core.autocrlf input
+
+environment:
+  JAVA_HOME: C:\Program Files\Java\jdk1.8.0
+  matrix:
+    - nodejs_version: 10
+
+# Finish on first failed build
+matrix:
+  fast_finish: true
+
+platform:
+  - x64
+
+branches:
+  only:
+    - master
+
+# Disable Visual Studio build and deploy
+build: off
+deploy: off
+
+install:
+  - ps: Install-Product node $env:nodejs_version $env:platform
+  - yarn install --frozen-lockfile
+
+test_script:
+  - node --version
+  - yarn lint
+#  - yarn flow-ci
+  - yarn build
+  - yarn test
+  - yarn prettier
+
+cache:
+ - node_modules
+ - "%LOCALAPPDATA%/Yarn"
Repository: denoland/deno
Pull request: fix(npm): match npm bearer token generation

Spend some time stepping through the npm client code and noticed that the bearer token was different from ours. They do some double encoding and @dsherret helped me in matching the encoding behavior.

Fixes https://github.com/denoland/deno/issues/26033



Changed files:
filename: cli/npm/common.rs
patch: @@ -3,6 +3,7 @@
 use base64::prelude::BASE64_STANDARD;
 use base64::Engine;
 use deno_core::anyhow::bail;
+use deno_core::anyhow::Context;
 use deno_core::error::AnyError;
 use deno_npm::npm_rc::RegistryConfig;
 use http::header;
@@ -36,17 +37,21 @@ pub fn maybe_auth_header_for_npm_registry(
   }
 
   if username.is_some() && password.is_some() {
+    // The npm client does some double encoding when generating the
+    // bearer token value, see
+    // https://github.com/npm/cli/blob/780afc50e3a345feb1871a28e33fa48235bc3bd5/workspaces/config/lib/index.js#L846-L851
+    let pw_base64 = BASE64_STANDARD
+      .decode(password.unwrap())
+      .with_context(|| "The password in npmrc is an invalid base64 string")?;
+    let bearer = BASE64_STANDARD.encode(format!(
+      "{}:{}",
+      username.unwrap(),
+      String::from_utf8_lossy(&pw_base64)
+    ));
+
     return Ok(Some((
       header::AUTHORIZATION,
-      header::HeaderValue::from_str(&format!(
-        "Basic {}",
-        BASE64_STANDARD.encode(format!(
-          "{}:{}",
-          username.unwrap(),
-          password.unwrap()
-        ))
-      ))
-      .unwrap(),
+      header::HeaderValue::from_str(&format!("Basic {}", bearer)).unwrap(),
     )));
   }
 

filename: tests/specs/npm/npmrc_username_password/.npmrc
patch: @@ -1,6 +1,8 @@
 @denotest:registry=http://localhost:4261/
 //localhost:4261/:username=deno
-//localhost:4261/:_password=land
+# base64 of land
+//localhost:4261/:_password=bGFuZA==
 @denotest2:registry=http://localhost:4262/
 //localhost:4262/:username=deno
-//localhost:4262/:_password=land2
+# base64 of land2
+//localhost:4262/:_password=bGFuZDI=
Repository: huggingface/transformers
Pull request: Fix an error in verify_tp_plan for keys without '.'

# What does this PR do?

Fixes # #38419


## Before submitting
- [ ] 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?


## 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 

<!-- Your PR will be replied to more quickly if you can figure out the right person to tag with @

 If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**.
 Please tag fewer than 3 people.

Models:

- text models: @ArthurZucker
- vision models: @amyeroberts, @qubvel
- speech models: @eustlb
- graph models: @clefourrier

Library:

- flax: @gante and @Rocketknight1
- generate: @zucchini-nlp (visual-language models) or @gante (all others)
- pipelines: @Rocketknight1
- tensorflow: @gante and @Rocketknight1
- tokenizers: @ArthurZucker
- trainer: @zach-huggingface and @SunMarc
- chat templates: @Rocketknight1

Integrations:

- deepspeed: HF Trainer/Accelerate: @SunMarc @zach-huggingface
- ray/raytune: @richardliaw, @amogkam
- Big Model Inference: @SunMarc
- quantization (bitsandbytes, autogpt): @SunMarc @MekkCyber

Documentation: @stevhliu

HF projects:

- accelerate: [different repo](https://github.com/huggingface/accelerate)
- datasets: [different repo](https://github.com/huggingface/datasets)
- diffusers: [different repo](https://github.com/huggingface/diffusers)
- rust tokenizers: [different repo](https://github.com/huggingface/tokenizers)

Maintained examples (not research project or legacy):

- Flax: @Rocketknight1
- PyTorch: See Models above and tag the person corresponding to the modality of the example.
- TensorFlow: @Rocketknight1

 -->


Changed files:
filename: src/transformers/integrations/tensor_parallel.py
patch: @@ -900,7 +900,7 @@ def verify_tp_plan(expected_keys: list[str], tp_plan: Optional[dict[str, str]]):
     unused_rules = tp_plan
 
     for key in generic_keys:
-        param_name, _ = key.rsplit(".", 1) if "." in key else key
+        param_name = key.rsplit(".", 1)[0] if "." in key else key
         generic_param_name = re.sub(r"\d+", "*", param_name)
 
         if generic_param_name in tp_plan:
Repository: electron/electron
Pull request: test: deflake flaky tests on linux

Backport of #44383

See that PR for details.


Notes: <!-- Please add a one-line description for app developers to read in the release notes, or 'none' if no notes relevant to app developers. Examples and help on special cases: https://github.com/electron/clerk/blob/main/README.md#examples -->none


Changed files:
filename: spec/api-browser-window-spec.ts
patch: @@ -936,12 +936,11 @@ describe('BrowserWindow module', () => {
             'did-frame-navigate',
             'did-navigate'
           ];
-          const allEvents = Promise.all(navigationEvents.map(event =>
+          const allEvents = Promise.all(expectedEventOrder.map(event =>
             once(w.webContents, event).then(() => firedEvents.push(event))
           ));
-          const timeout = setTimeout(1000);
           w.loadURL(url);
-          await Promise.race([allEvents, timeout]);
+          await allEvents;
           expect(firedEvents).to.deep.equal(expectedEventOrder);
         });
 

filename: spec/crash-spec.ts
patch: @@ -4,7 +4,7 @@ import * as cp from 'node:child_process';
 import * as fs from 'node:fs';
 import * as path from 'node:path';
 
-import { ifit } from './lib/spec-helpers';
+import { ifit, waitUntil } from './lib/spec-helpers';
 
 const fixturePath = path.resolve(__dirname, 'fixtures', 'crash-cases');
 
@@ -57,11 +57,11 @@ const shouldRunCase = (crashCase: string) => {
 };
 
 describe('crash cases', () => {
-  afterEach(() => {
+  afterEach(async () => {
     for (const child of children) {
       child.kill();
     }
-    expect(children).to.have.lengthOf(0, 'all child processes should have exited cleanly');
+    await waitUntil(() => (children.length === 0));
     children.length = 0;
   });
   const cases = fs.readdirSync(fixturePath);
Repository: ggml-org/llama.cpp
Pull request: simple-chat : fix context-exceeded condition

fix #14487

Fix off-by-one error. New behavior after the fix:

```bash
make -j && ./bin/llama-simple-chat -m ../models/gemma-3-1b-it/ggml-model-q8_0.gguf -c 128

> Tell me a long story
Okay, here’s a long story, aiming for a bit of depth and emotional resonance. It’s a bit sprawling, so buckle up! It’s titled “The Cartographer’s Echo.”
---
The salt spray stung Elias’s face as he adjusted the compass, the needle spinning wildly in the grey, relentless wind. He was perched on the crumbling cliffs of Aethelgard, a tiny, forgotten village clinging to the edge of the Whispering Sea, a place time seemed to have deliberately abandoned. He’d inherited the cartography shop
context size exceeded
```

Changed files:
filename: examples/simple-chat/simple-chat.cpp
patch: @@ -113,15 +113,16 @@ int main(int argc, char ** argv) {
         while (true) {
             // check if we have enough space in the context to evaluate this batch
             int n_ctx = llama_n_ctx(ctx);
-            int n_ctx_used = llama_memory_seq_pos_max(llama_get_memory(ctx), 0);
+            int n_ctx_used = llama_memory_seq_pos_max(llama_get_memory(ctx), 0) + 1;
             if (n_ctx_used + batch.n_tokens > n_ctx) {
                 printf("\033[0m\n");
                 fprintf(stderr, "context size exceeded\n");
                 exit(0);
             }
 
-            if (llama_decode(ctx, batch)) {
-                GGML_ABORT("failed to decode\n");
+            int ret = llama_decode(ctx, batch);
+            if (ret != 0) {
+                GGML_ABORT("failed to decode, ret = %d\n", ret);
             }
 
             // sample the next token
Repository: electron/electron
Pull request: test: deflake flaky tests on linux

#### Description of Change

<!--
Thank you for your Pull Request. Please provide a description above and review
the requirements below.

Contributors guide: https://github.com/electron/electron/blob/main/CONTRIBUTING.md
-->

Fixes the following flaky tests seen on Linux:
* ` crash cases "after each" hook for "the "js-execute-iframe" case should not crash"`
* `BrowserWindow module navigation events ordering for initial navigation, event order is consistent`

#### Checklist
<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

- [x] PR description included and stakeholders cc'd
- [ ] `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: <!-- Please add a one-line description for app developers to read in the release notes, or 'none' if no notes relevant to app developers. Examples and help on special cases: https://github.com/electron/clerk/blob/main/README.md#examples -->none


Changed files:
filename: spec/api-browser-window-spec.ts
patch: @@ -942,12 +942,11 @@ describe('BrowserWindow module', () => {
             'did-frame-navigate',
             'did-navigate'
           ];
-          const allEvents = Promise.all(navigationEvents.map(event =>
+          const allEvents = Promise.all(expectedEventOrder.map(event =>
             once(w.webContents, event).then(() => firedEvents.push(event))
           ));
-          const timeout = setTimeout(1000);
           w.loadURL(url);
-          await Promise.race([allEvents, timeout]);
+          await allEvents;
           expect(firedEvents).to.deep.equal(expectedEventOrder);
         });
 

filename: spec/crash-spec.ts
patch: @@ -4,7 +4,7 @@ import * as cp from 'node:child_process';
 import * as fs from 'node:fs';
 import * as path from 'node:path';
 
-import { ifit } from './lib/spec-helpers';
+import { ifit, waitUntil } from './lib/spec-helpers';
 
 const fixturePath = path.resolve(__dirname, 'fixtures', 'crash-cases');
 
@@ -57,11 +57,11 @@ const shouldRunCase = (crashCase: string) => {
 };
 
 describe('crash cases', () => {
-  afterEach(() => {
+  afterEach(async () => {
     for (const child of children) {
       child.kill();
     }
-    expect(children).to.have.lengthOf(0, 'all child processes should have exited cleanly');
+    await waitUntil(() => (children.length === 0));
     children.length = 0;
   });
   const cases = fs.readdirSync(fixturePath);
Repository: denoland/deno
Pull request: fix(watch): don't panic on invalid file specifiers

Removes an unwrap that falsely assumed the specifier is a valid
file path.

Fixes https://github.com/denoland/deno/issues/26209

Changed files:
filename: cli/graph_util.rs
patch: @@ -1009,7 +1009,11 @@ impl deno_graph::source::Reporter for FileWatcherReporter {
   ) {
     let mut file_paths = self.file_paths.lock();
     if specifier.scheme() == "file" {
-      file_paths.push(specifier.to_file_path().unwrap());
+      // Don't trust that the path is a valid path at this point:
+      // https://github.com/denoland/deno/issues/26209.
+      if let Ok(file_path) = specifier.to_file_path() {
+        file_paths.push(file_path);
+      }
     }
 
     if modules_done == modules_total {
Repository: ggml-org/llama.cpp
Pull request: opencl : skip empty nodes on cgraph compute

This behavior is cross-checked to be consistent with CUDA, SYCL and Kompute backends. Without this, certain ops (e.g. GGML_OP_SOFT_MAX) will crash under certain circumstances (e.g. non-outputting ubatches).

Fixes #14453.

Changed files:
filename: ggml/src/ggml-opencl/ggml-opencl.cpp
patch: @@ -2187,7 +2187,7 @@ static ggml_status ggml_backend_opencl_graph_compute(ggml_backend_t backend, ggm
         //       dependencies.
         sync_with_other_backends(backend);
 
-        if (node->op == GGML_OP_RESHAPE || node->op == GGML_OP_TRANSPOSE || node->op == GGML_OP_VIEW || node->op == GGML_OP_PERMUTE || node->op == GGML_OP_NONE) {
+        if (ggml_is_empty(node) || node->op == GGML_OP_RESHAPE || node->op == GGML_OP_TRANSPOSE || node->op == GGML_OP_VIEW || node->op == GGML_OP_PERMUTE || node->op == GGML_OP_NONE) {
             continue;
         }
Repository: facebook/react
Pull request: remove "Unreleased" section from CHANGELOG

This section is empty, and imo isn't really helpful in React's changelog. I'm honestly not sure why this is even here? Figured I'd start a discussion with a PR, or we can remove it right now.


Changed files:
filename: CHANGELOG.md
patch: @@ -1,11 +1,3 @@
-## [Unreleased]
-<details>
-  <summary>
-    Changes that have landed in master but are not yet released.
-    Click to see more.
-  </summary>
-</details>
-
 ## 16.12.0 (November 14, 2019)
 
 ### React DOM
Repository: facebook/react
Pull request: Tweak comment wording

Reverts facebook/react#17825

I don't think this is a "grammar fix". This is a semantic change to what the comment says. It's misleading because the `MAGIC_NUMBER_OFFSET` is still being *added*, not subtracted. `A - B` does not mean "subtract `A`".

In general, changing the meaning of comments should be done very carefully because misleading comments are especially dangerous. Ideally, it's best to double-check what the author meant.

Changed files:
filename: packages/react-reconciler/src/ReactFiberExpirationTime.js
patch: @@ -43,7 +43,7 @@ const MAGIC_NUMBER_OFFSET = Batched - 1;
 
 // 1 unit of expiration time represents 10ms.
 export function msToExpirationTime(ms: number): ExpirationTime {
-  // Always subtract an offset so that we don't clash with the magic number for NoWork.
+  // Always subtract from the offset so that we don't clash with the magic number for NoWork.
   return MAGIC_NUMBER_OFFSET - ((ms / UNIT_SIZE) | 0);
 }
Repository: nodejs/node
Pull request: doc: improve documentation on argument validation

This PR updates the documentation to clearly explain the approach used for argument validation in Node.js, 
with respect to public APIs and internal code.

It wasn't very clear to me while trying to validate the argument in https://github.com/nodejs/node/pull/56942, thanks to @joyeecheung for providing the additional context that was missing from the documentation. :)

Changed files:
filename: src/README.md
patch: @@ -589,6 +589,68 @@ void InitializeHttpParser(Local<Object> target,
 }
 ```
 
+### Argument validation in public APIs vs. internal code
+
+#### Public API argument sanitization
+
+When arguments come directly from user code, Node.js will typically validate them at the
+JavaScript layer and throws user-friendly
+[errors](https://github.com/nodejs/node/blob/main/doc/contributing/using-internal-errors.md)
+(e.g., `ERR_INVALID_*`), if they are invalid. This helps end users
+quickly understand and fix mistakes in their own code.
+
+This approach ensures that the error message pinpoints which argument is wrong
+and how it should be fixed. Additionally, problems in user code do not cause
+mysterious crashes or hard-to-diagnose failures deeper in the engine.
+
+Example from `zlib.js`:
+
+```js
+function crc32(data, value = 0) {
+  if (typeof data !== 'string' && !isArrayBufferView(data)) {
+    throw new ERR_INVALID_ARG_TYPE('data', ['Buffer', 'TypedArray', 'DataView','string'], data);
+  }
+  validateUint32(value, 'value');
+  return crc32Native(data, value);
+}
+```
+
+The corresponding C++ assertion code for the above example from it's binding `node_zlib.cc`:
+
+```cpp
+CHECK(args[0]->IsArrayBufferView() || args[0]->IsString());
+CHECK(args[1]->IsUint32());
+```
+
+#### Internal code and C++ binding checks
+
+Inside Node.js’s internal layers, especially the C++ [binding function][]s
+typically assume their arguments have already been checked and sanitized
+by the upper-level (JavaScript) callers. As a result, internal C++ code
+often just uses `CHECK()` or similar assertions to confirm that the
+types/values passed in are correct. If that assertion fails, Node.js will
+crash or abort with an internal diagnostic message. This is to avoid
+re-validating every internal function argument repeatedly which can slow
+down the system.
+
+However, in a less common case where the API is implemented completely in
+C++, the arguments would be validated directly in C++, with the errors
+thrown using `THROW_ERR_INVALID_*` macros from `src/node_errors.h`.
+
+For example in `worker_threads.moveMessagePortToContext`:
+
+```cpp
+void MessagePort::MoveToContext(const FunctionCallbackInfo<Value>& args) {
+  Environment* env = Environment::GetCurrent(args);
+  if (!args[0]->IsObject() ||
+      !env->message_port_constructor_template()->HasInstance(args[0])) {
+    return THROW_ERR_INVALID_ARG_TYPE(env,
+        "The \"port\" argument must be a MessagePort instance");
+  }
+  // ...
+}
+```
+
 <a id="exception-handling"></a>
 
 ### Exception handling