helloadhavan/github_issues huggingface dataset:
Repository: vercel/next.js
Pull request: Update AGENTS.md with PR template and test generation requirements

## What?

Updates the AGENTS.md documentation with two clarifications for AI agents working on the codebase.

## Why?

To improve the quality and consistency of AI-generated contributions by:
1. Ensuring PRs follow the repository's standard description format
2. Making it clear that test generation should use the provided tooling

## How?

Two documentation updates:

1. **PR Template Reference**: Added clarification that PR descriptions must follow the mandatory format from `.github/pull_request_template.md`

2. **Test Generation Requirement**: Added explicit note that generating tests using `pnpm new-test` is mandatory, making this requirement more prominent in the documentation.

Changed files:
filename: AGENTS.md
patch: @@ -52,7 +52,7 @@ The main Next.js framework lives in `packages/next/`. This is what gets publishe
 
 **Note**: `gt submit` runs in interactive mode by default and won't push in automated contexts. Always use `gt submit --no-edit` or `gt submit -q` when running from Claude.
 
-**Creating PRs with descriptions**: All PRs created require a description. `gt submit --no-edit` creates PRs in draft mode without a description. To add a PR title and description, use `gh pr edit` immediately after submitting:
+**Creating PRs with descriptions**: All PRs created require a description. `gt submit --no-edit` creates PRs in draft mode without a description. To add a PR title and description, use `gh pr edit` immediately after submitting. The PR description needs to follow the mandatory format of .github/pull_request_template.md in the repository:
 
 ```bash
 gt submit --no-edit
@@ -160,6 +160,8 @@ pnpm test-dev-turbo test/development/
 
 **Generate tests non-interactively (for AI agents):**
 
+Generating tests using `pnpm new-test` is mandatory.
+
 ```bash
 # Use --args for non-interactive mode
 # Format: pnpm new-test --args <appDir> <name> <type>
Repository: huggingface/transformers
Pull request: Support block_size and bf16_stochastic_round keyword arguments for torchao optimizers


# What does this PR do?

This PR enables the configuration of `block_size` and `bf16_stochastic_round` arguments for torchao optimizers (AdamW4bit, AdamW8bit) within the Trainer.

Previously, these arguments were not passed to the optimizer, relying on default values. Now, users can specify them via optim_args in TrainingArguments.


## 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?

@SunMarc

Changed files:
filename: src/transformers/trainer.py
patch: @@ -1671,6 +1671,12 @@ def optimizer_hook(param):
                 optimizer_cls = AdamW8bit
             else:
                 raise ValueError("Invalid optimizer")
+            optimizer_kwargs.update(
+                {
+                    "block_size": optim_args.get("block_size", 256),
+                    "bf16_stochastic_round": strtobool(optim_args.get("bf16_stochastic_round", "False")),
+                }
+            )
             optimizer_kwargs.update(adam_kwargs)
         elif args.optim in [
             OptimizerNames.SCHEDULE_FREE_RADAM,
Repository: electron/electron
Pull request: fix: provide explicit cookie encryption provider for cookie encryption

Backport of #49348

See that PR for details.


Notes: Fixed an issue where no cookie encryption provider was passed into the network service when cookie encryption was enabled.


Changed files:
filename: shell/browser/net/network_context_service.cc
patch: @@ -14,6 +14,7 @@
 #include "net/http/http_util.h"
 #include "net/net_buildflags.h"
 #include "services/network/network_service.h"
+#include "services/network/public/cpp/cookie_encryption_provider_impl.h"
 #include "services/network/public/cpp/cors/origin_access_list.h"
 #include "shell/browser/browser_process_impl.h"
 #include "shell/browser/electron_browser_client.h"
@@ -114,6 +115,18 @@ void NetworkContextService::ConfigureNetworkContextParams(
     network_context_params->enable_encrypted_cookies =
         electron::fuses::IsCookieEncryptionEnabled();
 
+    // If cookie encryption is enabled, we need to provide a cookie encryption
+    // provider for the network service to use.
+    if (network_context_params->enable_encrypted_cookies) {
+      if (!cookie_encryption_provider_) {
+        cookie_encryption_provider_ =
+            std::make_unique<CookieEncryptionProviderImpl>(
+                g_browser_process->os_crypt_async());
+      }
+      network_context_params->cookie_encryption_provider =
+          cookie_encryption_provider_->BindNewRemote();
+    }
+
     network_context_params->file_paths->transport_security_persister_file_name =
         base::FilePath(chrome::kTransportSecurityPersisterFilename);
   }

filename: shell/browser/net/network_context_service.h
patch: @@ -5,12 +5,16 @@
 #ifndef ELECTRON_SHELL_BROWSER_NET_NETWORK_CONTEXT_SERVICE_H_
 #define ELECTRON_SHELL_BROWSER_NET_NETWORK_CONTEXT_SERVICE_H_
 
+#include <memory>
+
 #include "base/memory/raw_ptr.h"
 #include "chrome/browser/net/proxy_config_monitor.h"
 #include "components/keyed_service/core/keyed_service.h"
 #include "services/cert_verifier/public/mojom/cert_verifier_service_factory.mojom-forward.h"
 #include "services/network/public/mojom/network_context.mojom-forward.h"
 
+class CookieEncryptionProviderImpl;
+
 namespace base {
 class FilePath;
 }  // namespace base
@@ -46,6 +50,7 @@ class NetworkContextService : public KeyedService {
 
   raw_ptr<ElectronBrowserContext> browser_context_;
   ProxyConfigMonitor proxy_config_monitor_;
+  std::unique_ptr<CookieEncryptionProviderImpl> cookie_encryption_provider_;
 };
 
 }  // namespace electron
