helloadhavan/github_issues huggingface dataset:
Repository: huggingface/transformers
Pull request: Update config.torch_dtype correctly

# What does this PR do?

This PR fixes an issue with dtype when loading models like CLIPTextModelWithProjection that init the model using `_from_config`.  

Changed files:
filename: src/transformers/modeling_utils.py
patch: @@ -1223,10 +1223,12 @@ def _get_torch_dtype(
                     )
             elif hasattr(torch, torch_dtype):
                 torch_dtype = getattr(torch, torch_dtype)
+                config.torch_dtype = torch_dtype
                 for sub_config_key in config.sub_configs.keys():
                     sub_config = getattr(config, sub_config_key)
                     sub_config.torch_dtype = torch_dtype
         elif isinstance(torch_dtype, torch.dtype):
+            config.torch_dtype = torch_dtype
             for sub_config_key in config.sub_configs.keys():
                 sub_config = getattr(config, sub_config_key)
                 sub_config.torch_dtype = torch_dtype

filename: tests/utils/test_modeling_utils.py
patch: @@ -36,6 +36,7 @@
     AutoModel,
     AutoModelForImageClassification,
     AutoModelForSequenceClassification,
+    CLIPTextModelWithProjection,
     DynamicCache,
     LlavaForConditionalGeneration,
     MistralForCausalLM,
@@ -617,6 +618,14 @@ def remove_torch_dtype(model_path):
         model = AutoModel.from_pretrained(TINY_BERT_FOR_TOKEN_CLASSIFICATION, torch_dtype="auto")
         self.assertEqual(model.dtype, torch.float32)
 
+        # test model that init the model with _from_config
+        model = CLIPTextModelWithProjection.from_pretrained(
+            "hf-internal-testing/diffusers-stable-diffusion-tiny-all",
+            subfolder="text_encoder",
+            torch_dtype=torch.bfloat16,
+        )
+        self.assertEqual(model.dtype, torch.bfloat16)
+
     def test_model_from_pretrained_attn_implementation(self):
         # test that the model can be instantiated with attn_implementation of either
         # 1. explicit from_pretrained's attn_implementation argument
Repository: facebook/react
Pull request: Turn on enableSyncDefaultUpdates everywhere

## Overview

We've successfully updated this internally so we can hardcode the internal flags.

Changed files:
filename: packages/shared/forks/ReactFeatureFlags.native-fb.js
patch: @@ -59,7 +59,7 @@ export const enableUseRefAccessWarning = false;
 export const enableRecursiveCommitTraversal = false;
 export const disableSchedulerTimeoutInWorkLoop = false;
 export const enableLazyContextPropagation = false;
-export const enableSyncDefaultUpdates = false;
+export const enableSyncDefaultUpdates = true;
 export const allowConcurrentByDefault = true;
 
 // Flow magic to verify the exports of this file match the original version.

filename: packages/shared/forks/ReactFeatureFlags.test-renderer.native.js
patch: @@ -58,7 +58,7 @@ export const enableUseRefAccessWarning = false;
 export const enableRecursiveCommitTraversal = false;
 export const disableSchedulerTimeoutInWorkLoop = false;
 export const enableLazyContextPropagation = false;
-export const enableSyncDefaultUpdates = false;
+export const enableSyncDefaultUpdates = true;
 export const allowConcurrentByDefault = true;
 
 // Flow magic to verify the exports of this file match the original version.

filename: packages/shared/forks/ReactFeatureFlags.test-renderer.www.js
patch: @@ -58,7 +58,7 @@ export const enableUseRefAccessWarning = false;
 export const enableRecursiveCommitTraversal = false;
 export const disableSchedulerTimeoutInWorkLoop = false;
 export const enableLazyContextPropagation = false;
-export const enableSyncDefaultUpdates = false;
+export const enableSyncDefaultUpdates = true;
 export const allowConcurrentByDefault = true;
 
 // Flow magic to verify the exports of this file match the original version.
Repository: denoland/deno
Pull request: fix(ext/node): Support `env` option in worker_thread

Fixes https://github.com/denoland/deno/issues/23455



Changed files:
filename: ext/node/polyfills/worker_threads.ts
patch: @@ -27,6 +27,7 @@ import * as webidl from "ext:deno_webidl/00_webidl.js";
 import { notImplemented } from "ext:deno_node/_utils.ts";
 import { EventEmitter } from "node:events";
 import { BroadcastChannel } from "ext:deno_broadcast_channel/01_broadcast_channel.js";
