helloadhavan/github_issues huggingface dataset:
Repository: facebook/react
Pull request: [compiler] Rename HIRFunction.returnType

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):
* #30790
* __->__ #30789
* #30785
* #30784
* #30783
* #30771
* #30766
* #30764

Rename this field so we can use it for the actual return type.

Changed files:
filename: compiler/packages/babel-plugin-react-compiler/src/HIR/BuildHIR.ts
patch: @@ -219,7 +219,7 @@ export function lower(
     id,
     params,
     fnType: parent == null ? env.fnType : 'Other',
-    returnType: null, // TODO: extract the actual return type node if present
+    returnTypeAnnotation: null, // TODO: extract the actual return type node if present
     returnIdentifier,
     body: builder.build(),
     context,

filename: compiler/packages/babel-plugin-react-compiler/src/HIR/HIR.ts
patch: @@ -285,7 +285,7 @@ export type HIRFunction = {
   fnType: ReactFunctionType;
   env: Environment;
   params: Array<Place | SpreadPattern>;
-  returnType: t.FlowType | t.TSType | null;
+  returnTypeAnnotation: t.FlowType | t.TSType | null;
   returnIdentifier: Identifier;
   context: Array<Place>;
   effects: Array<FunctionEffect> | null;

filename: compiler/packages/babel-plugin-react-compiler/src/Optimization/LowerContextAccess.ts
patch: @@ -248,7 +248,7 @@ function emitSelectorFn(env: Environment, keys: Array<string>): Instruction {
     fnType: 'Other',
     env,
     params: [obj],
-    returnType: null,
+    returnTypeAnnotation: null,
     returnIdentifier,
     context: [],
     effects: null,
Repository: facebook/react
Pull request: [compiler] Infer return types of function expressions

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):
* #30790
* #30789
* __->__ #30785
* #30784
* #30783
* #30771
* #30766
* #30764

Uses the returnIdentifier added in the previous PR to provide a stable identifier for which we can infer a return type for functions, then wires up the equations in InferTypes to infer the type.

Changed files:
filename: compiler/packages/babel-plugin-react-compiler/src/HIR/BuildHIR.ts
patch: @@ -211,7 +211,9 @@ export function lower(
     null,
   );
 
-  const returnIdentifier = builder.makeTemporary(func.node.loc ?? GeneratedSource);
+  const returnIdentifier = builder.makeTemporary(
+    func.node.loc ?? GeneratedSource,
+  );
 
   return Ok({
     id,

filename: compiler/packages/babel-plugin-react-compiler/src/HIR/PrintHIR.ts
patch: @@ -556,8 +556,10 @@ export function printInstructionValue(instrValue: ReactiveValue): string {
             }
           })
           .join(', ') ?? '';
-      const type = printType(instrValue.loweredFunc.func.returnIdentifier.type).trim();
-      value = `${kind} ${name} @deps[${deps}] @context[${context}] @effects[${effects}]${type!== '' ? ` return${type}` : ''}:\n${fn}`;
+      const type = printType(
+        instrValue.loweredFunc.func.returnIdentifier.type,
+      ).trim();
+      value = `${kind} ${name} @deps[${deps}] @context[${context}] @effects[${effects}]${type !== '' ? ` return${type}` : ''}:\n${fn}`;
       break;
     }
     case 'TaggedTemplateExpression': {

filename: compiler/packages/babel-plugin-react-compiler/src/Optimization/LowerContextAccess.ts
patch: @@ -238,15 +238,18 @@ function emitSelectorFn(env: Environment, keys: Array<string>): Instruction {
     phis: new Set(),
   };
 
-  const returnIdentifier = createTemporaryPlace(env, GeneratedSource).identifier;
+  const returnIdentifier = createTemporaryPlace(
+    env,
+    GeneratedSource,
+  ).identifier;
   const fn: HIRFunction = {
     loc: GeneratedSource,
     id: null,
     fnType: 'Other',
     env,
     params: [obj],
     returnType: null,
-    returnIdentifier, 
+    returnIdentifier,
     context: [],
     effects: null,
     body: {

filename: compiler/packages/babel-plugin-react-compiler/src/TypeInference/InferTypes.ts
patch: @@ -360,7 +360,11 @@ function* generateInstructionTypes(
 
     case 'FunctionExpression': {
       yield* generate(value.loweredFunc.func);
-      yield equation(left, {kind: 'Function', shapeId: BuiltInFunctionId, return: value.loweredFunc.func.returnIdentifier.type});
+      yield equation(left, {
+        kind: 'Function',
+        shapeId: BuiltInFunctionId,
+        return: value.loweredFunc.func.returnIdentifier.type,
+      });
       break;
     }
Repository: facebook/react
Pull request: [compiler] Add returnIdentifier to function expressions

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):
* #30790
* #30789
* #30785
* __->__ #30784
* #30783
* #30771
* #30766
* #30764

This gives us a place to store type information, used in follow-up PRs.

Changed files:
filename: compiler/packages/babel-plugin-react-compiler/src/HIR/BuildHIR.ts
patch: @@ -211,11 +211,14 @@ export function lower(
     null,
   );
 
+  const returnIdentifier = builder.makeTemporary(func.node.loc ?? GeneratedSource);
+
   return Ok({
     id,
     params,
     fnType: parent == null ? env.fnType : 'Other',
     returnType: null, // TODO: extract the actual return type node if present
+    returnIdentifier,
     body: builder.build(),
     context,
     generator: func.node.generator === true,

filename: compiler/packages/babel-plugin-react-compiler/src/HIR/HIR.ts
patch: @@ -286,6 +286,7 @@ export type HIRFunction = {
   env: Environment;
   params: Array<Place | SpreadPattern>;
   returnType: t.FlowType | t.TSType | null;
+  returnIdentifier: Identifier;
   context: Array<Place>;
   effects: Array<FunctionEffect> | null;
   body: HIR;

filename: compiler/packages/babel-plugin-react-compiler/src/Optimization/LowerContextAccess.ts
patch: @@ -238,13 +238,15 @@ function emitSelectorFn(env: Environment, keys: Array<string>): Instruction {
     phis: new Set(),
   };
 
+  const returnIdentifier = createTemporaryPlace(env, GeneratedSource).identifier;
   const fn: HIRFunction = {
     loc: GeneratedSource,
     id: null,
     fnType: 'Other',
     env,
     params: [obj],
     returnType: null,
+    returnIdentifier, 
     context: [],
     effects: null,
     body: {

filename: compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.todo-repro-named-function-with-shadowed-local-same-name.expect.md
patch: @@ -22,7 +22,7 @@ function Component(props) {
    7 |     return hasErrors;
    8 |   }
 >  9 |   return hasErrors();
-     |          ^^^^^^^^^ Invariant: [hoisting] Expected value for identifier to be initialized. hasErrors_0$16 (9:9)
+     |          ^^^^^^^^^ Invariant: [hoisting] Expected value for identifier to be initialized. hasErrors_0$17 (9:9)
   10 | }
   11 |
 ```
Repository: nodejs/node
Pull request: doc: stream.isReadable and stream.isWritable API fixups

<!--
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.
-->
Fixes: https://github.com/nodejs/node/issues/59006

Changed files:
filename: doc/api/stream.md
patch: @@ -3084,10 +3084,17 @@ changes:
 -->
 
 * `stream` {Readable|Duplex|ReadableStream}
-* Returns: {boolean}
+* Returns: {boolean|null} - Only returns `null` if `stream` is not a valid `Readable`, `Duplex` or `ReadableStream`.
 
 Returns whether the stream is readable.
 
+### `stream.isWritable(stream)`
+
+* `stream` {Writable|Duplex|WritableStream}
+* Returns: {boolean|null} - Only returns `null` if `stream` is not a valid `Writable`, `Duplex` or `WritableStream`.
+
+Returns whether the stream is writable.
+
 ### `stream.Readable.from(iterable[, options])`
 
 <!-- YAML
Repository: ggml-org/llama.cpp
Pull request: webui: fix chat screen shadow width

This fixed the width of the chat screen shadow, that is supposed to hide text below the input form.

The issue was that the shadow was using `position: fixed`, which caused the `width: 100%` to be relative to the viewport and cover both the sidebar and the scrollbar. By making it `position: absolute`, the shadow is now positioned relative to the parent `.conversation-chat-form`, which has `position: relative`, as I assume was the intended behavior.

<img width="1224" height="586" alt="shadow-before-after" src="https://github.com/user-attachments/assets/3a557793-ee0f-4c89-9459-4ffa5ce027e4" />


Changed files:
filename: tools/server/webui/src/lib/components/app/chat/ChatScreen/ChatScreen.svelte
patch: @@ -587,7 +587,7 @@
 
 		&::after {
 			content: '';
-			position: fixed;
+			position: absolute;
 			bottom: 0;
 			z-index: -1;
 			left: 0;
Repository: vercel/next.js
Pull request: [test] Assert on stable error codes

Fixes
```
DevErrorOverlay › sends feedback when clicking not helpful button

    expect(received).toEqual(expected) // deep equality

    - Expected  - 1
    + Received  + 1

      Array [
    -   "/__nextjs_error_feedback?errorCode=E794&wasHelpful=false",
    +   "/__nextjs_error_feedback?errorCode=E209&wasHelpful=false",
      ]
```

-- https://github.com/vercel/next.js/actions/runs/18360913450/job/52306369449#step:34:793

Changed files:
filename: test/development/error-overlay/app/known-client-error/page.tsx
patch: @@ -1,23 +1,18 @@
 'use client'
 
-import Link from 'next/link'
 import React from 'react'
 
 export default function Page() {
-  const broken = (
-    <>
-      <Link href="/invalid" as="mailto:john@example.com">
-        <a>Invalid link</a>
-      </Link>
-    </>
-  )
-
   const [shouldShow, setShouldShow] = React.useState(false)
+  if (shouldShow) {
+    const error = new Error('Client error!')
+    ;(error as any).__NEXT_ERROR_CODE = 'E40'
+    throw error
+  }
 
   return (
     <div>
       <button onClick={() => setShouldShow(true)}>break on client</button>
-      {shouldShow && broken}
     </div>
   )
 }

filename: test/development/error-overlay/app/known-rsc-error/page.tsx
patch: @@ -1,12 +1,7 @@
-import { unstable_cache } from 'next/cache'
-import { headers } from 'next/headers'
-import React from 'react'
-
 export default async function Page() {
-  const getData = unstable_cache(async () => {
-    const h = await headers()
-    return h.get('x-test-header')
-  }, ['test-header-key'])
+  const error = new Error('Client error!')
+  ;(error as any).__NEXT_ERROR_CODE = 'E40'
+  throw error
 
-  return <div>{await getData()}</div>
+  return null
 }

filename: test/development/error-overlay/index.test.tsx
patch: @@ -14,7 +14,7 @@ describe('DevErrorOverlay', () => {
 
     const errorCode = await browser.elementByCss('[data-nextjs-error-code]')
     const code = await errorCode.getAttribute('data-nextjs-error-code')
-    expect(code).toBe('E838')
+    expect(code).toBe('E40')
   })
 
   it('sends feedback when clicking helpful button', async () => {
@@ -41,7 +41,7 @@ describe('DevErrorOverlay', () => {
           .textContent()
       ).toEqual('Thanks for your feedback!')
       expect(feedbackRequests).toEqual([
-        '/__nextjs_error_feedback?errorCode=E794&wasHelpful=true',
+        '/__nextjs_error_feedback?errorCode=E40&wasHelpful=true',
       ])
     })
   })
@@ -70,7 +70,7 @@ describe('DevErrorOverlay', () => {
           .textContent()
       ).toEqual('Thanks for your feedback!')
       expect(feedbackRequests).toEqual([
-        '/__nextjs_error_feedback?errorCode=E794&wasHelpful=false',
+        '/__nextjs_error_feedback?errorCode=E40&wasHelpful=false',
       ])
     })
   })
Repository: ggml-org/llama.cpp
Pull request: convert : sort and use file parts from model index if present

Follow up to #17286

The previous PR made tensor order more random than necessary, if there's an index, ~keep the same file order~use a sorted list of all unique file parts from there, if not keep the sorted order from `get_model_part_names` for consistent conversions.

Changed files:
filename: convert_hf_to_gguf.py
patch: @@ -189,10 +189,10 @@ def index_tensors(self, remote_hf_model_id: str | None = None) -> dict[str, Call
             return tensors
 
         prefix = "model" if not self.is_mistral_format else "consolidated"
-        part_names: set[str] = set(ModelBase.get_model_part_names(self.dir_model, prefix, ".safetensors"))
+        part_names: list[str] = ModelBase.get_model_part_names(self.dir_model, prefix, ".safetensors")
         is_safetensors: bool = len(part_names) > 0
         if not is_safetensors:
-            part_names = set(ModelBase.get_model_part_names(self.dir_model, "pytorch_model", ".bin"))
+            part_names = ModelBase.get_model_part_names(self.dir_model, "pytorch_model", ".bin")
 
         tensor_names_from_index: set[str] = set()
 
@@ -209,7 +209,8 @@ def index_tensors(self, remote_hf_model_id: str | None = None) -> dict[str, Call
                     if weight_map is None or not isinstance(weight_map, dict):
                         raise ValueError(f"Can't load 'weight_map' from {index_name!r}")
                     tensor_names_from_index.update(weight_map.keys())
-                    part_names |= set(weight_map.values())
+                    part_dict: dict[str, None] = dict.fromkeys(weight_map.values(), None)
+                    part_names = sorted(part_dict.keys())
             else:
                 weight_map = {}
         else:
Repository: huggingface/transformers
Pull request: Update a dataset reop link

# What does this PR do?

`https://huggingface.co/kirp/kosmos2_5/resolve/main/receipt_00008.png` is no longer available (likely the author deleted it).
That is used during the PR. Let's use the official repo. now

https://huggingface.co/microsoft/kosmos-2.5/resolve/main/receipt_00008.png



Changed files:
filename: tests/models/kosmos2_5/test_processor_kosmos2_5.py
patch: @@ -299,7 +299,7 @@ def test_structured_kwargs_nested_from_dict(self):
 
     @require_torch
     def test_full_processor(self):
-        url = url_to_local_path("https://huggingface.co/kirp/kosmos2_5/resolve/main/receipt_00008.png")
+        url = url_to_local_path("https://huggingface.co/microsoft/kosmos-2.5/resolve/main/receipt_00008.png")
         processor = AutoProcessor.from_pretrained("microsoft/kosmos-2.5")
         texts = ["<md>", "<ocr>"]
         expected_input_ids = [

filename: utils/fetch_hub_objects_for_ci.py
patch: @@ -29,7 +29,7 @@
     "https://huggingface.co/datasets/raushan-testing-hf/images_test/resolve/main/picsum_237_200x300.jpg",
     "https://huggingface.co/datasets/raushan-testing-hf/videos-test/resolve/main/Big_Buck_Bunny_720_10s_10MB.mp4",
     "https://huggingface.co/datasets/raushan-testing-hf/videos-test/resolve/main/sample_demo_1.mp4",
-    "https://huggingface.co/kirp/kosmos2_5/resolve/main/receipt_00008.png",
+    "https://huggingface.co/microsoft/kosmos-2.5/resolve/main/receipt_00008.png",
     "https://huggingface.co/microsoft/kosmos-2-patch14-224/resolve/main/two_dogs.jpg",
     "https://llava-vl.github.io/static/images/view.jpg",
     "https://huggingface.co/datasets/hf-internal-testing/fixtures_videos/resolve/main/tennis.mp4",
Repository: ollama/ollama
Pull request: Update langchainpy.md

Updated the code a bit since it was showing deprecation messages for me.

Changed files:
filename: docs/tutorials/langchainpy.md
patch: @@ -17,10 +17,12 @@ Let's start by asking a simple question that we can get an answer to from the **
 Then we can create a model and ask the question:
 
 ```python
-from langchain.llms import Ollama
-ollama = Ollama(base_url='http://localhost:11434',
-model="llama2")
-print(ollama("why is the sky blue"))
+from langchain_community.llms import Ollama
+ollama = Ollama(
+    base_url='http://localhost:11434',
+    model="llama3"
+)
+print(ollama.invoke("why is the sky blue"))
 ```
 
 Notice that we are defining the model and the base URL for Ollama.
Repository: huggingface/transformers
Pull request: Reinstate early CUDA init fix

vLLM found that this import was causing CUDA to be initialised early

Changed files:
filename: src/transformers/generation/continuous_batching/continuous_api.py
patch: @@ -30,7 +30,6 @@
 from ...configuration_utils import PretrainedConfig
 from ...generation.configuration_utils import GenerationConfig
 from ...generation.logits_process import LogitsProcessor
-from ...integrations.hub_kernels import load_and_register_attn_kernel
 from ...utils.logging import logging
 from ...utils.metrics import ContinuousBatchProcessorMetrics, attach_tracer, traced
 from .cache import PagedAttentionCache
@@ -743,7 +742,9 @@ def __init__(
             from ...modeling_utils import ALL_ATTENTION_FUNCTIONS
 
             if attn_implementation not in ALL_ATTENTION_FUNCTIONS._global_mapping:  # when its a kernel
+                # load_and_register_attn_kernel is imported here to avoid CUDA init
                 from ...integrations.flash_paged import paged_attention_forward
+                from ...integrations.hub_kernels import load_and_register_attn_kernel
 
                 load_and_register_attn_kernel(attn_implementation, paged_attention_forward)
Repository: facebook/react
Pull request: [compiler] Repro for missing memoization due to inferred mutation

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):
* #30790
* #30789
* #30785
* #30784
* #30783
* #30771
* #30766
* __->__ #30764

This fixture bails out on ValidatePreserveExistingMemo but would ideally memoize since the original memoization is safe. It's trivial to make it pass by commenting out the commented line (`LogEvent.log(() => object)`). I would expect the compiler to infer this as possible mutation of `logData`, since `object` captures a reference to `logData`. But somehow `logData` is getting memoized successfully, but we still infer the callback, `setCurrentIndex`, as having a mutable range that extends to the `setCurrentIndex()` call after the useCallback.

Changed files:
filename: compiler/packages/babel-plugin-react-compiler/src/Validation/ValidatePreservedManualMemoization.ts
patch: @@ -5,7 +5,7 @@
  * LICENSE file in the root directory of this source tree.
  */
 
-import {CompilerError, Effect, ErrorSeverity, printReactiveFunction} from '..';
+import {CompilerError, Effect, ErrorSeverity} from '..';
 import {
   DeclarationId,
   GeneratedSource,
@@ -23,11 +23,7 @@ import {
   ScopeId,
   SourceLocation,
 } from '../HIR';
-import {
-  printFunction,
-  printIdentifier,
-  printManualMemoDependency,
-} from '../HIR/PrintHIR';
+import {printIdentifier, printManualMemoDependency} from '../HIR/PrintHIR';
 import {eachInstructionValueOperand} from '../HIR/visitors';
 import {collectMaybeMemoDependencies} from '../Inference/DropManualMemoization';
 import {
Repository: huggingface/transformers
Pull request: Import `expand_device_map` instead of redefining it

# What does this PR do?

This function has been moved to integrations but was not deleted properly

Changed files:
filename: src/transformers/modeling_utils.py
patch: @@ -54,6 +54,7 @@
     accelerate_disk_offload,
     accelerate_dispatch,
     check_and_set_device_map,
+    expand_device_map,
     find_tied_parameters,
     init_empty_weights,
 )
@@ -5298,18 +5299,6 @@ def unwrap_model(model: nn.Module, recursive: bool = False) -> nn.Module:
             return model
 
 
-def expand_device_map(device_map, param_names):
-    """
-    Expand a device map to return the correspondence parameter name to device.
-    """
-    new_device_map = {}
-    for module, device in device_map.items():
-        new_device_map.update(
-            {p: device for p in param_names if p == module or p.startswith(f"{module}.") or module == ""}
-        )
-    return new_device_map
-
-
 def is_accelerator_device(device: Union[str, int, torch.device]) -> bool:
     """Check if the device is an accelerator. We need to function, as device_map can be "disk" as well, which is not
     a proper `torch.device`.
Repository: ggml-org/llama.cpp
Pull request: model: fix GLM-ASR-Nano-2512 load error (#18130)

*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: tools/mtmd/mtmd.cpp
patch: @@ -329,6 +329,7 @@ struct mtmd_context {
             case PROJECTOR_TYPE_QWEN25O:
             case PROJECTOR_TYPE_ULTRAVOX:
             case PROJECTOR_TYPE_VOXTRAL:
+            case PROJECTOR_TYPE_GLMA:
                 audio_preproc = std::make_unique<mtmd_audio_preprocessor_whisper>(ctx_a);
                 break;
             default:
Repository: vercel/next.js
Pull request: Turbopack: convert HashMap to IndexMap for deterministic tasks

### What?

Ensure more deterministic builds

Closes PACK-5657

Changed files:
filename: crates/next-api/src/loadable_manifest.rs
patch: @@ -1,7 +1,6 @@
 use anyhow::Result;
 use next_core::{next_manifests::LoadableManifest, util::NextRuntime};
-use rustc_hash::FxHashMap;
-use turbo_tasks::{ResolvedVc, TryFlatJoinIterExt, Vc};
+use turbo_tasks::{FxIndexMap, ResolvedVc, TryFlatJoinIterExt, Vc};
 use turbo_tasks_fs::{File, FileContent, FileSystemPath};
 use turbopack_core::{
     asset::AssetContent,
@@ -21,7 +20,7 @@ pub async fn create_react_loadable_manifest(
 ) -> Result<Vc<OutputAssets>> {
     let dynamic_import_entries = &*dynamic_import_entries.await?;
 
-    let mut loadable_manifest: FxHashMap<String, LoadableManifest> = FxHashMap::default();
+    let mut loadable_manifest: FxIndexMap<String, LoadableManifest> = FxIndexMap::default();
 
     for (_, (module_id, chunk_output)) in dynamic_import_entries.into_iter() {
         let chunk_output = chunk_output.await?;

filename: turbopack/crates/turbopack-resolve/src/typescript.rs
patch: @@ -1,9 +1,9 @@
-use std::{collections::HashMap, mem::take};
+use std::mem::take;
 
 use anyhow::Result;
 use serde_json::Value as JsonValue;
 use turbo_rcstr::{RcStr, rcstr};
-use turbo_tasks::{ResolvedVc, ValueDefault, Vc, fxindexset};
+use turbo_tasks::{FxIndexMap, ResolvedVc, ValueDefault, Vc, fxindexset};
 use turbo_tasks_fs::{FileContent, FileJsonContent, FileSystemPath, FileSystemPathOption};
 use turbopack_core::{
     asset::Asset,
@@ -287,7 +287,7 @@ pub async fn tsconfig_resolve_options(
         None
     };
 
-    let mut all_paths = HashMap::new();
+    let mut all_paths = FxIndexMap::default();
     for (content, source) in configs.iter().rev() {
         if let FileJsonContent::Content(json) = &*content.await?
             && let JsonValue::Object(paths) = &json["compilerOptions"]["paths"]