Repository: huggingface/transformers
Pull request: Fix warnings poping up with `fixup` and `pytest`

# What does this PR do?

As per the title. I'm getting too annoyed to see them all the time, high-time to fix them

Changed files:
filename: pyproject.toml
patch: @@ -72,3 +72,5 @@ markers = [
 log_cli = 1
 log_cli_level = "WARNING"
 asyncio_default_fixture_loop_scope = "function"
+# The above pytest-asyncio rule emits unnessecary warnings when it's not installed, so skip it by regex here
+filterwarnings = ["ignore:Unknown config option.*asyncio_default_fixture_loop_scope"]

filename: setup.py
patch: @@ -407,7 +407,6 @@ def run(self):
         "Intended Audience :: Developers",
         "Intended Audience :: Education",
         "Intended Audience :: Science/Research",
-        "License :: OSI Approved :: Apache Software License",
         "Operating System :: OS Independent",
         "Programming Language :: Python :: 3",
         "Programming Language :: Python :: 3.10",

filename: src/transformers/testing_utils.py
patch: @@ -131,6 +131,7 @@
     is_pyctcdecode_available,
     is_pytesseract_available,
     is_pytest_available,
+    is_pytest_order_available,
     is_pytorch_quantization_available,
     is_quark_available,
     is_qutlass_available,
@@ -2670,9 +2671,13 @@ def run_first(test_case):
     single process at a time. So we make sure all tests that run in a subprocess are launched first, to avoid device
     allocation conflicts.
     """
-    import pytest
+    # Without this check, we get unwanted warnings when it's not installed
+    if is_pytest_order_available():
+        import pytest
 
-    return pytest.mark.order(1)(test_case)
+        return pytest.mark.order(1)(test_case)
+    else:
+        return test_case
 
 
 def run_test_in_subprocess(test_case, target_func, inputs=None, timeout=None):

filename: src/transformers/utils/__init__.py
patch: @@ -185,6 +185,7 @@
     is_pyctcdecode_available,
     is_pytesseract_available,
     is_pytest_available,
+    is_pytest_order_available,
     is_pytorch_quantization_available,
     is_quanto_greater,
     is_quark_available,

filename: src/transformers/utils/import_utils.py
patch: @@ -1084,6 +1084,11 @@ def is_pytest_available() -> bool:
     return _is_package_available("pytest")
 
 
+@lru_cache
+def is_pytest_order_available() -> bool:
+    return is_pytest_available() and _is_package_available("pytest_order")
+
+
 @lru_cache
 def is_spacy_available() -> bool:
     return _is_package_available("spacy")
Repository: ggml-org/llama.cpp
Pull request: server : do not create checkpoints right after mtmd chunks

fix #20222

The checkpoint logic requires at least one text token to be present at the end of the checkpoint.

Changed files:
filename: tools/server/server-context.cpp
patch: @@ -2438,6 +2438,8 @@ struct server_context_impl {
                         slot.n_prompt_tokens_cache = 0;
                     }
 
+                    bool do_checkpoint = params_base.n_ctx_checkpoints > 0;
+
                     // check if we should process the image
                     if (slot.prompt.n_tokens() < slot.task->n_tokens() && input_tokens[slot.prompt.n_tokens()] == LLAMA_TOKEN_NULL) {
                         // process the image
@@ -2457,6 +2459,8 @@ struct server_context_impl {
                             const auto & chunk = input_tokens.find_chunk(slot.prompt.n_tokens());
                             slot.prompt.tokens.push_back(chunk.get()); // copy
                         }
+
+                        do_checkpoint = false; // do not checkpoint right after an image chunk
                     }
 
                     // If using an alora, there may be uncached tokens that come
@@ -2473,8 +2477,6 @@ struct server_context_impl {
                         alora_disabled_id = enabled_loras[0];
                     }
 
-                    bool do_checkpoint = params_base.n_ctx_checkpoints > 0;
-
                     // make checkpoints only for completion tasks
                     do_checkpoint = do_checkpoint && slot.task->type == SERVER_TASK_TYPE_COMPLETION;
Repository: nodejs/node
Pull request: src: remove redundant CHECK

The function `SetAuthTag()` returns early (before reaching this line) if `!cipher->IsAuthenticatedMode()`, which expands to the exact same condition that is being `CHECK()`ed here.

<!--
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: src/crypto/crypto_cipher.cc
patch: @@ -549,7 +549,6 @@ void CipherBase::SetAuthTag(const FunctionCallbackInfo<Value>& args) {
   } else {
     // At this point, the tag length is already known and must match the
     // length of the given authentication tag.
-    CHECK(Cipher::FromCtx(cipher->ctx_).isSupportedAuthenticatedMode());
     CHECK_NE(cipher->auth_tag_len_, kNoAuthTagLength);
     is_valid = cipher->auth_tag_len_ == tag_len;
   }
Repository: vuejs/vue
Pull request: feat(server, webpack-plugin): webpack 4 support

<!--
Please make sure to read the Pull Request Guidelines:
https://github.com/vuejs/vue/blob/dev/.github/CONTRIBUTING.md#pull-request-guidelines
-->

<!-- PULL REQUEST TEMPLATE -->
<!-- (Update "[ ]" to "[x]" to check a box) -->

**What kind of change does this PR introduce?** (check at least one)

- [ ] Bugfix
- [x] Feature
- [ ] Code style update
- [ ] Refactor
- [ ] Build-related changes
- [ ] Other, please describe:

**Does this PR introduce a breaking change?** (check one)

- [ ] Yes
- [x] No

If yes, please describe the impact and migration path for existing applications:

**The PR fulfills these requirements:**

- [x] It's submitted to the `dev` branch for v2.x (or to a previous version branch), _not_ the `master` branch
- [ ] When resolving a specific issue, it's referenced in the PR's title (e.g. `fix #xxx[,#xxx]`, where "xxx" is the issue number)
- [x] All tests are passing: https://github.com/vuejs/vue/blob/dev/.github/CONTRIBUTING.md#development-setup
- [ ] New/updated tests are included

If adding a **new feature**, the PR's description includes:
- [ ] A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

**Other information:**

Fixes WP4 deprecated warning:

```DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead```

Changed files:
filename: src/server/webpack-plugin/client.js
patch: @@ -1,6 +1,6 @@
 const hash = require('hash-sum')
 const uniq = require('lodash.uniq')
-import { isJS, isCSS } from './util'
+import { isJS, isCSS, onEmit } from './util'
 
 export default class VueSSRClientPlugin {
   constructor (options = {}) {
@@ -10,7 +10,7 @@ export default class VueSSRClientPlugin {
   }
 
   apply (compiler) {
-    compiler.plugin('emit', (compilation, cb) => {
+    onEmit(compiler, 'vue-client-plugin', (compilation, cb) => {
       const stats = compilation.getStats().toJson()
 
       const allFiles = uniq(stats.assets

filename: src/server/webpack-plugin/server.js
patch: @@ -1,4 +1,4 @@
-import { validate, isJS } from './util'
+import { validate, isJS, onEmit } from './util'
 
 export default class VueSSRServerPlugin {
   constructor (options = {}) {
@@ -10,7 +10,7 @@ export default class VueSSRServerPlugin {
   apply (compiler) {
     validate(compiler)
 
-    compiler.plugin('emit', (compilation, cb) => {
+    onEmit(compiler, 'vue-server-plugin', (compilation, cb) => {
       const stats = compilation.getStats().toJson()
       const entryName = Object.keys(stats.entrypoints)[0]
       const entryInfo = stats.entrypoints[entryName]

filename: src/server/webpack-plugin/util.js
patch: @@ -21,4 +21,14 @@ export const validate = compiler => {
   }
 }
 
+export const onEmit = (compiler, name, hook) => {
+  if (compiler.hooks) {
+    // Webpack >= 4.0.0
+    compiler.hooks.emit.tapAsync(name, hook)
+  } else {
+    // Webpack < 4.0.0
+    compiler.plugin('emit', hook)
+  }
+}
+
 export { isJS, isCSS } from '../util'
Repository: huggingface/transformers
Pull request: Fix InvalidVersion error when flash_attn version cannot be determined

## Problem

When `flash_attn_3` is installed without `flash_attn` (v2), calling `is_flash_attn_2_available()` raises:
```
packaging.version.InvalidVersion: Invalid version: 'N/A'
```

This happens because the `flash_attn` module is importable but its version cannot be determined, so `_is_package_available` returns `"N/A"`, which `version.parse()` cannot handle.

## Fix

Wrap version parsing in `try/except packaging.version.InvalidVersion`, returning `False` when the version is unparseable. This matches the existing pattern in `is_torch_available()` (lines 112-119).

## Note for maintainers

This fix works but is somewhat repetitive - the same try/except pattern now exists in three places. A cleaner long-term solution might be:

1. A `_parse_version_safe()` helper used across the file
2. Having `_is_package_available` return `None` instead of `"N/A"` for undetermined versions
3. Auditing other `version.parse()` calls that could hit similar issues

Happy to refactor if preferred, but kept this minimal to match existing patterns.

Fixes #42999

Changed files:
filename: src/transformers/utils/import_utils.py
patch: @@ -890,14 +890,17 @@ def is_flash_attn_2_available() -> bool:
 
     import torch
 
-    if torch.version.cuda:
-        return version.parse(flash_attn_version) >= version.parse("2.1.0")
-    elif torch.version.hip:
-        # TODO: Bump the requirement to 2.1.0 once released in https://github.com/ROCmSoftwarePlatform/flash-attention
-        return version.parse(flash_attn_version) >= version.parse("2.0.4")
-    elif is_torch_mlu_available():
-        return version.parse(flash_attn_version) >= version.parse("2.3.3")
-    else:
+    try:
+        if torch.version.cuda:
+            return version.parse(flash_attn_version) >= version.parse("2.1.0")
+        elif torch.version.hip:
+            # TODO: Bump the requirement to 2.1.0 once released in https://github.com/ROCmSoftwarePlatform/flash-attention
+            return version.parse(flash_attn_version) >= version.parse("2.0.4")
+        elif is_torch_mlu_available():
+            return version.parse(flash_attn_version) >= version.parse("2.3.3")
+        else:
+            return False
+    except packaging.version.InvalidVersion:
         return False
 
 
@@ -915,7 +918,12 @@ def is_flash_attn_greater_or_equal_2_10() -> bool:
 @lru_cache
 def is_flash_attn_greater_or_equal(library_version: str) -> bool:
     is_available, flash_attn_version = _is_package_available("flash_attn", return_version=True)
-    return is_available and version.parse(flash_attn_version) >= version.parse(library_version)
+    if not is_available:
+        return False
+    try:
+        return version.parse(flash_attn_version) >= version.parse(library_version)
+    except packaging.version.InvalidVersion:
+        return False
 
 
 @lru_cache
Repository: vercel/next.js
Pull request: Add .cursor/worktrees.json configuration

## What?

Add a `.cursor/worktrees.json` configuration file that specifies setup commands for Cursor worktrees.

## Why?

This configuration allows Cursor to automatically run the necessary setup commands (`pnpm install` and `pnpm build`) when creating new worktrees, ensuring a consistent and ready-to-use development environment.

## How?

Added a new `.cursor/worktrees.json` file with the following configuration:
```json
{
  "setup-worktree": ["pnpm install", "pnpm build"]
}
```

This tells Cursor to:
1. Install dependencies with `pnpm install`
2. Build the project with `pnpm build`

These commands are automatically executed when a new worktree is created in Cursor.

Changed files:
filename: .cursor/worktrees.json
patch: @@ -0,0 +1,3 @@
+{
+  "setup-worktree": ["pnpm install", "pnpm build"]
+}
Repository: ggml-org/llama.cpp
Pull request: Fix compile bug

Fixes #20187

Changed files:
filename: common/chat-auto-parser-helpers.cpp
patch: @@ -162,7 +162,7 @@ diff_split calculate_diff_split(const std::string & left, const std::string & ri
         right_fully_consumed = true;
     }
 
-    auto eat_segment = [](std::string & str, segment & seg) -> std::string { return str.append(seg.value); };
+    auto eat_segment = [](std::string str, const segment & seg) -> std::string { return std::move(str) + seg.value; };
 
     bool can_have_text_suffix = left_end->type == segment_type::TEXT && right_end->type == segment_type::TEXT;
     bool can_have_text_prefix = right_start->type == segment_type::TEXT && left_start->type == segment_type::TEXT;
Repository: ollama/ollama
Pull request: doc: add Abso SDK to the list of community integrations

Abso allows to cal various LLMs with the same API that the OpenAI SDK. It provides a unified interface while maintaining full type safety and streaming capabilities.

It automatically converts, for example, tools calls to the right format depending on the provider used.

Changed files:
filename: README.md
patch: @@ -494,6 +494,7 @@ See the [API documentation](./docs/api.md) for all endpoints.
 - [multi-llm-ts](https://github.com/nbonamy/multi-llm-ts) (A Typescript/JavaScript library allowing access to different LLM in unified API)
 - [LlmTornado](https://github.com/lofcz/llmtornado) (C# library providing a unified interface for major FOSS & Commercial inference APIs)
 - [Ollama for Zig](https://github.com/dravenk/ollama-zig)
+- [Abso](https://github.com/lunary-ai/abso/blob/main/README.md#ollama) (OpenAI-compatible TypeScript SDK for any LLM provider)
 
 ### Mobile
Repository: vuejs/vue
Pull request: Adds missing `asyncMeta` during VNode cloning

<!--
Please make sure to read the Pull Request Guidelines:
https://github.com/vuejs/vue/blob/dev/.github/CONTRIBUTING.md#pull-request-guidelines
-->

<!-- PULL REQUEST TEMPLATE -->
<!-- (Update "[ ]" to "[x]" to check a box) -->

**What kind of change does this PR introduce?** (check at least one)
- [x] Bugfix

**Does this PR introduce a breaking change?** (check one)
- [x] No

**The PR fulfills these requirements:**

- [x] It's submitted to the `dev` branch for v2.x (or to a previous version branch), _not_ the `master` branch
- [x] All tests are passing: https://github.com/vuejs/vue/blob/dev/.github/CONTRIBUTING.md#development-setup

**Other information:**
This fixes a crash during SSR, where a parent functional component is using an async component in the render function. If the prop is not copied, `renderAsyncComponent` crashes during rendering. Looks like this bug was introduced in 62a922e865f5e578f67b386cb614abfc173d7851

Changed files:
filename: src/core/vdom/vnode.js
patch: @@ -103,6 +103,7 @@ export function cloneVNode (vnode: VNode): VNode {
   cloned.fnContext = vnode.fnContext
   cloned.fnOptions = vnode.fnOptions
   cloned.fnScopeId = vnode.fnScopeId
+  cloned.asyncMeta = vnode.asyncMeta
   cloned.isCloned = true
   return cloned
 }