+import process from "node:process";
 
 const { ObjectPrototypeIsPrototypeOf } = primordials;
 const {
@@ -128,6 +129,7 @@ class NodeWorker extends EventEmitter {
     const serializedWorkerMetadata = serializeJsMessageData({
       workerData: options?.workerData,
       environmentData: environmentData,
+      env: options?.env,
     }, options?.transferList ?? []);
     const id = op_create_worker(
       {
@@ -348,6 +350,10 @@ internals.__initWorkerThreads = (
       const { 0: metadata, 1: _ } = maybeWorkerMetadata;
       workerData = metadata.workerData;
       environmentData = metadata.environmentData;
+      const env = metadata.env;
+      if (env) {
+        process.env = env;
+      }
     }
     defaultExport.workerData = workerData;
     defaultExport.parentPort = parentPort;

filename: tests/unit_node/worker_threads_test.ts
patch: @@ -460,3 +460,29 @@ Deno.test("[node/worker_threads] receiveMessageOnPort works if there's pending r
   port5.close();
   port6.close();
 });
+
+Deno.test({
+  name: "[node/worker_threads] Worker env",
+  async fn() {
+    const deferred = Promise.withResolvers<void>();
+    const worker = new workerThreads.Worker(
+      `
+      import { parentPort } from "node:worker_threads";
+      import process from "node:process";
+      parentPort.postMessage(process.env.TEST_ENV);
+      `,
+      {
+        eval: true,
+        env: { TEST_ENV: "test" },
+      },
+    );
+
+    worker.on("message", (data) => {
+      assertEquals(data, "test");
+      deferred.resolve();
+    });
+
+    await deferred.promise;
+    await worker.terminate();
+  },
+});
Repository: facebook/react
Pull request: DevTools: Revert force deep re-mount when Fast Refresh detected

This reverts the most expensive part of 1e3383a41 (#21516) which seems to no longer be necessary after subsequent changes.

Changed files:
filename: packages/react-devtools-shared/src/backend/renderer.js
patch: @@ -829,12 +829,6 @@ export function attach(
       throw Error('Cannot modify filter preferences while profiling');
     }
 
-    unmountAndRemountAllRoots(() => {
-      applyComponentFilters(componentFilters);
-    });
-  }
-
-  function unmountAndRemountAllRoots(callback?: Function) {
     // Recursively unmount all roots.
     hook.getFiberRoots(rendererID).forEach(root => {
       currentRootID = getOrGenerateFiberID(root.current);
@@ -846,9 +840,7 @@ export function attach(
       currentRootID = -1;
     });
 
-    if (typeof callback === 'function') {
-      callback();
-    }
+    applyComponentFilters(componentFilters);
 
     // Reset pseudo counters so that new path selections will be persisted.
     rootDisplayNameCounter.clear();
@@ -1797,20 +1789,6 @@ export function attach(
       );
     }
 
-    const unsafeID = getFiberIDUnsafe(fiber);
-    if (fiber._debugNeedsRemount) {
-      if (unsafeID === null) {
-        // This inidicates a case we can't recover from:
-        // Fast Refresh has force remounted a component in a way that we don't have an id for.
-        // We could throw but that's a bad user experience.
-        // Or we could ignore the unmount but then Store might end up with a duplicate node.
-        // So a fallback is to completely reset the Store.
-        // This is costly but since Fast Refresh is only used in DEV builds, it should be okay.
-        setTimeout(unmountAndRemountAllRoots, 0);
-        return;
-      }
-    }
-
     if (trackedPathMatchFiber !== null) {
       // We're in the process of trying to restore previous selection.
       // If this fiber matched but is being unmounted, there's no use trying.
@@ -1823,11 +1801,14 @@ export function attach(
       }
     }
 
+    const unsafeID = getFiberIDUnsafe(fiber);
     if (unsafeID === null) {
       // If we've never seen this Fiber, it might be inside of a legacy render Suspense fragment (so the store is not even aware of it).
       // In that case we can just ignore it or it will cause errors later on.
       // One example of this is a Lazy component that never resolves before being unmounted.
       //
+      // This also might indicate a Fast Refresh force-remount scenario.
+      //
       // TODO: This is fragile and can obscure actual bugs.
       return;
     }
Repository: electron/electron
Pull request: fix: High Contrast mode not working on Windows

#### Description of Change

Closes https://github.com/electron/electron/issues/42609
Refs https://chromium-review.googlesource.com/c/chromium/src/+/5324688
Refs https://chromium-review.googlesource.com/c/chromium/src/+/5368321

Fixes an issue where High Contrast Mode didn't apply to webContents on Windows. This happened as a result of the above CLs - Chromium moved forced color state logic to a Web Setting in Blink. To fix this, we need to also handle it as a web preference via `ElectronBrowserClient::OverrideWebkitPrefs`

#### Checklist
<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

- [x] PR description included and stakeholders cc'd
- [x] `npm test` passes
- [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: Fixes an issue where High Contrast Mode didn't apply to webContents on Windows.

Changed files:
filename: shell/browser/electron_browser_client.cc
patch: @@ -424,6 +424,7 @@ void ElectronBrowserClient::OverrideWebkitPrefs(
   renderer_prefs->can_accept_load_drops = false;
 
   ui::NativeTheme* native_theme = ui::NativeTheme::GetInstanceForNativeUi();
+  prefs->in_forced_colors = native_theme->InForcedColorsMode();
   prefs->preferred_color_scheme =
       native_theme->ShouldUseDarkColors()
           ? blink::mojom::PreferredColorScheme::kDark
Repository: denoland/deno
Pull request: fix(ext/node): `cp` into non-existent parent directory

Fixes https://github.com/denoland/deno/issues/20604 


Changed files:
filename: ext/fs/std_fs.rs
patch: @@ -576,6 +576,12 @@ fn cp(from: &Path, to: &Path) -> FsResult<()> {
         );
       }
     }
+
+    // Ensure parent destination directory exists
+    if let Some(parent) = to.parent() {
+      fs::create_dir_all(parent)?;
+    }
+
     copy_file(from, to)
   }
 

filename: tests/unit_node/_fs/_fs_copy_test.ts
patch: @@ -2,7 +2,7 @@
 import * as path from "@std/path/mod.ts";
 import { assert } from "@std/assert/mod.ts";
 import { assertCallbackErrorUncaught } from "../_test_utils.ts";
-import { copyFile, copyFileSync, existsSync } from "node:fs";
+import { copyFile, copyFileSync, cpSync, existsSync } from "node:fs";
 
 const destFile = "./destination.txt";
 
@@ -50,3 +50,13 @@ Deno.test("[std/node/fs] copyFile callback isn't called twice if error is thrown
     },
   });
 });
+
+Deno.test("[std/node/fs] cp creates destination directory", async () => {
+  const tempDir = await Deno.makeTempDir();
+  const tempFile1 = path.join(tempDir, "file1.txt");
+  const tempFile2 = path.join(tempDir, "dir", "file2.txt");
+  await Deno.writeTextFile(tempFile1, "hello world");
+  cpSync(tempFile1, tempFile2);
+  assert(existsSync(tempFile2));
+  await Deno.remove(tempDir, { recursive: true });
+});
Repository: nodejs/node
Pull request: doc: add isBigIntObject to documentation

Refs: https://github.com/nodejs/node/pull/19989
Fixes: https://github.com/nodejs/node/issues/55446


<!--
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: doc/api/util.md
patch: @@ -2379,6 +2379,24 @@ util.types.isBigInt64Array(new BigInt64Array());   // Returns true
 util.types.isBigInt64Array(new BigUint64Array());  // Returns false
 ```
 
+### `util.types.isBigIntObject(value)`
+
+<!-- YAML
+added: v10.4.0
+-->
+
+* `value` {any}
+* Returns: {boolean}
+
+Returns `true` if the value is a BigInt object, e.g. created
+by `Object(BigInt(123))`.
+
+```js
+util.types.isBigIntObject(Object(BigInt(123)));   // Returns true
+util.types.isBigIntObject(BigInt(123));   // Returns false
+util.types.isBigIntObject(123);  // Returns false
+```
+
 ### `util.types.isBigUint64Array(value)`
 
 <!-- YAML
Repository: facebook/react
Pull request: Add key to inspected-element error boundary

This way changing the selected element also recreates/resets the boundary automatically.

Changed files:
filename: packages/react-devtools-shared/src/devtools/views/Components/InspectedElementErrorBoundary.js
patch: @@ -8,7 +8,9 @@
  */
 
 import * as React from 'react';
+import {useContext} from 'react';
 import ErrorBoundary from '../ErrorBoundary';
+import {TreeStateContext} from './TreeContext';
 import styles from './InspectedElementErrorBoundary.css';
 
 type WrapperProps = {|
@@ -18,9 +20,14 @@ type WrapperProps = {|
 export default function InspectedElementErrorBoundaryWrapper({
   children,
 }: WrapperProps) {
+  // Key on the selected element ID so that changing the selected element automatically hides the boundary.
+  // This seems best since an error inspecting one element isn't likely to be relevant to another element.
+  const {selectedElementID} = useContext(TreeStateContext);
   return (
     <div className={styles.Wrapper}>
-      <ErrorBoundary canDismiss={true}>{children}</ErrorBoundary>
+      <ErrorBoundary key={selectedElementID} canDismiss={true}>
+        {children}
+      </ErrorBoundary>
     </div>
   );
 }
Repository: ggml-org/llama.cpp
Pull request: Update README.md

Bindings for Delphi

Changed files:
filename: README.md
patch: @@ -157,6 +157,7 @@ Instructions for adding support for new models: [HOWTO-add-model.md](docs/develo
 - Guile Scheme: [guile_llama_cpp](https://savannah.nongnu.org/projects/guile-llama-cpp)
 - Swift [srgtuszy/llama-cpp-swift](https://github.com/srgtuszy/llama-cpp-swift)
 - Swift [ShenghaiWang/SwiftLlama](https://github.com/ShenghaiWang/SwiftLlama)
+- Delphi [Embarcadero/llama-cpp-delphi](https://github.com/Embarcadero/llama-cpp-delphi)
 
 </details>
Repository: vercel/next.js
Pull request: fix(CI): Re-enable retries for bundler integration tests

These retries were breaking CI (too slow, causing timeouts) when most of these tests were failing, but now that most of the tests are passing, re-enable retries because many tests have some amount of flakiness.

- Development tests: https://github.com/vercel/next.js/actions/runs/13936223704
- Production build tests: https://github.com/vercel/next.js/actions/runs/13936225174

Closes PACK-4186

Changed files:
filename: .github/workflows/rspack-nextjs-build-integration-tests.yml
patch: @@ -22,7 +22,4 @@ jobs:
       integration_groups: 12
       e2e_timeout_minutes: 90
       integration_timeout_minutes: 90
-      # Don't retry, instead of the default of twice, many of these tests are
-      # currently failing, and it's wasteful to keep retrying them.
-      num_retries: 0
     secrets: inherit

filename: .github/workflows/rspack-nextjs-dev-integration-tests.yml
patch: @@ -22,7 +22,4 @@ jobs:
       integration_groups: 16
       e2e_timeout_minutes: 90
       integration_timeout_minutes: 90
-      # Don't retry, instead of the default of twice, many of these tests are
-      # currently failing, and it's wasteful to keep retrying them.
-      num_retries: 0
     secrets: inherit
Repository: huggingface/transformers
Pull request: Fix Failing GPTQ tests

# What does this PR do?
Fix GPTQ tests, according to this discussion https://github.com/ModelCloud/GPTQModel/issues/1354. 
For now when using gptqmodel, exllama kernels are not used because they don't support packing in the main branch, the default kernels used in the CI are triton kernels

## Who can review ? 
@SunMarc 

Changed files:
filename: tests/quantization/gptq/test_gptq.py
patch: @@ -94,6 +94,7 @@ class GPTQTest(unittest.TestCase):
     EXPECTED_OUTPUTS.add("Hello my name is Aiden, I am a student at the University")
     EXPECTED_OUTPUTS.add("Hello my name is Nate and I am a member of the N")
     EXPECTED_OUTPUTS.add("Hello my name is Nellie and I am a student at the")
+    EXPECTED_OUTPUTS.add("Hello my name is Nate and I am a new member of the")
 
     # this seems a little small considering that we are doing 4bit quant but we have a small model and ww don't quantize the embeddings
     EXPECTED_RELATIVE_DIFFERENCE = 1.664253062
@@ -260,7 +261,9 @@ def test_serialization(self):
                 if self.device_map == "cpu":
                     quant_type = "ipex" if is_ipex_available() else "torch"
                 else:
-                    quant_type = "exllama"
+                    # We expecte tritonv2 to be used here, because exllama backend doesn't support packing https://github.com/ModelCloud/GPTQModel/issues/1354
+                    # TODO: Remove this once GPTQModel exllama kernels supports packing
+                    quant_type = "tritonv2"
                 quantized_model_from_saved = AutoModelForCausalLM.from_pretrained(
                     tmpdirname, device_map=self.device_map
                 )
@@ -424,10 +427,18 @@ def setUpClass(cls):
         cls.tokenizer = AutoTokenizer.from_pretrained(cls.model_name, use_fast=True)
 
     def test_quantized_layers_type(self):
-        self.assertEqual(
-            self.quantized_model.model.layers[0].self_attn.k_proj.QUANT_TYPE,
-            "exllama" if is_gptqmodel_available() else "exllamav2",
-        )
+        if is_auto_gptq_available() and not is_gptqmodel_available():
+            self.assertEqual(
+                self.quantized_model.model.layers[0].self_attn.k_proj.QUANT_TYPE,
+                "exllamav2",
+            )
+        else:
+            # We expecte tritonv2 to be used here, because exllama backend doesn't support packing https://github.com/ModelCloud/GPTQModel/issues/1354
+            # TODO: Remove this once GPTQModel exllama kernels supports packing
+            self.assertEqual(
+                self.quantized_model.model.layers[0].self_attn.k_proj.QUANT_TYPE,
+                "tritonv2",
+            )
 
     def check_inference_correctness(self, model):
         """
Repository: denoland/deno
Pull request: perf(lsp): Avoid passing struct into op_resolve

Going through serde_v8 is slow, so just pass the args separately. `op_resolve` is especially hot, so any speedups are good.

Changed files:
filename: cli/lsp/tsc.rs
patch: @@ -4058,9 +4058,10 @@ fn op_release(
 #[serde]
 fn op_resolve(
   state: &mut OpState,
-  #[serde] args: ResolveArgs,
+  #[string] base: String,
+  #[serde] specifiers: Vec<String>,
 ) -> Result<Vec<Option<(String, String)>>, AnyError> {
-  op_resolve_inner(state, args)
+  op_resolve_inner(state, ResolveArgs { base, specifiers })
 }
 
 #[inline]

filename: cli/tsc/99_main_compiler.js
patch: @@ -681,7 +681,8 @@ delete Object.prototype.__proto__;
         debug(`host.writeFile("${fileName}")`);
       }
       return ops.op_emit(
-        { fileName, data },
+        data,
+        fileName,
       );
     },
     getCurrentDirectory() {
@@ -717,10 +718,10 @@ delete Object.prototype.__proto__;
           : arg;
         if (fileReference.fileName.startsWith("npm:")) {
           /** @type {[string, ts.Extension] | undefined} */
-          const resolved = ops.op_resolve({
-            specifiers: [fileReference.fileName],
-            base: containingFilePath,
-          })?.[0];
+          const resolved = ops.op_resolve(
+            containingFilePath,
+            [fileReference.fileName],
+          )?.[0];
           if (resolved) {
             isCjsCache.maybeAdd(resolved);
             return {
@@ -750,10 +751,10 @@ delete Object.prototype.__proto__;
         debug(`  specifiers: ${specifiers.join(", ")}`);
       }
       /** @type {Array<[string, ts.Extension] | undefined>} */
-      const resolved = ops.op_resolve({
-        specifiers,
+      const resolved = ops.op_resolve(
         base,
-      });
+        specifiers,
+      );
       if (resolved) {
         const result = resolved.map((item) => {
           if (item) {

filename: cli/tsc/mod.rs
patch: @@ -412,9 +412,13 @@ struct EmitArgs {
   file_name: String,
 }
 
-#[op2]
-fn op_emit(state: &mut OpState, #[serde] args: EmitArgs) -> bool {
-  op_emit_inner(state, args)
+#[op2(fast)]
+fn op_emit(
+  state: &mut OpState,
+  #[string] data: String,
+  #[string] file_name: String,
+) -> bool {
+  op_emit_inner(state, EmitArgs { data, file_name })
 }
 
 #[inline]
@@ -590,9 +594,10 @@ pub struct ResolveArgs {
 #[serde]
 fn op_resolve(
   state: &mut OpState,
-  #[serde] args: ResolveArgs,
+  #[string] base: String,
+  #[serde] specifiers: Vec<String>,
 ) -> Result<Vec<(String, String)>, AnyError> {
-  op_resolve_inner(state, args)
+  op_resolve_inner(state, ResolveArgs { base, specifiers })
 }
 
 #[inline]