helloadhavan/github_issues huggingface dataset:
Repository: electron/electron
Pull request: fix: regression with directory selection in macOS dialogs

#### Description of Change

Fixes https://github.com/electron/electron/issues/47248

Regressed with https://github.com/electron/electron/pull/47077

#### Release Notes

Notes: fix regression with directory selection in macOS dialogs

Changed files:
filename: shell/browser/ui/file_dialog_mac.mm
patch: @@ -321,7 +321,7 @@ void ReadDialogPathsWithBookmarks(NSOpenPanel* dialog,
       BOOL is_package_as_directory =
           [[NSWorkspace sharedWorkspace] isFilePackageAtPath:path] &&
           [dialog treatsFilePackagesAsDirectories];
-      if (!exists || !is_directory || !is_package_as_directory)
+      if (!exists || !(is_directory || is_package_as_directory))
         continue;
     }
Repository: huggingface/transformers
Pull request: [ESM] add accepts_loss_kwargs=False to EsmPreTrainedModel

#40370 added a `**kwargs` to the ESM-2 model's forward pass, which means this model now triggers [these lines](https://github.com/huggingface/transformers/blob/6d2bb1e04db6c8d193549d4b0c99d2182837c0ad/src/transformers/trainer.py#L4127-L4132) in the HF trainer, making losses inconsistent between single and multi-device training.
```python
        if (
            self.args.average_tokens_across_devices
            and (self.model_accepts_loss_kwargs or self.compute_loss_func)
            and num_items_in_batch is not None
        ):
            loss *= self.accelerator.num_processes
```

We can avoid this by setting the `accepts_loss_kwargs` flag to False in the model definition.
CC @zucchini-nlp, @Rocketknight1 


Changed files:
filename: src/transformers/models/esm/modeling_esm.py
patch: @@ -589,6 +589,7 @@ class EsmPreTrainedModel(PreTrainedModel):
     config: EsmConfig
     base_model_prefix = "esm"
     supports_gradient_checkpointing = True
+    accepts_loss_kwargs = False
     _no_split_modules = ["EsmLayer", "EsmFoldTriangularSelfAttentionBlock", "EsmEmbeddings"]
     _keys_to_ignore_on_load_unexpected = ["position_embeddings.weight"]
     _supports_flash_attn = True
Repository: ggml-org/llama.cpp
Pull request: Add pwilkin to CODEOWNERS for chat files

Adopting the ownerless chat files.

Changed files:
filename: CODEOWNERS
patch: @@ -10,6 +10,7 @@
 /common/arg.*                           @ggerganov
 /common/base64.hpp.*                    @ggerganov
 /common/build-info.*                    @ggerganov
+/common/chat.*                          @pwilkin
 /common/chat-peg-parser.*               @aldehir
 /common/common.*                        @ggerganov
 /common/console.*                       @ggerganov
@@ -84,6 +85,7 @@
 /src/llama-vocab.*                      @CISC
 /src/models/                            @CISC
 /tests/                                 @ggerganov
+/tests/test-chat-.*                     @pwilkin
 /tools/batched-bench/                   @ggerganov
 /tools/main/                            @ggerganov
 /tools/mtmd/                            @ngxson
Repository: denoland/deno
Pull request: fix(node): unconditionally call `Module.prototype._compile` with the file content in `loadMaybeCjs`

The stuff people do in the node ecosystem...

Closes https://github.com/denoland/deno/issues/32123

Changed files:
filename: ext/node/polyfills/01_require.js
patch: @@ -1080,9 +1080,8 @@ Module._extensions[".mjs"] = loadESMFromCJS;
 Module._extensions[".wasm"] = loadESMFromCJS;
 
 function loadMaybeCjs(module, filename) {
-  const isMaybeCjs = op_require_is_maybe_cjs(filename);
-  const format = isMaybeCjs ? undefined : "module";
-  const content = isMaybeCjs ? op_require_read_file(filename) : undefined;
+  const content = op_require_read_file(filename);
+  const format = op_require_is_maybe_cjs(filename) ? undefined : "module";
   module._compile(content, filename, format);
 }
 

filename: tests/specs/node/require_compile_hook/__test__.jsonc
patch: @@ -0,0 +1,7 @@
+{
+  // Regression test for https://github.com/denoland/deno/issues/32123
+  // Libraries like pirates/esbuild-register hook Module.prototype._compile
+  // and expect the content argument to always be a string.
+  "args": "run -A main.cjs",
+  "output": "hello from lib.ts\n"
+}

filename: tests/specs/node/require_compile_hook/lib.ts
patch: @@ -0,0 +1 @@
+console.log("hello from lib.ts");

filename: tests/specs/node/require_compile_hook/main.cjs
patch: @@ -0,0 +1,14 @@
+const Module = require("module");
+
+// simulate what pirates/esbuild-register does: hook _compile
+const originalCompile = Module.prototype._compile;
+Module.prototype._compile = function (content, filename, format) {
+  if (typeof content !== "string") {
+    throw new TypeError(
+      "content passed to _compile should be a string, got " + typeof content,
+    );
+  }
+  return originalCompile.call(this, content, filename, format);
+};
+
+require("./lib.ts");
Repository: vercel/next.js
Pull request: [turbopack] defer a `value_to_string` operation until we need it

Don't stringify the lookup_dir unless we actually need to print it, which should be very rare.



Closes PACK-5562

