helloadhavan/github_issues huggingface dataset:
Repository: ollama/ollama
Pull request: fix build


Changed files:
filename: cmd/cmd.go
patch: @@ -14,7 +14,6 @@ import (
 	"net/http"
 	"os"
 	"os/exec"
-	"path"
 	"path/filepath"
 	"runtime"
 	"strings"

filename: server/images.go
patch: @@ -14,7 +14,6 @@ import (
 	"net/http"
 	"net/url"
 	"os"
-	"path"
 	"path/filepath"
 	"reflect"
 	"runtime"
Repository: denoland/deno
Pull request: fix(check): don't ignore ambient declarations for existent files

Fixes #30560. Reverts part of #23392.

Changed files:
filename: cli/tsc/mod.rs
patch: @@ -738,23 +738,7 @@ fn op_load_inner(
     } else {
       &specifier
     };
-    let maybe_module = match graph.try_get(specifier) {
-      Ok(maybe_module) => maybe_module,
-      Err(err) => match err.as_kind() {
-        deno_graph::ModuleErrorKind::UnsupportedMediaType {
-          media_type,
-          ..
-        } => {
-          return Ok(Some(LoadResponse {
-            data: FastString::from_static(""),
-            version: Some("1".to_string()),
-            script_kind: as_ts_script_kind(*media_type),
-            is_cjs: false,
-          }));
-        }
-        _ => None,
-      },
-    };
+    let maybe_module = graph.try_get(specifier).ok().flatten();
     let maybe_source = if let Some(module) = maybe_module {
       match module {
         Module::Js(module) => {

filename: tests/specs/check/ambient_modules/styles.module.css
patch: @@ -0,0 +1,3 @@
+.root {
+  color: red;
+}

filename: tests/specs/check/css_import/__test__.jsonc
patch: @@ -16,8 +16,7 @@
     "exitCode": 1
   }, {
     "args": "check exists_and_try_uses.ts",
-    "output": "exists_and_try_uses.out",
-    "exitCode": 1
+    "output": "exists_and_try_uses.out"
   }, {
     "args": "check exists_dynamic_import.ts",
     "output": "Check file:///[WILDCARD]exists_dynamic_import.ts\n"

filename: tests/specs/check/css_import/exists_and_try_uses.out
patch: @@ -1,7 +1 @@
 Check file:///[WILDLINE]/exists_and_try_uses.ts
-TS1192 [ERROR]: Module '"file:///[WILDLINE]/app.css"' has no default export.
-import test from "./app.css";
-       ~~~~
-    at file:///[WILDLINE]/exists_and_try_uses.ts:1:8
-
-error: Type checking failed.
Repository: ollama/ollama
Pull request: fix path for windows


Changed files:
filename: cmd/cmd.go
patch: @@ -722,7 +722,7 @@ func initializeKeypair() error {
 			return err
 		}
 
-		err = os.MkdirAll(path.Dir(privKeyPath), 0o700)
+		err = os.MkdirAll(filepath.Dir(privKeyPath), 0o755)
 		if err != nil {
 			return fmt.Errorf("could not create directory %w", err)
 		}

filename: server/auth.go
patch: @@ -14,7 +14,7 @@ import (
 	"net/http"
 	"net/url"
 	"os"
-	"path"
+	"path/filepath"
 	"strconv"
 	"strings"
 	"time"
@@ -82,7 +82,7 @@ func getAuthToken(ctx context.Context, redirData AuthRedirect) (string, error) {
 		return "", err
 	}
 
-	keyPath := path.Join(home, ".ollama", "id_ed25519")
+	keyPath := filepath.Join(home, ".ollama", "id_ed25519")
 
 	rawKey, err := os.ReadFile(keyPath)
 	if err != nil {

filename: server/download.go
patch: @@ -8,7 +8,7 @@ import (
 	"log"
 	"net/http"
 	"os"
-	"path"
+	"path/filepath"
 	"strconv"
 	"sync"
 	"time"
@@ -173,7 +173,7 @@ func doDownload(ctx context.Context, opts downloadOpts, f *FileDownload) error {
 		return fmt.Errorf("%w: on download registry responded with code %d: %v", errDownload, resp.StatusCode, string(body))
 	}
 
-	err = os.MkdirAll(path.Dir(f.FilePath), 0o700)
+	err = os.MkdirAll(filepath.Dir(f.FilePath), 0o700)
 	if err != nil {
 		return fmt.Errorf("make blobs directory: %w", err)
 	}

filename: server/images.go
patch: @@ -1161,8 +1161,8 @@ func PushModel(ctx context.Context, name string, regOpts *RegistryOptions, fn fu
 			return err
 		}
 
-		if strings.HasPrefix(path.Base(location.Path), "sha256:") {
-			layer.Digest = path.Base(location.Path)
+		if strings.HasPrefix(filepath.Base(location.Path), "sha256:") {
+			layer.Digest = filepath.Base(location.Path)
 			fn(api.ProgressResponse{
 				Status:    "using existing layer",
 				Digest:    layer.Digest,
Repository: facebook/react
Pull request: Dymanic favorSafetyOverHydrationPerf

For rollout

Changed files:
filename: packages/shared/forks/ReactFeatureFlags.www-dynamic.js
patch: @@ -32,6 +32,7 @@ export const useModernStrictMode = __VARIANT__;
 export const enableRefAsProp = __VARIANT__;
 export const enableNewBooleanProps = __VARIANT__;
 export const enableRetryLaneExpiration = __VARIANT__;
+export const favorSafetyOverHydrationPerf = __VARIANT__;
 export const retryLaneExpirationMs = 5000;
 export const syncLaneExpirationMs = 250;
 export const transitionLaneExpirationMs = 5000;

filename: packages/shared/forks/ReactFeatureFlags.www.js
patch: @@ -39,6 +39,7 @@ export const {
   useModernStrictMode,
   enableRefAsProp,
   enableNewBooleanProps,
+  favorSafetyOverHydrationPerf,
 } = dynamicFeatureFlags;
 
 // On WWW, __EXPERIMENTAL__ is used for a new modern build.
@@ -60,8 +61,6 @@ export const enableUseEffectEventHook = true;
 export const enableFilterEmptyStringAttributesDOM = true;
 export const enableAsyncActions = true;
 
-export const favorSafetyOverHydrationPerf = false;
-
 // Logs additional User Timing API marks for use with an experimental profiling tool.
 export const enableSchedulingProfiler: boolean =
   __PROFILE__ && dynamicFeatureFlags.enableSchedulingProfiler;
Repository: vercel/next.js
Pull request: `create-next-app`: use Turbopack for both dev and build

Previously, we asked users if they want to use Turbopack for `next dev`. Now, we ask if they want to use Turbopack, and if they do, we use it for both dev and build. It’s also listed as `(recommended)` like App Router.

Test Plan: `pnpm build`, `./node_modules/.bin/create-next-app ~/path/to/app`. Choose the Turbopack option. Verify the app uses Turbopack for both dev and build.


Closes PACK-5278

Changed files:
filename: docs/01-app/01-getting-started/01-installation.mdx
patch: @@ -29,7 +29,7 @@ Would you like to use ESLint? No / Yes
 Would you like to use Tailwind CSS? No / Yes
 Would you like your code inside a `src/` directory? No / Yes
 Would you like to use App Router? (recommended) No / Yes
-Would you like to use Turbopack for `next dev`?  No / Yes
+Would you like to use Turbopack? (recommended) No / Yes
 Would you like to customize the import alias (`@/*` by default)? No / Yes
 What import alias would you like configured? @/*
 ```

filename: docs/01-app/03-api-reference/06-cli/create-next-app.mdx
patch: @@ -62,7 +62,7 @@ Would you like to use ESLint?  No / Yes
 Would you like to use Tailwind CSS?  No / Yes
 Would you like your code inside a `src/` directory?  No / Yes
 Would you like to use App Router? (recommended)  No / Yes
-Would you like to use Turbopack for `next dev`?  No / Yes
+Would you like to use Turbopack? (recommended)  No / Yes
 Would you like to customize the import alias (`@/*` by default)?  No / Yes
 ```
 

filename: packages/create-next-app/index.ts
patch: @@ -362,7 +362,7 @@ async function run(): Promise<void> {
           onState: onPromptState,
           type: 'toggle',
           name: 'turbopack',
-          message: `Would you like to use ${styledTurbo} for \`next dev\`?`,
+          message: `Would you like to use ${styledTurbo}? (recommended)`,
           initial: getPrefOrDefault('turbopack'),
           active: 'Yes',
           inactive: 'No',

filename: packages/create-next-app/templates/index.ts
patch: @@ -189,7 +189,7 @@ export const installTemplate = async ({
     private: true,
     scripts: {
       dev: `next dev${turbopack ? " --turbopack" : ""}`,
-      build: "next build",
+      build: `next build${turbopack ? " --turbopack" : ""}`,
       start: "next start",
       lint: "next lint",
     },
Repository: facebook/react
Pull request: Deprecate `act` from `react-dom/test-utils` in favor of act from `react`

Stacked on https://github.com/facebook/react/pull/28541/

## Summary

Use `React.act` instead:
```diff
-import {act} from 'react-dom/test-utils'
+import {act} from 'react'
```

## How did you test this change?

- using `React.act` now instead of `ReactDOMTestUtils` when testing the public `act`
- added test for the new warning


Changed files:
filename: packages/react-dom/src/__tests__/ReactTestUtils-test.js
patch: @@ -632,4 +632,18 @@ describe('ReactTestUtils', () => {
         'See https://react.dev/warnings/react-dom-test-utils for more info.',
     );
   });
+
+  // @gate __DEV__
+  it('warns when using `act`', () => {
+    expect(() => {
+      ReactTestUtils.act(() => {});
+    }).toErrorDev(
+      [
+        '`ReactDOMTestUtils.act` is deprecated in favor of `React.act`. ' +
+          'Import `act` from `react` instead of `react-dom/test-utils`. ' +
+          'See https://react.dev/warnings/react-dom-test-utils for more info.',
+      ],
+      {withoutStack: true},
+    );
+  });
 });

filename: packages/react-dom/src/__tests__/ReactTestUtilsAct-test.js
patch: @@ -9,7 +9,6 @@
 
 let React;
 let ReactDOMClient;
-let ReactTestUtils;
 let Scheduler;
 let act;
 let container;
@@ -27,7 +26,7 @@ function sleep(period) {
   });
 }
 
-describe('ReactTestUtils.act()', () => {
+describe('React.act()', () => {
   afterEach(() => {
     jest.restoreAllMocks();
   });
@@ -84,9 +83,8 @@ function runActTests(render, unmount, rerender) {
       jest.resetModules();
       React = require('react');
       ReactDOMClient = require('react-dom/client');
-      ReactTestUtils = require('react-dom/test-utils');
       Scheduler = require('scheduler');
-      act = ReactTestUtils.act;
+      act = React.act;
 
       const InternalTestUtils = require('internal-test-utils');
       assertLog = InternalTestUtils.assertLog;

filename: packages/react-dom/src/test-utils/ReactTestUtils.js
patch: @@ -35,9 +35,18 @@ const getFiberCurrentPropsFromNode = EventInternals[2];
 const enqueueStateRestore = EventInternals[3];
 const restoreStateIfNeeded = EventInternals[4];
 
-// TODO: Add a warning if this API is accessed with advice to switch to
-// importing directly from the React package instead.
-const act = React.act;
+let didWarnAboutUsingAct = false;
+function act(callback) {
+  if (didWarnAboutUsingAct === false) {
+    didWarnAboutUsingAct = true;
+    console.error(
+      '`ReactDOMTestUtils.act` is deprecated in favor of `React.act`. ' +
+        'Import `act` from `react` instead of `react-dom/test-utils`. ' +
+        'See https://react.dev/warnings/react-dom-test-utils for more info.',
+    );
+  }
+  return React.act(callback);
+}
 
 function Event(suffix) {}
Repository: ollama/ollama
Pull request: only add a layer if there is actual data

This is a simple change which checks the layer size before adding it to the overall model. Registry balks if you try to send it an empty layer on an `ollama push`.


Changed files:
filename: server/images.go
patch: @@ -391,7 +391,7 @@ func CreateModel(ctx context.Context, name string, path string, fn func(resp api
 					return err
 				}
 
-				// copie the model metadata
+				// copy the model metadata
 				config.ModelFamily = source.ModelFamily
 				config.ModelType = source.ModelType
 				config.ModelFormat = source.ModelFormat
@@ -461,8 +461,10 @@ func CreateModel(ctx context.Context, name string, path string, fn func(resp api
 				return err
 			}
 
-			layer.MediaType = mediaType
-			layers = append(layers, layer)
+			if layer.Size > 0 {
+				layer.MediaType = mediaType
+				layers = append(layers, layer)
+			}
 		case "template", "system", "prompt":
 			fn(api.ProgressResponse{Status: fmt.Sprintf("creating model %s layer", c.Name)})
 			// remove the layer if one exists
@@ -474,8 +476,10 @@ func CreateModel(ctx context.Context, name string, path string, fn func(resp api
 				return err
 			}
 
-			layer.MediaType = mediaType
-			layers = append(layers, layer)
+			if layer.Size > 0 {
+				layer.MediaType = mediaType
+				layers = append(layers, layer)
+			}
 		default:
 			// runtime parameters, build a list of args for each parameter to allow multiple values to be specified (ex: multiple stop sequences)
 			params[c.Name] = append(params[c.Name], c.Args)
Repository: electron/electron
Pull request: fix: ensure maximize is emitted when reduce motion is enabled on macOS

Backport of #46459

See that PR for details.


Notes: no-notes

Changed files:
filename: shell/browser/ui/cocoa/electron_ns_window_delegate.mm
patch: @@ -221,6 +221,12 @@ - (void)windowDidResize:(NSNotification*)notification {
   [super windowDidResize:notification];
   shell_->NotifyWindowResize();
   shell_->RedrawTrafficLights();
+  // When reduce motion is enabled windowDidResize is only called once after
+  // a resize and windowDidEndLiveResize is not called. So we need to call
+  // handleZoomEnd here as well.
+  if (NSWorkspace.sharedWorkspace.accessibilityDisplayShouldReduceMotion) {
+    [self handleZoomEnd];
+  }
 }
 
 - (void)windowWillMove:(NSNotification*)notification {
@@ -276,9 +282,7 @@ - (BOOL)windowShouldZoom:(NSWindow*)window toFrame:(NSRect)newFrame {
   return YES;
 }
 
-- (void)windowDidEndLiveResize:(NSNotification*)notification {
-  resizingHorizontally_.reset();
-  shell_->NotifyWindowResized();
+- (void)handleZoomEnd {
   if (is_zooming_) {
     if (shell_->IsMaximized())
       shell_->NotifyWindowMaximize();
@@ -288,6 +292,12 @@ - (void)windowDidEndLiveResize:(NSNotification*)notification {
   }
 }
 
+- (void)windowDidEndLiveResize:(NSNotification*)notification {
+  resizingHorizontally_.reset();
+  shell_->NotifyWindowResized();
+  [self handleZoomEnd];
+}
+
 - (void)windowWillEnterFullScreen:(NSNotification*)notification {
   // Store resizable mask so it can be restored after exiting fullscreen.
   is_resizable_ = shell_->HasStyleMask(NSWindowStyleMaskResizable);
Repository: ggml-org/llama.cpp
Pull request: tests : fix test-thread-safety when compiling with multiple backends

test-thread-safety fails with multiple backends that see the same device (eg. CUDA + Vulkan)
```
llama_model_load_from_file_impl: skipping device Vulkan0 (NVIDIA GeForce RTX 4070) with id 0000:2b:00.0 - already using device CUDA0 (NVIDIA GeForce RTX 4070) with the same id
llama_model_load_from_file_impl: invalid value for main_gpu: 1 (available devices: 1)
main: failed to load model 'C:\Users\aclys\AppData\Local\llama.cpp\ggml-org_models_tinyllamas_stories15M-q4_0.gguf'
```
This aligns the test's device enumeration with the one in `llama_model_load_from_file` to count only unique devices

Changed files:
filename: tests/test-thread-safety.cpp
patch: @@ -3,6 +3,7 @@
 // - Creates n_parallel (--parallel) contexts per model
 // - Runs inference in parallel on each context
 
+#include <array>
 #include <thread>
 #include <vector>
 #include <atomic>
@@ -38,13 +39,14 @@ int main(int argc, char ** argv) {
     cparams.n_seq_max = 1;
 
     int dev_count = ggml_backend_dev_count();
-    int gpu_dev_count = 0;
+    std::vector<std::array<ggml_backend_dev_t, 2>> gpus;
     for (int i = 0; i < dev_count; ++i) {
         auto * dev = ggml_backend_dev_get(i);
         if (dev && ggml_backend_dev_type(dev) == GGML_BACKEND_DEVICE_TYPE_GPU) {
-            gpu_dev_count++;
+            gpus.push_back({dev, nullptr});
         }
     }
+    const int gpu_dev_count = (int)gpus.size();
     const int num_models = gpu_dev_count + 1 + 1; // GPUs + 1 CPU model + 1 layer split
     //const int num_models = std::max(1, gpu_dev_count);
     const int num_contexts = std::max(1, params.n_parallel);
@@ -58,12 +60,12 @@ int main(int argc, char ** argv) {
 
         if (m < gpu_dev_count) {
             mparams.split_mode = LLAMA_SPLIT_MODE_NONE;
-            mparams.main_gpu = m;
+            mparams.devices = gpus[m].data();
         } else if (m == gpu_dev_count) {
             mparams.split_mode = LLAMA_SPLIT_MODE_NONE;
             mparams.main_gpu = -1; // CPU model
         } else {
-            mparams.split_mode = LLAMA_SPLIT_MODE_LAYER;;
+            mparams.split_mode = LLAMA_SPLIT_MODE_LAYER;
         }
 
         llama_model * model = llama_model_load_from_file(params.model.path.c_str(), mparams);
Repository: facebook/react
Pull request: Remove orphaned disableJavaScriptURLs reference

Was removed in https://github.com/facebook/react/pull/28615 but didn't land cleanly.

Fixes `yarn flow dom-node` on `main`:https://app.circleci.com/jobs/github/facebook/react/813807



Changed files:
filename: packages/shared/forks/ReactFeatureFlags.native-oss.js
patch: @@ -52,7 +52,6 @@ export const enableCacheElement = __NEXT_RN_MAJOR__;
 export const enableTaint = __NEXT_RN_MAJOR__;
 export const enableUnifiedSyncLane = __NEXT_RN_MAJOR__;
 export const enableFizzExternalRuntime = __NEXT_RN_MAJOR__; // DOM-only
-export const disableJavaScriptURLs = __NEXT_RN_MAJOR__; // DOM-only
 export const enableBinaryFlight = __NEXT_RN_MAJOR__; // DOM-only
 export const enableCustomElementPropertySupport = __NEXT_RN_MAJOR__; // DOM-only
 export const enableServerComponentKeys = __NEXT_RN_MAJOR__;
Repository: ggml-org/llama.cpp
Pull request: CUDA: fix bug in topk-moe softmax

Fix #16709 

Changed files:
filename: ggml/src/ggml-cuda/topk-moe.cu
patch: @@ -141,7 +141,7 @@ __launch_bounds__(4 * WARP_SIZE, 1) __global__ void topk_moe_cuda(const float *
         wt_sum              = warp_reduce_sum(wt_sum);
         const float inv_sum = 1.0f / wt_sum;
 
-        for (int i = threadIdx.x; i < n_expert_used; i += WARP_SIZE) {
+        for (int i = 0; i < experts_per_thread; i++) {
             output_weights[i] *= inv_sum;
         }
     }
Repository: facebook/react
Pull request: Remove react-test-renderer/shallow export

Based on
- https://github.com/facebook/react/pull/28419

## Summary

The shallow renderer was extracted from the repo years ago and published by enzyme: https://github.com/enzymejs/react-shallow-renderer

We no longer need to reexport under the react-test-renderer namespace. People can import `react-shallow-renderer` as needed

## How did you test this change?

- Observe shallow.js in react-test-renderer package from standard build
- Run build with changes on this branch
- Observe no more shallow.js export in build output


Changed files:
filename: packages/react-test-renderer/__tests__/shallow-test.js
patch: @@ -0,0 +1,22 @@
+/**
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ * @emails react-core
+ */
+
+'use strict';
+
+describe('shallow', () => {
+  it('throws an error on init', () => {
+    const ReactShallowRenderer = require('../shallow.js').default;
+    expect(() => {
+      // eslint-disable-next-line no-new
+      new ReactShallowRenderer();
+    }).toThrow(
+      'react-test-renderer/shallow has been removed. See https://react.dev/warnings/react-test-renderer.'
+    );
+  });
+});

filename: packages/react-test-renderer/npm/shallow.js
patch: @@ -1,3 +1,9 @@
 'use strict';
 
-module.exports = require('react-shallow-renderer');
+function ReactShallowRenderer() {
+  throw new Error(
+    'react-test-renderer/shallow has been removed. See https://react.dev/warnings/react-test-renderer.'
+  );
+}
+
+module.exports = ReactShallowRenderer;

filename: packages/react-test-renderer/package.json
patch: @@ -20,7 +20,6 @@
   "homepage": "https://react.dev/",
   "dependencies": {
     "react-is": "^18.2.0",
-    "react-shallow-renderer": "^16.15.0",
     "scheduler": "^0.23.0"
   },
   "peerDependencies": {

filename: packages/react-test-renderer/shallow.js
patch: @@ -7,4 +7,5 @@
  * @flow
  */
 
-export {default} from 'react-shallow-renderer';
+import ReactShallowRenderer from './npm/shallow.js';
+export default ReactShallowRenderer;

filename: yarn.lock
patch: @@ -13017,14 +13017,6 @@ react-native-web@0.0.0-26873b469:
     prop-types "^15.6.0"
     react-timer-mixin "^0.13.4"
 
-react-shallow-renderer@^16.15.0:
-  version "16.15.0"
-  resolved "https://registry.yarnpkg.com/react-shallow-renderer/-/react-shallow-renderer-16.15.0.tgz#48fb2cf9b23d23cde96708fe5273a7d3446f4457"
-  integrity sha512-oScf2FqQ9LFVQgA73vr86xl2NaOIX73rh+YFqcOp68CWj56tSfgtGKrEbyhCj0rSijyG9M1CYprTh39fBi5hzA==
-  dependencies:
-    object-assign "^4.1.1"
-    react-is "^16.12.0 || ^17.0.0 || ^18.0.0"
-
 react-timer-mixin@^0.13.4:
   version "0.13.4"
   resolved "https://registry.yarnpkg.com/react-timer-mixin/-/react-timer-mixin-0.13.4.tgz#75a00c3c94c13abe29b43d63b4c65a88fc8264d3"
Repository: huggingface/transformers
Pull request: Allow to be able to run `torch.compile` tests with `fullgraph=True`

# What does this PR do?

This is what I have in mind. Happy to hear some suggestion if any.

(I will have a few methods to patch in my todo list)

Changed files:
filename: conftest.py
patch: @@ -23,7 +23,7 @@
 import _pytest
 import pytest
 
-from transformers.testing_utils import HfDoctestModule, HfDocTestParser, is_torch_available
+from transformers.testing_utils import HfDoctestModule, HfDocTestParser, is_torch_available, patch_torch_compile_force_graph
 
 
 NOT_DEVICE_TESTS = {
@@ -136,3 +136,7 @@ def check_output(self, want, got, optionflags):
     # The flag below controls whether to allow TF32 on cuDNN. This flag defaults to True.
     # We set it to `False` for CI. See https://github.com/pytorch/pytorch/issues/157274#issuecomment-3090791615
     torch.backends.cudnn.allow_tf32 = False
+
+    # patch `torch.compile`: if `TORCH_COMPILE_FORCE_FULLGRAPH=1` (or values considered as true, e.g. yes, y, etc.),
+    # the patched version will always run with `fullgraph=True`.
+    patch_torch_compile_force_graph()

filename: src/transformers/testing_utils.py
patch: @@ -3473,6 +3473,32 @@ def __repr__(self):
         return f"{self.data}"
 
 
+def patch_torch_compile_force_graph():
+    """
+    Patch `torch.compile` to always use `fullgraph=True`.
+
+    This is useful when some `torch.compile` tests are running with `fullgraph=False` and we want to be able to run
+    them with `fullgraph=True` in some occasion (without introducing new tests) to make sure there is no graph break.
+
+    After PR #40137, `CompileConfig.fullgraph` is `False` by default, this patch is necessary.
+    """
+
+    force_fullgraph = os.environ.get("TORCH_COMPILE_FORCE_FULLGRAPH", "")
+    force_fullgraph = force_fullgraph.lower() in ("yes", "true", "on", "t", "y", "1")
+
+    if force_fullgraph:
+        import torch
+
+        orig_method = torch.compile
+
+        def patched(*args, **kwargs):
+            # In `torch_compile`, all arguments except `model` is keyword only argument.
+            kwargs["fullgraph"] = True
+            return orig_method(*args, **kwargs)
+
+        torch.compile = patched
+
+
 def torchrun(script: str, nproc_per_node: int, is_torchrun: bool = True, env: Optional[dict] = None):
     """Run the `script` using `torchrun` command for multi-processing in a subprocess. Captures errors as necessary."""
     with tempfile.NamedTemporaryFile(mode="w+", suffix=".py") as tmp: