helloadhavan/github_issues huggingface dataset:
Repository: nodejs/node
Pull request: deps: update googletest to 7e17b15

This is an automated update of googletest to 7e17b15.

Changed files:
filename: deps/googletest/src/gtest.cc
patch: @@ -713,7 +713,7 @@ std::string UnitTestOptions::GetAbsolutePathToOutputFile() {
   const char* const gtest_output_flag = s.c_str();
 
   std::string format = GetOutputFormat();
-  if (format.empty()) format = std::string(kDefaultOutputFormat);
+  if (format.empty()) format = kDefaultOutputFormat;
 
   const char* const colon = strchr(gtest_output_flag, ':');
   if (colon == nullptr)
@@ -3305,6 +3305,7 @@ bool ShouldUseColor(bool stdout_is_tty) {
     const bool term_supports_color =
         term != nullptr && (String::CStringEquals(term, "xterm") ||
                             String::CStringEquals(term, "xterm-color") ||
+                            String::CStringEquals(term, "xterm-ghostty") ||
                             String::CStringEquals(term, "xterm-kitty") ||
                             String::CStringEquals(term, "alacritty") ||
                             String::CStringEquals(term, "screen") ||
@@ -4354,8 +4355,8 @@ void XmlUnitTestResultPrinter::OutputXmlTestResult(::std::ostream* stream,
           internal::FormatCompilerIndependentFileLocation(part.file_name(),
                                                           part.line_number());
       const std::string summary = location + "\n" + part.summary();
-      *stream << "      <skipped message=\""
-              << EscapeXmlAttribute(summary.c_str()) << "\">";
+      *stream << "      <skipped message=\"" << EscapeXmlAttribute(summary)
+              << "\">";
       const std::string detail = location + "\n" + part.message();
       OutputXmlCDataSection(stream, RemoveInvalidXmlCharacters(detail).c_str());
       *stream << "</skipped>\n";
@@ -6091,7 +6092,11 @@ bool UnitTestImpl::RunAllTests() {
       constexpr char kNoTestsSelectedMessage[] =
           "No tests were selected to run. Please make sure at least one test "
           "exists and is not disabled! If the test is sharded, you may have "
-          "defined more shards than test cases, which is wasteful.";
+          "defined more shards than test cases, which is wasteful. If you also "
+          "defined --gtest_filter, that filter is taken into account, so "
+          "shards with no matching test cases will hit this error. Either "
+          "disable sharding, set --gtest_fail_if_no_test_selected=false, or "
+          "remove the filter to resolve this error.";
       ColoredPrintf(GTestColor::kRed, "%s\n", kNoTestsSelectedMessage);
       return false;
     }
Repository: ggml-org/llama.cpp
Pull request: cuda: fix rope fusion for gemma3

Fix #17322, apparently we weren't checking the order of the ops here and gemma3 has a peculiar set of ops which seem to match `ggml_cuda_should_fuse_rope_set_rows` 

Changed files:
filename: ggml/src/ggml-cuda/ggml-cuda.cu
patch: @@ -3001,6 +3001,10 @@ static void update_cuda_graph_executable(ggml_backend_cuda_context * cuda_ctx) {
 static bool ggml_cuda_should_fuse_rope_set_rows(const ggml_tensor * rope,
                                                 const ggml_tensor * view,
                                                 const ggml_tensor * set_rows) {
+
+    if (rope->op != GGML_OP_ROPE || view->op != GGML_OP_VIEW || set_rows->op != GGML_OP_SET_ROWS) {
+        return false;
+    }
     // ne3 not tested
     if (rope->src[0]->ne[3] != 1) {
         return false;
Repository: facebook/react
Pull request: Fix "findNodeHandle inside its render()" False Positive Warning

This was missed in https://github.com/facebook/react/pull/29038 when unifying the "owner" abstractions, causing `findNodeHandle` to warn even outside of `render()` invocations.

Changed files:
filename: packages/react-native-renderer/src/ReactNativePublicCompat.js
patch: @@ -90,7 +90,7 @@ export function findHostInstance_DEPRECATED<TElementType: ElementType>(
 export function findNodeHandle(componentOrHandle: any): ?number {
   if (__DEV__) {
     const owner = currentOwner;
-    if (owner !== null && owner.stateNode !== null) {
+    if (owner !== null && isRendering && owner.stateNode !== null) {
       if (!owner.stateNode._warnedAboutRefsInRender) {
         console.error(
           '%s is accessing findNodeHandle inside its render(). ' +
Repository: ollama/ollama
Pull request: Add windows native build instructions

Fixes #1694

Note: the resulting native windows binary isn't particularly user friendly right now as it requires setting your PATH deep into the source tree to pick up the dependent DLLs.  I'm working on another change that will address this.  I'll keep this PR as a draft until that's ready.

Changed files:
filename: docs/development.md
patch: @@ -38,37 +38,71 @@ Now you can run `ollama`:
 ./ollama
 ```
 
-## Building on Linux with GPU support
+### Linux
 
+#### Linux CUDA (NVIDIA)
 
-### Linux/Windows CUDA (NVIDIA)
 *Your operating system distribution may already have packages for NVIDIA CUDA. Distro packages are often preferable, but instructions are distro-specific. Please consult distro-specific docs for dependencies if available!*
 
 Install `cmake` and `golang` as well as [NVIDIA CUDA](https://developer.nvidia.com/cuda-downloads) development and runtime packages.
 Then generate dependencies:
+
 ```
 go generate ./...
 ```
+
 Then build the binary:
+
 ```
 go build .
 ```
 
-### Linux ROCm (AMD)
+#### Linux ROCm (AMD)
+
 *Your operating system distribution may already have packages for AMD ROCm and CLBlast. Distro packages are often preferable, but instructions are distro-specific. Please consult distro-specific docs for dependencies if available!*
 
 Install [CLBlast](https://github.com/CNugteren/CLBlast/blob/master/doc/installation.md) and [ROCm](https://rocm.docs.amd.com/en/latest/deploy/linux/quick_start.html) developement packages first, as well as `cmake` and `golang`.
 Adjust the paths below (correct for Arch) as appropriate for your distributions install locations and generate dependencies:
+
 ```
 CLBlast_DIR=/usr/lib/cmake/CLBlast ROCM_PATH=/opt/rocm go generate ./...
 ```
+
 Then build the binary:
+
 ```
 go build .
 ```
 
 ROCm requires elevated privileges to access the GPU at runtime.  On most distros you can add your user account to the `render` group, or run as root.
 
-## Containerized Build
+#### Containerized Linux Build
+
+If you have Docker available, you can build linux binaries with `./scripts/build_linux.sh` which has the CUDA and ROCm dependencies included.  The resulting binary is placed in `./dist`
+
+
+### Windows
+
+Note: The windows build for Ollama is still under development.
+
+Install required tools:
+
+- MSVC toolchain - C/C++ and cmake as minimal requirements
+- go version 1.20 or higher
+- MinGW (pick one variant) with GCC.
+  - <https://www.mingw-w64.org/>
+  - <https://www.msys2.org/>
+
+```powershell
+$env:CGO_ENABLED="1"
+
+go generate ./...
+
+go build .
+```
+
+#### Windows CUDA (NVIDIA)
+
+In addition to the common Windows development tools described above, install:
 
-If you have Docker available, you can build linux binaries with `./scripts/build_linux.sh` which has the CUDA and ROCm dependencies included.
\ No newline at end of file
+- [NVIDIA CUDA](https://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/index.html)
Repository: ollama/ollama
Pull request: only pull gguf model if already exists


Changed files:
filename: cmd/cmd.go
patch: @@ -158,18 +158,19 @@ func RunHandler(cmd *cobra.Command, args []string) error {
 		}
 	case err != nil:
 		return err
-	}
-
-	if model.Details.Format != "gguf" {
-		// pull and retry to see if the model has been updated
-		parts := strings.Split(name, string(os.PathSeparator))
-		if len(parts) == 1 {
-			// this is a library model, log some info
-			fmt.Fprintln(os.Stderr, "This model is no longer compatible with Ollama. Pulling a new version...")
-		}
-		if err := PullHandler(cmd, []string{name}); err != nil {
-			fmt.Printf("Error: %s\n", err)
-			return fmt.Errorf("unsupported model, please update this model to gguf format") // relay the original error
+	default:
+		// the model was found, check if it is in the correct format
+		if model.Details.Format != "" && model.Details.Format != "gguf" {
+			// pull and retry to see if the model has been updated
+			parts := strings.Split(name, string(os.PathSeparator))
+			if len(parts) == 1 {
+				// this is a library model, log some info
+				fmt.Fprintln(os.Stderr, "This model is no longer compatible with Ollama. Pulling a new version...")
+			}
+			if err := PullHandler(cmd, []string{name}); err != nil {
+				fmt.Printf("Error: %s\n", err)
+				return fmt.Errorf("unsupported model, please update this model to gguf format") // relay the original error
+			}
 		}
 	}
Repository: ollama/ollama
Pull request: switch api for ShowRequest to use the name field


Changed files:
filename: cmd/cmd.go
patch: @@ -149,7 +149,7 @@ func RunHandler(cmd *cobra.Command, args []string) error {
 
 	name := args[0]
 	// check if the model exists on the server
-	model, err := client.Show(cmd.Context(), &api.ShowRequest{Model: name})
+	model, err := client.Show(cmd.Context(), &api.ShowRequest{Name: name})
 	var statusError api.StatusError
 	switch {
 	case errors.As(err, &statusError) && statusError.StatusCode == http.StatusNotFound:
@@ -335,7 +335,7 @@ func ShowHandler(cmd *cobra.Command, args []string) error {
 		return errors.New("one of '--license', '--modelfile', '--parameters', '--system', or '--template' must be specified")
 	}
 
-	req := api.ShowRequest{Model: args[0]}
+	req := api.ShowRequest{Name: args[0]}
 	resp, err := client.Show(cmd.Context(), &req)
 	if err != nil {
 		return err

filename: cmd/interactive.go
patch: @@ -34,7 +34,7 @@ func modelIsMultiModal(cmd *cobra.Command, name string) bool {
 		return false
 	}
 
-	req := api.ShowRequest{Model: name}
+	req := api.ShowRequest{Name: name}
 	resp, err := client.Show(cmd.Context(), &req)
 	if err != nil {
 		return false
@@ -293,7 +293,7 @@ func generateInteractive(cmd *cobra.Command, opts generateOptions) error {
 					return err
 				}
 				req := &api.ShowRequest{
-					Model:    opts.Model,
+					Name:     opts.Model,
 					System:   opts.System,
 					Template: opts.Template,
 					Options:  opts.Options,
Repository: nodejs/node
Pull request: src: remove declarations of removed BaseObject static fns

These were removed in 5c86f223aec, so their declarations should be removed from class declarations too.

<!--
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/base_object.h
patch: @@ -128,11 +128,6 @@ class BaseObject : public MemoryRetainer {
   // a BaseObjectPtr to this object.
   inline void Detach();
 
-  static inline v8::Local<v8::FunctionTemplate> GetConstructorTemplate(
-      Environment* env);
-  static v8::Local<v8::FunctionTemplate> GetConstructorTemplate(
-      IsolateData* isolate_data);
-
   // Interface for transferring BaseObject instances using the .postMessage()
   // method of MessagePorts (and, by extension, Workers).
   // GetTransferMode() returns a transfer mode that indicates how to deal with
Repository: denoland/deno
Pull request: fix(audit): remove unwrap in favor of log, don't print empty reports

Changes to print reports from socket.dev, only if something is found.

Changed files:
filename: cli/tools/pm/audit.rs
patch: @@ -663,10 +663,14 @@ mod socket_dev {
           None
         }
       })
-      .map(|json_response| {
-        let response: FirewallResponse =
-          serde_json::from_str(&json_response).unwrap();
-        response
+      .filter_map(|json_response| {
+        match serde_json::from_str::<FirewallResponse>(&json_response) {
+          Ok(response) => Some(response),
+          Err(err) => {
+            log::error!("Failed deserializing socket.dev response {:?}", err);
+            None
+          }
+        }
       })
       .collect::<Vec<_>>();
 
@@ -676,6 +680,15 @@ mod socket_dev {
   fn print_firewall_report(responses: &[FirewallResponse]) {
     let stdout = &mut std::io::stdout();
 
+    let responses_with_alerts = responses
+      .iter()
+      .filter(|r| !r.alerts.is_empty())
+      .collect::<Vec<_>>();
+
+    if responses_with_alerts.is_empty() {
+      return;
+    }
+
     _ = writeln!(stdout);
     _ = writeln!(stdout, "{}", colors::bold("Socket.dev firewall report"));
     _ = writeln!(stdout);
@@ -687,11 +700,7 @@ mod socket_dev {
     let mut total_low = 0;
     let mut packages_with_issues = 0;
 
-    for response in responses {
-      if response.alerts.is_empty() && response.score.is_none() {
-        continue;
-      }
-
+    for response in responses_with_alerts {
       packages_with_issues += 1;
 
       _ = writeln!(stdout, "╭ pkg:npm/{}@{}", response.name, response.version);
Repository: huggingface/transformers
Pull request: Remove use_ipex option from Trainer

# What does this PR do?

It has been deprecated.

Changed files:
filename: src/transformers/training_args.py
patch: @@ -391,9 +391,6 @@ class TrainingArguments:
             seed.
         jit_mode_eval (`bool`, *optional*, defaults to `False`):
             Whether or not to use PyTorch jit trace for inference.
-        use_ipex (`bool`, *optional*, defaults to `False`):
-            Use Intel extension for PyTorch when it is available. [IPEX
-            installation](https://github.com/intel/intel-extension-for-pytorch).
         bf16 (`bool`, *optional*, defaults to `False`):
             Whether to use bf16 16-bit (mixed) precision training instead of 32-bit training. Requires Ampere or higher
             NVIDIA architecture or Intel XPU or using CPU (use_cpu) or Ascend NPU. This is an experimental API and it may change.
@@ -1060,15 +1057,6 @@ class TrainingArguments:
     jit_mode_eval: bool = field(
         default=False, metadata={"help": "Whether or not to use PyTorch jit trace for inference"}
     )
-    use_ipex: bool = field(
-        default=False,
-        metadata={
-            "help": (
-                "Use Intel extension for PyTorch when it is available, installation:"
-                " 'https://github.com/intel/intel-extension-for-pytorch'"
-            )
-        },
-    )
     bf16: bool = field(
         default=False,
         metadata={
@@ -1622,12 +1610,6 @@ def __post_init__(self):
                 FutureWarning,
             )
             self.use_cpu = self.no_cuda
-        if self.use_ipex:
-            warnings.warn(
-                "using `use_ipex` is deprecated and will be removed in version 4.54 of 🤗 Transformers. "
-                "You only need PyTorch for the needed optimizations on Intel CPU and XPU.",
-                FutureWarning,
-            )
 
         self.eval_strategy = IntervalStrategy(self.eval_strategy)
         self.logging_strategy = IntervalStrategy(self.logging_strategy)
@@ -2236,7 +2218,7 @@ def _setup_devices(self) -> "torch.device":
         else:
             AcceleratorState._reset_state(reset_partial_state=True)
             self.distributed_state = None
-        if not self.use_ipex and "ACCELERATE_USE_IPEX" not in os.environ:
+        if "ACCELERATE_USE_IPEX" not in os.environ:
             os.environ["ACCELERATE_USE_IPEX"] = "false"
 
         self._n_gpu = 1
Repository: facebook/react
Pull request: [compiler] Fix up prettier

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

Our prettier setup is all messed up after the merge, so this PR should
fix things

Changed files:
filename: .github/workflows/compiler-typescript.yml
patch: @@ -24,6 +24,25 @@ jobs:
         run: echo "matrix=$(find packages -mindepth 1 -maxdepth 1 -type d | sed 's!packages/!!g' | tr '\n' ',' | sed s/.$// | jq -Rsc '. / "," - [""]')" >> $GITHUB_OUTPUT
 
   # Hardcoded to improve parallelism for babel-plugin-react-compiler
+  prettier:
+    name: Run prettier
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: actions/setup-node@v4
+        with:
+          node-version: 18.x
+          cache: "yarn"
+          cache-dependency-path: compiler/yarn.lock
+      - name: Restore cached node_modules
+        uses: actions/cache@v4
+        with:
+          path: "**/node_modules"
+          key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('compiler/**/yarn.lock') }}
+      - run: yarn install --frozen-lockfile
+      - run: yarn prettier:ci
+
+  # Hardcoded to improve parallelism
   lint:
     name: Lint babel-plugin-react-compiler
     runs-on: ubuntu-latest
@@ -40,10 +59,9 @@ jobs:
           path: "**/node_modules"
           key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('compiler/**/yarn.lock') }}
       - run: yarn install --frozen-lockfile
-      - run: yarn workspace babel-plugin-react-compiler prettier:ci
       - run: yarn workspace babel-plugin-react-compiler lint
 
-  # Hardcoded to improve parallelism for babel-plugin-react-compiler
+  # Hardcoded to improve parallelism
   jest:
     name: Jest babel-plugin-react-compiler
     runs-on: ubuntu-latest
Repository: ollama/ollama
Pull request: Add unit tests for Parser

This adds a couple of basic unit tests for parsing.

Suggested in #1809 

Changed files:
filename: parser/parser_test.go
patch: @@ -0,0 +1,63 @@
+package parser
+
+import (
+	"strings"
+	"testing"
+
+	"github.com/stretchr/testify/assert"
+)
+
+func Test_Parser(t *testing.T) {
+
+	input := `
+FROM model1
+ADAPTER adapter1
+LICENSE MIT
+PARAMETER param1 value1
+PARAMETER param2 value2
+TEMPLATE template1
+`
+
+	reader := strings.NewReader(input)
+
+	commands, err := Parse(reader)
+	assert.Nil(t, err)
+
+	expectedCommands := []Command{
+		{Name: "model", Args: "model1"},
+		{Name: "adapter", Args: "adapter1"},
+		{Name: "license", Args: "MIT"},
+		{Name: "param1", Args: "value1"},
+		{Name: "param2", Args: "value2"},
+		{Name: "template", Args: "template1"},
+	}
+
+	assert.Equal(t, expectedCommands, commands)
+}
+
+func Test_Parser_NoFromLine(t *testing.T) {
+
+	input := `
+PARAMETER param1 value1
+PARAMETER param2 value2
+`
+
+	reader := strings.NewReader(input)
+
+	_, err := Parse(reader)
+	assert.ErrorContains(t, err, "no FROM line")
+}
+
+func Test_Parser_MissingValue(t *testing.T) {
+
+	input := `
+FROM foo
+PARAMETER param1
+`
+
+	reader := strings.NewReader(input)
+
+	_, err := Parse(reader)
+	assert.ErrorContains(t, err, "missing value for [param1]")
+
+}
Repository: ollama/ollama
Pull request: fix: simplify ggml update logic

- allow cancelling gguf model update pull
- additional information is now available in show response, use this to pull gguf before running

Changed files:
filename: cmd/cmd.go
patch: @@ -149,17 +149,30 @@ func RunHandler(cmd *cobra.Command, args []string) error {
 
 	name := args[0]
 	// check if the model exists on the server
-	_, err = client.Show(cmd.Context(), &api.ShowRequest{Model: name})
+	model, err := client.Show(cmd.Context(), &api.ShowRequest{Model: name})
 	var statusError api.StatusError
 	switch {
 	case errors.As(err, &statusError) && statusError.StatusCode == http.StatusNotFound:
-		if err := PullHandler(cmd, args); err != nil {
+		if err := PullHandler(cmd, []string{name}); err != nil {
 			return err
 		}
 	case err != nil:
 		return err
 	}
 
+	if model.Details.Format != "gguf" {
+		// pull and retry to see if the model has been updated
+		parts := strings.Split(name, string(os.PathSeparator))
+		if len(parts) == 1 {
+			// this is a library model, log some info
+			fmt.Fprintln(os.Stderr, "This model is no longer compatible with Ollama. Pulling a new version...")
+		}
+		if err := PullHandler(cmd, []string{name}); err != nil {
+			fmt.Printf("Error: %s\n", err)
+			return fmt.Errorf("unsupported model, please update this model to gguf format") // relay the original error
+		}
+	}
+
 	return RunGenerate(cmd, args)
 }
 
@@ -569,31 +582,12 @@ func generate(cmd *cobra.Command, opts generateOptions) error {
 	}
 
 	if err := client.Generate(ctx, &request, fn); err != nil {
-		switch {
-		case errors.Is(err, context.Canceled):
+		if errors.Is(err, context.Canceled) {
 			return nil
-		case strings.Contains(err.Error(), "unsupported model format"):
-			// pull and retry to see if the model has been updated
-			parts := strings.Split(opts.Model, string(os.PathSeparator))
-			if len(parts) == 1 {
-				// this is a library model, log some info
-				fmt.Fprintln(os.Stderr, "This model is no longer compatible with Ollama. Pulling a new version...")
-			}
-			if err := PullHandler(cmd, []string{opts.Model}); err != nil {
-				fmt.Printf("Error: %s\n", err)
-				return fmt.Errorf("unsupported model, please update this model to gguf format") // relay the original error
-			}
-			// retry
-			if err := client.Generate(ctx, &request, fn); err != nil {
-				if errors.Is(err, context.Canceled) {
-					return nil
-				}
-				return err
-			}
-		default:
-			return err
 		}
+		return err
 	}
+
 	if opts.Prompt != "" {
 		fmt.Println()
 		fmt.Println()