Changed files:
filename: turbopack/crates/turbopack-core/src/resolve/mod.rs
patch: @@ -1464,7 +1464,6 @@ pub async fn resolve_raw(
 
     let mut results = Vec::new();
 
-    let lookup_dir_str = lookup_dir.value_to_string().await?;
     let pat = path.await?;
     if let Some(pat) = pat
         .filter_could_match("/ROOT/")
@@ -1483,7 +1482,7 @@ pub async fn resolve_raw(
             println!(
                 "WARN: resolving abs pattern {} in {} leads to {} results",
                 path_str,
-                lookup_dir_str,
+                lookup_dir.value_to_string().await?,
                 matches.len()
             );
         } else {
@@ -1496,12 +1495,13 @@ pub async fn resolve_raw(
     }
 
     {
-        let matches = read_matches(lookup_dir, rcstr!(""), force_in_lookup_dir, path).await?;
+        let matches =
+            read_matches(lookup_dir.clone(), rcstr!(""), force_in_lookup_dir, path).await?;
         if matches.len() > 10000 {
             println!(
                 "WARN: resolving pattern {} in {} leads to {} results",
                 pat.describe_as_string(),
-                lookup_dir_str,
+                lookup_dir.value_to_string().await?,
                 matches.len()
             );
         }

filename: turbopack/crates/turbopack-ecmascript/src/references/raw.rs
patch: @@ -48,7 +48,7 @@ impl ModuleReference for FileSourceReference {
                 context_dir,
                 *self.path,
                 self.collect_affecting_sources,
-                false,
+                /* force_in_lookup_dir */ false,
             )
             .as_raw_module_result()
             .resolve()
Repository: nodejs/node
Pull request: src: use simdjson::pad

ref: #59389

Changed files:
filename: src/node_modules.cc
patch: @@ -107,23 +107,11 @@ const BindingData::PackageConfig* BindingData::GetPackageJSON(
   if (ReadFileSync(&package_config.raw_json, path.data()) < 0) {
     return nullptr;
   }
-  // In some systems, std::string is annotated to generate an
-  // AddressSanitizer: container-overflow error when reading beyond the end of
-  // the string even when we are still within the capacity of the string.
-  // https://github.com/google/sanitizers/wiki/AddressSanitizerContainerOverflow
-  // https://github.com/nodejs/node/issues/55584
-  // The next lines are a workaround to avoid this false positive.
-  size_t json_length = package_config.raw_json.size();
-  package_config.raw_json.append(simdjson::SIMDJSON_PADDING, ' ');
-  simdjson::padded_string_view json_view(package_config.raw_json.data(),
-                                         json_length,
-                                         package_config.raw_json.size());
-  // End of workaround
-
   simdjson::ondemand::document document;
   simdjson::ondemand::object main_object;
   simdjson::error_code error =
-      binding_data->json_parser.iterate(json_view).get(document);
+      binding_data->json_parser.iterate(simdjson::pad(package_config.raw_json))
+          .get(document);
 
   const auto throw_invalid_package_config = [error_context, path, realm]() {
     if (error_context == nullptr) {
Repository: facebook/react
Pull request: Add build-for-flight-dev script to package.json

Similar to the build-for-devtools script. I often have to build locally for the flight fixture. This builds a subset that makes it work (in DEV).

Changed files:
filename: package.json
patch: @@ -112,6 +112,7 @@
     "build-for-devtools": "cross-env RELEASE_CHANNEL=experimental yarn build react/index,react/jsx,react/compiler-runtime,react-dom/index,react-dom/client,react-dom/unstable_testing,react-dom/test-utils,react-is,react-debug-tools,scheduler,react-test-renderer,react-refresh,react-art --type=NODE",
     "build-for-devtools-dev": "yarn build-for-devtools --type=NODE_DEV",
     "build-for-devtools-prod": "yarn build-for-devtools --type=NODE_PROD",
+    "build-for-flight-dev": "cross-env RELEASE_CHANNEL=experimental node ./scripts/rollup/build.js react/index,react/jsx,react-dom/index,react-dom/client,react-dom/server,react-dom-server.node,react-dom-server-legacy.node,scheduler,react-server-dom-webpack/ --type=NODE_DEV && mv ./build/node_modules ./build/oss-experimental",
     "linc": "node ./scripts/tasks/linc.js",
     "lint": "node ./scripts/tasks/eslint.js",
     "lint-build": "node ./scripts/rollup/validate/index.js",
Repository: electron/electron
Pull request: fix: regression with directory selection in macOS dialogs

Backport of #47259

See that PR for details.


Notes: fix regression with directory selection in macOS dialogs

Changed files:
filename: shell/browser/ui/file_dialog_mac.mm
patch: @@ -321,7 +321,7 @@ void ReadDialogPathsWithBookmarks(NSOpenPanel* dialog,
       BOOL is_package_as_directory =
           [[NSWorkspace sharedWorkspace] isFilePackageAtPath:path] &&
           [dialog treatsFilePackagesAsDirectories];
-      if (!exists || !is_directory || !is_package_as_directory)
+      if (!exists || !(is_directory || is_package_as_directory))
         continue;
     }
Repository: facebook/react
Pull request: [ci] Combine Runtime workflows

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):
* __->__ #30324
* #30323

Merges most workflows into a single workflow, which should make the
"Checks" tab easier to visualize sincee it will all be graphed in a
single interface. There should be no change in behavior, this is a
mechanical change.

See https://github.com/facebook/react/actions/runs/9911068433

Changed files:
filename: .github/workflows/runtime_build_and_test.yml
patch: @@ -1,4 +1,4 @@
-name: (Runtime) Build
+name: (Runtime) Build and Test
 
 on:
   push:
Repository: facebook/react
Pull request: [ci] Standardize node version and timezones

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):
* #30324
* __->__ #30323

Quick change to standardize on a single timezone across all workflows
and to use the same version of node (18.20.1).

Also updates .nvmrc

Changed files:
filename: .github/workflows/runtime_build.yml
patch: @@ -10,9 +10,6 @@ on:
 env:
   TZ: /usr/share/zoneinfo/America/Los_Angeles
 
-env:
-  TZ: /usr/share/zoneinfo/America/Los_Angeles
-
 jobs:
   build_and_lint:
     name: yarn build and lint
Repository: facebook/react
Pull request: [RN] Remove __EXPERIMENTAL__ from enableOwnerStacks, enableUseDeferredValueInitialArg

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):
* __->__ #30322
* #30169
* #30072
* #30073
* #30071
* #30070

In www, the experimental versions get a .modern.js or .classic.js prefix
and get copied into the same folder. In RN, they don't seem to have
.modern.js and .classic.js versions so they end up getting the same
name.

@sebmarkbage's theory is that what happens is that they then override
the file that was already there. So depending on if experimental or
stable build finishes first you get a different version at the end.

It doesn't make sense to use `__EXPERIMENTAL__` for flags in native-fb
since there's no modern/classic split there. So that flag should just be
hardcoded to true or false and then it doesn't matter which one finishes
first.

We don't support experimental builds in OSS RN neither so the same thing
could happen with
[`enableOwnerStacks`](https://github.com/facebook/react/blob/5dcf3ca8d45a276a8b4cee0cedd234967661ca35/packages/shared/forks/ReactFeatureFlags.native-oss.js#L60).

You can see that the build errors in the previous PR but passes after
these flag changes.

## Test plan

1. Download gh build from https://github.com/facebook/react/actions/runs/9910037870/artifacts/1695683186
2. Download circle build from https://app.circleci.com/pipelines/github/facebook/react/56533/workflows/ff3b91bc-0af8-460a-a234-694531a50a44/jobs/950161/artifacts
3. Uncompress, remove size subdirectories due to ordering differences, compare circle and gh directories: https://gist.github.com/poteto/e46b37076262a71a86b7fa2d71d267fe. Note that the only difference is in the git hash (because of ghstack) and in the [variable names for useMemoCache in react-debug-tools](https://gist.github.com/poteto/e46b37076262a71a86b7fa2d71d267fe#file-diff-patch-L1025-L1090). Not 100% sure why these changed, but it's just variable names so it looks benign

Changed files:
filename: packages/shared/forks/ReactFeatureFlags.test-renderer.native-fb.js
patch: @@ -69,7 +69,7 @@ export const enableTaint = true;
 export const enableTransitionTracing = false;
 export const enableTrustedTypesIntegration = false;
 export const enableUpdaterTracking = false;
-export const enableUseDeferredValueInitialArg = false;
+export const enableUseDeferredValueInitialArg = true;
 export const enableUseEffectEventHook = false;
 export const enableUseMemoCacheHook = true;
 export const favorSafetyOverHydrationPerf = true;
Repository: ollama/ollama
Pull request: cmd: add usage for `ollama run` environment variables

Also, fix the indentation of usage for `ollama serve` environment variables.

Fixes #2944 

Changed files:
filename: cmd/cmd.go
patch: @@ -887,6 +887,14 @@ func versionHandler(cmd *cobra.Command, _ []string) {
 	}
 }
 
+func appendHostEnvDocs(cmd *cobra.Command) {
+	const hostEnvDocs = `
+Environment Variables:
+      OLLAMA_HOST        The host:port or base URL of the Ollama server (e.g. http://localhost:11434)
+`
+	cmd.SetUsageTemplate(cmd.UsageTemplate() + hostEnvDocs)
+}
+
 func NewCLI() *cobra.Command {
 	log.SetFlags(log.LstdFlags | log.Lshortfile)
 	cobra.EnableCommandSorting = false
@@ -952,7 +960,6 @@ func NewCLI() *cobra.Command {
 	runCmd.Flags().Bool("insecure", false, "Use an insecure registry")
 	runCmd.Flags().Bool("nowordwrap", false, "Don't wrap words to the next line automatically")
 	runCmd.Flags().String("format", "", "Response format (e.g. json)")
-
 	serveCmd := &cobra.Command{
 		Use:     "serve",
 		Aliases: []string{"start"},
@@ -963,20 +970,9 @@ func NewCLI() *cobra.Command {
 	serveCmd.SetUsageTemplate(serveCmd.UsageTemplate() + `
 Environment Variables:
 
-	OLLAMA_HOST
-		The host:port to bind to (default "127.0.0.1:11434")
-
-		Examples:
-			"127.0.0.1:11434"
-	OLLAMA_ORIGINS
-		A comma separated list of allowed origins. If unset, the
-		default behavior is to allow same origin requests, only.
-
-		Examples:
-			"localhost:11434"
-			"example.com,api.example.com"
-	OLLAMA_MODELS
-		The path to the models directory (default is "~/.ollama/models")
+    OLLAMA_HOST       The host:port to bind to (default "127.0.0.1:11434")
+    OLLAMA_ORIGINS    A comma separated list of allowed origins.
+    OLLAMA_MODELS     The path to the models directory (default is "~/.ollama/models")
 `)
 
 	pullCmd := &cobra.Command{
@@ -1022,6 +1018,19 @@ Environment Variables:
 		RunE:    DeleteHandler,
 	}
 
+	for _, cmd := range []*cobra.Command{
+		createCmd,
+		showCmd,
+		runCmd,
+		pullCmd,
+		pushCmd,
+		listCmd,
+		copyCmd,
+		deleteCmd,
+	} {
+		appendHostEnvDocs(cmd)
+	}
+
 	rootCmd.AddCommand(
 		serveCmd,
 		createCmd,
Repository: ggml-org/llama.cpp
Pull request: ci : transform release binary root dir in tar to llama-bXXXX

Avoid storing `.` as root dir in tar.

Changed files:
filename: .github/workflows/release.yml
patch: @@ -67,7 +67,7 @@ jobs:
         run: |
           cp LICENSE ./build/bin/
           zip -y -r llama-${{ steps.tag.outputs.name }}-bin-macos-arm64.zip ./build/bin/*
-          tar -czvf llama-${{ steps.tag.outputs.name }}-bin-macos-arm64.tar.gz -C ./build/bin .
+          tar -czvf llama-${{ steps.tag.outputs.name }}-bin-macos-arm64.tar.gz -s ",./,llama-${{ steps.tag.outputs.name }}/," -C ./build/bin .
 
       - name: Upload artifacts (zip)
         uses: actions/upload-artifact@v4
@@ -128,7 +128,7 @@ jobs:
         run: |
           cp LICENSE ./build/bin/
           zip -y -r llama-${{ steps.tag.outputs.name }}-bin-macos-x64.zip ./build/bin/*
-          tar -czvf llama-${{ steps.tag.outputs.name }}-bin-macos-x64.tar.gz -C ./build/bin .
+          tar -czvf llama-${{ steps.tag.outputs.name }}-bin-macos-x64.tar.gz -s ",./,llama-${{ steps.tag.outputs.name }}/," -C ./build/bin .
 
       - name: Upload artifacts (zip)
         uses: actions/upload-artifact@v4
@@ -197,7 +197,7 @@ jobs:
         run: |
           cp LICENSE ./build/bin/
           zip -y -r llama-${{ steps.tag.outputs.name }}-bin-ubuntu-${{ matrix.build }}.zip ./build/bin/*
-          tar -czvf llama-${{ steps.tag.outputs.name }}-bin-ubuntu-${{ matrix.build }}.tar.gz -C ./build/bin .
+          tar -czvf llama-${{ steps.tag.outputs.name }}-bin-ubuntu-${{ matrix.build }}.tar.gz --transform "s,./,llama-${{ steps.tag.outputs.name }}/," -C ./build/bin .
 
       - name: Upload artifacts (zip)
         uses: actions/upload-artifact@v4
@@ -257,7 +257,7 @@ jobs:
         run: |
           cp LICENSE ./build/bin/
           zip -y -r llama-${{ steps.tag.outputs.name }}-bin-ubuntu-vulkan-x64.zip ./build/bin/*
-          tar -czvf llama-${{ steps.tag.outputs.name }}-bin-ubuntu-vulkan-x64.tar.gz -C ./build/bin .
+          tar -czvf llama-${{ steps.tag.outputs.name }}-bin-ubuntu-vulkan-x64.tar.gz --transform "s,./,llama-${{ steps.tag.outputs.name }}/," -C ./build/bin .
 
       - name: Upload artifacts (zip)
         uses: actions/upload-artifact@v4
Repository: huggingface/transformers
Pull request: Fix Qwen3-Omni audio_token_id serialization issue

# What does this PR do?

This PR fixes a critical bug in Qwen3-Omni model configuration where `audio_token_id` was not properly preserved during `save_pretrained`/`from_pretrained` operations, causing incorrect inference results in training scenarios.

## Problem

When using `save_pretrained()` followed by `from_pretrained()` on Qwen3-Omni models, the `audio_token_id` value was being reset to the default value (151646) instead of preserving the original value (e.g., 151675), leading to abnormal audio training/inference results.

## Root Cause

The issue was caused by a mismatch between the `attribute_map` in `Qwen3OmniMoeThinkerConfig` and the actual implementation:

- `attribute_map` was mapping `audio_token_id` → `audio_token_index`
- But the modular implementation deletes `audio_token_index` and uses `audio_token_id` directly
- This caused serialization/deserialization to fail silently

## Solution

Remove the conflicting `attribute_map` from `Qwen3OmniMoeThinkerConfig` to allow `audio_token_id` to be serialized directly, matching the actual implementation pattern used in the modular version.

## Verification

- ✅ Tested with real Qwen3-Omni model: `audio_token_id` now preserves correctly (151675 → 151675)
- ✅ Basic configuration tests pass
- ✅ No breaking changes to existing functionality

Fixes #41191

## Before submitting
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request), Pull Request section?
- [x] Was this discussed/approved via a Github issue? Yes: #41191
- [x] Did you make sure existing tests pass?
- [x] This is a bug fix that doesn't require documentation updates

## Who can review?

@ArthurZucker @SunMarc (text models and configuration)

Changed files:
filename: src/transformers/models/qwen3_omni_moe/configuration_qwen3_omni_moe.py
patch: @@ -431,11 +431,8 @@ class Qwen3OmniMoeThinkerConfig(PretrainedConfig):
     ```"""
 
     model_type = "qwen3_omni_moe_thinker"
-    attribute_map = {
-        "image_token_id": "image_token_index",
-        "video_token_id": "video_token_index",
-        "audio_token_id": "audio_token_index",
-    }
+    # Override parent's attribute_map as we use audio_token_id directly, not audio_token_index
+    attribute_map = {}
     sub_configs = {
         "audio_config": Qwen3OmniMoeAudioEncoderConfig,
         "vision_config": Qwen3OmniMoeVisionEncoderConfig,

filename: src/transformers/models/qwen3_omni_moe/modular_qwen3_omni_moe.py
patch: @@ -264,6 +264,10 @@ class Qwen3OmniMoeThinkerConfig(Qwen2_5OmniThinkerConfig):
     >>> configuration = model.config
     ```"""
 
+    model_type = "qwen3_omni_moe_thinker"
+    # Override parent's attribute_map as we use audio_token_id directly, not audio_token_index
+    attribute_map = {}
+
     def __init__(
         self,
         audio_config=None,
Repository: ollama/ollama
Pull request: remove empty examples

resolves #2984 

Changed files:
filename: .github/workflows/test.yaml
patch: @@ -2,6 +2,10 @@ name: test
 
 on:
   pull_request:
+    paths:
+      - '!docs/**'
+      - '!examples/**'
+      - '!README.md'
 
 jobs:
   generate:

filename: examples/modelfile-tweetwriter/readme.md
patch: @@ -1,23 +0,0 @@
-# Example Modelfile - Tweetwriter
-
-This simple examples shows what you can do without any code, simply relying on a Modelfile. The file has two instructions:
-
-1. FROM - The From instructions defines the parent model to use for this one. If you choose a model from the library, you can enter just the model name. For all other models, you need to specify the namespace as well. You could also use a local file. Just include the relative path to the converted, quantized model weights file. To learn more about creating that file, see the `import.md` file in the docs folder of this repository.
-2. SYSTEM - This defines the system prompt for the model and overrides the system prompt from the parent model.
-
-## Running the Example
-
-1. Create the model:
-
-   ```bash
-   ollama create tweetwriter
-   ```
-
-2. Enter a topic to generate a tweet about.
-3. Show the Modelfile in the REPL.
-
-   ```bash
-   /show modelfile
-   ```
-
-   Notice that the FROM and SYSTEM match what was in the file. But there is also a TEMPLATE and PARAMETER. These are inherited from the parent model.
\ No newline at end of file

filename: examples/python-chat-app/README.md
patch: @@ -1,21 +0,0 @@
-# Ollama Chat App
-
-Build a Llama2 chat app using Streamlit and Ollama.
-
-## Running the Example
-
-1. Ensure you have the `llama2` model installed:
-
-   ```bash
-   ollama pull llama2
-   ```
-2. Install the Python Requirements.
-
-   ```bash
-   pip install -r requirements.txt
-   ```
-3. Run the example:
-
-   ```bash
-   python main.py
-   ```