helloadhavan/github_issues huggingface dataset:
Repository: huggingface/transformers
Pull request: DeepSpeed tensor parallel+ZeRO

move from  https://github.com/huggingface/transformers/pull/36114 , Initialization for DeepSpeed tensor parallel+ZeRO optimizer for 2d training,  cc @muellerzr

The original PR workflow seems to have encountered some issues and cannot be resolved by refreshing.









Changed files:
filename: src/transformers/integrations/deepspeed.py
patch: @@ -464,6 +464,11 @@ def deepspeed_init(trainer, num_training_steps, inference=False):
         model_parameters = None
     else:
         trainer.optimizer = None  # important for when deepspeed_init is used as re-init
+        tp_size = hf_deepspeed_config.config.get("tensor_parallel", {}).get("autotp_size", 0)
+        if tp_size > 1:
+            import deepspeed
+
+            model = deepspeed.tp_model_init(model=model, tp_size=tp_size, dtype=hf_deepspeed_config.dtype())
         model_parameters = list(filter(lambda p: p.requires_grad, model.parameters()))
         optimizer, lr_scheduler = deepspeed_optim_sched(
             trainer, hf_deepspeed_config, args, num_training_steps, model_parameters
Repository: facebook/react
Pull request: Fix link to fbjs


<!--
  Thanks for submitting a pull request!
  We appreciate you spending the time to work on these changes. Please provide enough information so that others can review your pull request. The three fields below are mandatory.

  Before submitting a pull request, please make sure the following is done:

  1. Fork [the repository](https://github.com/facebook/react) and create your branch from `main`.
  2. Run `yarn` in the repository root.
  3. If you've fixed a bug or added code that should be tested, add tests!
  4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch TestName` is helpful in development.
  5. Run `yarn test --prod` to test in the production environment. It supports the same options as `yarn test`.
  6. If you need a debugger, run `yarn debug-test --watch TestName`, open `chrome://inspect`, and press "Inspect".
  7. Format your code with [prettier](https://github.com/prettier/prettier) (`yarn prettier`).
  8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only check changed files.
  9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`).
  10. If you haven't already, complete the CLA.

  Learn more about contributing: https://reactjs.org/docs/how-to-contribute.html
-->

## Summary

<!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? -->
`fbjs` doesn't have the `main` branch and it is `master`

## Test Plan
No test is needed.
<!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes the user interface. -->


Changed files:
filename: scripts/print-warnings/print-warnings.js
patch: @@ -19,7 +19,7 @@ const parserOptions = {
   // babelParser has its own options and we can't directly
   // import/require a babel preset. It should be kept **the same** as
   // the `babel-plugin-syntax-*` ones specified in
-  // https://github.com/facebook/fbjs/blob/main/packages/babel-preset-fbjs/configure.js
+  // https://github.com/facebook/fbjs/blob/master/packages/babel-preset-fbjs/configure.js
   plugins: [
     'classProperties',
     'flow',
Repository: electron/electron
Pull request: ci: upload test artifacts

#### Description of Change

Upload test artifacts from GH runners.

Currently the only place these are used are for failed screen capture tests.

https://github.com/electron/electron/blob/778d3098a0f0bfc00015d54263674318f4adf6b1/spec/lib/screen-helpers.ts#L170-L174

I've updated this code to limit the output to 720p for cost saving purposes.

#### Checklist
<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

- [x] PR description included and stakeholders cc'd
- [ ] `npm test` passes
- [ ] tests are [changed or added](https://github.com/electron/electron/blob/main/docs/development/testing.md)
- [ ] relevant documentation, tutorials, templates and examples are changed or added
- [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: none


Changed files:
filename: .github/workflows/pipeline-segment-electron-test.yml
patch: @@ -187,10 +187,17 @@ jobs:
             runuser -u builduser -- xvfb-run script/actions/run-tests.sh script/yarn test --runners=main --trace-uncaught --enable-logging --files $tests_files
           fi
         fi
+    - name: Upload Test Artifacts
+      if: always() && !cancelled()
+      uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
+      with:
+        name: test_artifacts_${{ env.ARTIFACT_KEY }}
+        path: src/electron/spec/artifacts
+        if-no-files-found: ignore
     - name: Wait for active SSH sessions
       if: always() && !cancelled()
       run: |
         while [ -f /var/.ssh-lock ]
         do
           sleep 60
-        done
\ No newline at end of file
+        done

filename: spec/.gitignore
patch: @@ -1 +1,2 @@
-node_modules
\ No newline at end of file
+node_modules
+artifacts

filename: spec/lib/screen-helpers.ts
patch: @@ -167,11 +167,18 @@ export class ScreenCapture {
     } while (Date.now() < expiration);
 
     if (!gotExpectedResult) {
+      // Limit image to 720p to save on storage space
+      if (process.env.CI) {
+        const width = Math.floor(Math.min(frame.getSize().width, 720));
+        frame = frame.resize({ width });
+      }
+
       // Save the image as an artifact for better debugging
       const artifactName = await createArtifactWithRandomId(
         (id) => `color-mismatch-${id}.png`,
         frame.toPNG()
       );
+
       throw new AssertionError(
         `Expected color at (${point.x}, ${point.y}) to ${
           matchIsExpected ? 'match' : '*not* match'
Repository: denoland/deno
Pull request: fix(doc/publish): support expando properties

* https://github.com/denoland/deno_graph/pull/428
* https://github.com/denoland/deno_doc/pull/575

Closes https://github.com/denoland/deno/issues/23276

Changed files:
filename: Cargo.lock
patch: @@ -1377,9 +1377,9 @@ dependencies = [
 
 [[package]]
 name = "deno_doc"
-version = "0.133.0"
+version = "0.134.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2309018eabdec1f6e88b0c8c1793825bb56eae13a4942cbec8cfe7caeb2be97f"
+checksum = "65c98a53f8456aed1fe2a0ead89df31d75e41e1b50f17933aa43e6297b6e8bf6"
 dependencies = [
  "ammonia",
  "anyhow",
@@ -1402,9 +1402,9 @@ dependencies = [
 
 [[package]]
 name = "deno_emit"
-version = "0.40.2"
+version = "0.40.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "efe4e71f7c2b0ddef4a4927a193ce47824488f29c90166700605b3fe560fecb7"
+checksum = "80b80fef2bf1b6e14712633975f7f39a3b29b95a5769cafcb959ffa1a84b7680"
 dependencies = [
  "anyhow",
  "base64",
@@ -1470,9 +1470,9 @@ dependencies = [
 
 [[package]]
 name = "deno_graph"
-version = "0.74.5"
+version = "0.75.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9b7078d584a4ff53349ec8f7909826dffe2a0c2ccb61b9b6549ea38d996d5a61"
+checksum = "09ca91da7bab6d6be790d408b7c9d6b420aa4514f7ff76ad76e523fce8a2fa9e"
 dependencies = [
  "anyhow",
  "async-trait",
@@ -2504,9 +2504,9 @@ dependencies = [
 
 [[package]]
 name = "eszip"
-version = "0.68.4"
+version = "0.68.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "14cbb0e1910cd068e7c946e0d9a4d9e1859fc5596acdf99baca404e24e728136"
+checksum = "bd4261ccce6111115c5b536e7f76222a779d69a038bb4c13958575f12ffe5606"
 dependencies = [
  "anyhow",
  "base64",

filename: cli/Cargo.toml
patch: @@ -67,17 +67,17 @@ deno_ast = { workspace = true, features = ["bundler", "cjs", "codegen", "proposa
 deno_cache_dir = { workspace = true }
 deno_config = "=0.16.3"
 deno_core = { workspace = true, features = ["include_js_files_for_snapshotting"] }
-deno_doc = { version = "=0.133.0", features = ["html", "syntect"] }
-deno_emit = "=0.40.2"
-deno_graph = { version = "=0.74.5", features = ["tokio_executor"] }
+deno_doc = { version = "=0.134.0", features = ["html", "syntect"] }
+deno_emit = "=0.40.3"
+deno_graph = { version = "=0.75.1", features = ["tokio_executor"] }
 deno_lint = { version = "=0.58.4", features = ["docs"] }
 deno_lockfile.workspace = true
 deno_npm = "=0.20.1"
 deno_runtime = { workspace = true, features = ["include_js_files_for_snapshotting"] }
 deno_semver = "=0.5.4"
 deno_task_shell = "=0.16.1"
 deno_terminal.workspace = true
-eszip = "=0.68.4"
+eszip = "=0.68.5"
 napi_sym.workspace = true
 
 async-trait.workspace = true
Repository: nodejs/node
Pull request: deps: update corepack to 0.29.4

This is an automated update of corepack to 0.29.4.

Changed files:
filename: deps/corepack/CHANGELOG.md
patch: @@ -1,5 +1,12 @@
 # Changelog
 
+## [0.29.4](https://github.com/nodejs/corepack/compare/v0.29.3...v0.29.4) (2024-09-07)
+
+
+### Features
+
+* update package manager versions ([#543](https://github.com/nodejs/corepack/issues/543)) ([b819e40](https://github.com/nodejs/corepack/commit/b819e404dbb23c4ae3d5dbe55e21de74d714ee9c))
+
 ## [0.29.3](https://github.com/nodejs/corepack/compare/v0.29.2...v0.29.3) (2024-07-21)
 
 

filename: deps/corepack/dist/lib/corepack.cjs
patch: @@ -21260,7 +21260,7 @@ function String2(descriptor, ...args) {
 }
 
 // package.json
-var version = "0.29.3";
+var version = "0.29.4";
 
 // sources/Engine.ts
 var import_fs9 = __toESM(require("fs"));
@@ -21274,7 +21274,7 @@ var import_valid3 = __toESM(require_valid2());
 var config_default = {
   definitions: {
     npm: {
-      default: "10.8.2+sha1.3c123c7f14409dc0395478e7269fdbc32ae179d8",
+      default: "10.8.3+sha1.e6085b2864fcfd9b1aad7b602601b5a2fc116699",
       fetchLatestFrom: {
         type: "npm",
         package: "npm"
@@ -21311,7 +21311,7 @@ var config_default = {
       }
     },
     pnpm: {
-      default: "9.5.0+sha1.8c155dc114e1689d18937974f6571e0ceee66f1d",
+      default: "9.9.0+sha1.3edbe440f4e570aa8f049adbd06b9483d55cc2d2",
       fetchLatestFrom: {
         type: "npm",
         package: "pnpm"
@@ -21375,7 +21375,7 @@ var config_default = {
         package: "yarn"
       },
       transparent: {
-        default: "4.3.1+sha224.934d21773e22af4b69a7032a2d3b4cb38c1f7c019624777cc9916b23",
+        default: "4.4.1+sha224.fd21d9eb5fba020083811af1d4953acc21eeb9f6ff97efd1b3f9d4de",
         commands: [
           [
             "yarn",

filename: deps/corepack/package.json
patch: @@ -1,6 +1,6 @@
 {
   "name": "corepack",
-  "version": "0.29.3",
+  "version": "0.29.4",
   "homepage": "https://github.com/nodejs/corepack#readme",
   "bugs": {
     "url": "https://github.com/nodejs/corepack/issues"
Repository: facebook/react
Pull request: Fix DevTools console announcement being suppressed by Fast Refresh

We show a console message in DEV for supported browsers that encourages you to install React DevTools. This isn't new: we've been showing this message for many years.

However, we've accidentally regressed because both DevTools and Fast Refresh Runtime install a global hook. So if you don't have the browser extension but you _do_ have Fast Refresh, we mistakingly detect it as you having the browser extension, and don't show the message. This should fix it to correctly detect whether you have React DevTools again.

I used `checkDCE` because:

1. We already rely on this field in the bundles themselves, so it's not adding a new dependency, and we probably won't remove it (unlike some implementation detail like `on` or `emit`).
2. There is no reason for it to ever exist in the Fast Refresh hook shim since it's only needed for real DevTools.
3. It doesn't require updating the Fast Refresh runtime to take effect.

Changed files:
filename: packages/react-reconciler/src/ReactFiberDevToolsHook.new.js
patch: @@ -69,8 +69,13 @@ export function injectInternals(internals: Object): boolean {
       console.error('React instrumentation encountered an error: %s.', err);
     }
   }
-  // DevTools exists
-  return true;
+  if (hook.checkDCE) {
+    // This is the real DevTools.
+    return true;
+  } else {
+    // This is likely a hook installed by Fast Refresh runtime.
+    return false;
+  }
 }
 
 export function onScheduleRoot(root: FiberRoot, children: ReactNodeList) {

filename: packages/react-reconciler/src/ReactFiberDevToolsHook.old.js
patch: @@ -69,8 +69,13 @@ export function injectInternals(internals: Object): boolean {
       console.error('React instrumentation encountered an error: %s.', err);
     }
   }
-  // DevTools exists
-  return true;
+  if (hook.checkDCE) {
+    // This is the real DevTools.
+    return true;
+  } else {
+    // This is likely a hook installed by Fast Refresh runtime.
+    return false;
+  }
 }
 
 export function onScheduleRoot(root: FiberRoot, children: ReactNodeList) {
Repository: denoland/deno
Pull request: fix(cli): panic with `deno coverage`

This PR directly addresses the issue raised in #23282 where Deno panics if `deno coverage` is called with `--include` regex that returns no matches.

I've opted not to change the return value of `collect_summary` for simplicity and return an empty `HashMap` instead


Changed files:
filename: cli/tools/coverage/reporter.rs
patch: @@ -52,7 +52,12 @@ pub trait CoverageReporter {
     file_reports: &'a Vec<(CoverageReport, String)>,
   ) -> CoverageSummary {
     let urls = file_reports.iter().map(|rep| &rep.0.url).collect();
-    let root = util::find_root(urls).unwrap().to_file_path().unwrap();
+    let root = match util::find_root(urls)
+      .and_then(|root_path| root_path.to_file_path().ok())
+    {
+      Some(path) => path,
+      None => return HashMap::new(),
+    };
     // summary by file or directory
     // tuple of (line hit, line miss, branch hit, branch miss, parent)
     let mut summary = HashMap::new();

filename: tests/integration/coverage_tests.rs
patch: @@ -555,3 +555,57 @@ File         | Branch % | Line % |
 ",
   );
 }
+
+#[test]
+fn test_collect_summary_with_no_matches() {
+  let context: TestContext = TestContext::default();
+  let temp_dir: &TempDir = context.temp_dir();
+  let temp_dir_path: PathRef = PathRef::new(temp_dir.path().join("cov"));
+
+  let empty_test_dir: PathRef = temp_dir_path.join("empty_dir");
+  empty_test_dir.create_dir_all();
+
+  let output: util::TestCommandOutput = context
+    .new_command()
+    .args_vec(vec![
+      "test".to_string(),
+      "--quiet".to_string(),
+      "--allow-read".to_string(),
+      format!("--coverage={}", temp_dir_path.as_path().display()),
+      empty_test_dir.as_path().to_str().unwrap().to_string(),
+    ])
+    .run();
+
+  output.assert_exit_code(1);
+
+  let actual: &str = output.combined_output();
+  let expected_message: &str = "error: No test modules found";
+  assert_contains!(actual, expected_message);
+
+  // Check the contents of the coverage directory, ignoring 'empty_dir'
+  let mut unexpected_contents: Vec<std::path::PathBuf> = Vec::new();
+  for entry in std::fs::read_dir(temp_dir_path.as_path())
+    .unwrap()
+    .flatten()
+  {
+    if entry.file_name() != "empty_dir" {
+      // Ignore the 'empty_dir'
+      unexpected_contents.push(entry.path());
+    }
+  }
+
+  // Report unexpected contents
+  if !unexpected_contents.is_empty() {
+    eprintln!("Unexpected files or directories in the coverage directory:");
+    for path in &unexpected_contents {
+      eprintln!("{:?}", path);
+    }
+  }
+
+  // Assert that the coverage directory is otherwise empty
+  assert!(
+    unexpected_contents.is_empty(),
+    "Expected the coverage directory to be empty except for 'empty_dir', but found: {:?}",
+    unexpected_contents
+  );
+}
Repository: vercel/next.js
Pull request: Turbopack: add tracing for fetch calls

### What?

Tracing did only show CPU operations, but fetch calls e. g. for next/font where not instrumented.

This adds spans for them:

![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/4WNXXAu8pNAHiAuC2uqW/4a37ff55-bd50-44b4-a6ee-18368f68593f.png)



Closes PACK-4233

Changed files:
filename: turbopack/crates/turbo-tasks-fetch/src/lib.rs
patch: @@ -4,7 +4,7 @@
 
 use anyhow::Result;
 use turbo_rcstr::RcStr;
-use turbo_tasks::{mark_session_dependent, ResolvedVc, Vc};
+use turbo_tasks::{duration_span, mark_session_dependent, ResolvedVc, Vc};
 use turbo_tasks_fs::FileSystemPath;
 use turbopack_core::issue::{Issue, IssueSeverity, IssueStage, OptionStyledString, StyledString};
 
@@ -72,11 +72,20 @@ pub async fn fetch(
         builder = builder.header("User-Agent", user_agent.as_str());
     }
 
-    let response = builder.send().await.and_then(|r| r.error_for_status());
+    let response = {
+        let _span = duration_span!("fetch request", url = url.as_str());
+        builder.send().await
+    }
+    .and_then(|r| r.error_for_status());
     match response {
         Ok(response) => {
             let status = response.status().as_u16();
-            let body = response.bytes().await?.to_vec();
+
+            let body = {
+                let _span = duration_span!("fetch response", url = url.as_str());
+                response.bytes().await?
+            }
+            .to_vec();
 
             Ok(Vc::cell(Ok(HttpResponse {
                 status,

filename: turbopack/crates/turbopack-trace-utils/src/tracing_presets.rs
patch: @@ -4,14 +4,15 @@ pub static TRACING_OVERVIEW_TARGETS: Lazy<Vec<&str>> = Lazy::new(|| {
     vec![
         "turbo_tasks=info",
         "turbo_tasks_fs=info",
+        "turbo_tasks_fetch=info",
         "turbopack=info",
         "turbopack_binding=info",
+        "turbopack_browser=info",
         "turbopack_nodejs=info",
         "turbopack_cli=info",
         "turbopack_cli_utils=info",
         "turbopack_core=info",
         "turbopack_css=info",
-        "turbopack_browser=info",
         "turbopack_dev_server=info",
         "turbopack_ecmascript=info",
         "turbopack_ecmascript_hmr_protocol=info",
Repository: huggingface/transformers
Pull request: Fix import for torch 2.0, 2.1 - guard typehint for "device_mesh" 

# What does this PR do?

Device mesh was added since torch 2.2 and not available in earlier versions, while `transformers` support torch >= 2.0

Reported in #36754

## Who can review?

cc @Cyrilvallez 

Changed files:
filename: src/transformers/modeling_utils.py
patch: @@ -755,7 +755,7 @@ def _load_state_dict_into_meta_model(
     is_safetensors: bool = False,
     keep_in_fp32_modules: Optional[List[str]] = None,
     unexpected_keys: Optional[List[str]] = None,  # passing `unexpected` for cleanup from quantization items
-    device_mesh: Optional[torch.distributed.device_mesh.DeviceMesh] = None,
+    device_mesh: Optional["torch.distributed.device_mesh.DeviceMesh"] = None,
 ) -> Tuple[Optional[Dict], Optional[Dict]]:
     """Load parameters from `meta_state_dict` into the model. The parameters of the `meta_state_dict` are on the meta
     device in order to easily infer the shapes and dtypes that they will have. Then proper parameters are then loaded
@@ -4665,7 +4665,7 @@ def _load_pretrained_model(
         dtype: Optional[torch.dtype] = None,
         hf_quantizer: Optional[HfQuantizer] = None,
         keep_in_fp32_modules: Optional[List[str]] = None,
-        device_mesh: Optional[torch.distributed.device_mesh.DeviceMesh] = None,
+        device_mesh: Optional["torch.distributed.device_mesh.DeviceMesh"] = None,
         key_mapping: Optional[Dict[str, str]] = None,
         weights_only: bool = True,
         _fast_init: bool = True,
Repository: huggingface/transformers
Pull request: Update min safetensors bis

# What does this PR do?

ci is behaving strangely for the [PR](https://github.com/huggingface/transformers/pull/36767)  so i opened this to see if it fixes the issue. 

Changed files:
filename: setup.py
patch: @@ -164,7 +164,7 @@
     "ruff==0.5.1",
     "sacrebleu>=1.4.12,<2.0.0",
     "sacremoses",
-    "safetensors>=0.4.1",
+    "safetensors>=0.4.3",
     "sagemaker>=2.31.0",
     "schedulefree>=1.2.6",
     "scikit-learn",

filename: src/transformers/dependency_versions_table.py
patch: @@ -70,7 +70,7 @@
     "ruff": "ruff==0.5.1",
     "sacrebleu": "sacrebleu>=1.4.12,<2.0.0",
     "sacremoses": "sacremoses",
-    "safetensors": "safetensors>=0.4.1",
+    "safetensors": "safetensors>=0.4.3",
     "sagemaker": "sagemaker>=2.31.0",
     "schedulefree": "schedulefree>=1.2.6",
     "scikit-learn": "scikit-learn",
Repository: ggml-org/llama.cpp
Pull request: convert : support chat_template.json

Useful for f.ex. `mistralai/Mistral-Small-3.1-24B-Instruct-2503` that has no chat template in `tokenizer_config.json`.

Changed files:
filename: gguf-py/gguf/vocab.py
patch: @@ -154,7 +154,12 @@ def _try_load_from_tokenizer_json(self, path: Path) -> bool:
             return True
         with open(tokenizer_config_file, encoding = 'utf-8') as f:
             tokenizer_config = json.load(f)
-        chat_template = tokenizer_config.get('chat_template')
+        chat_template_alt = None
+        chat_template_file = path / 'chat_template.json'
+        if chat_template_file.is_file():
+            with open(chat_template_file, encoding = 'utf-8') as f:
+                chat_template_alt = json.load(f).get('chat_template')
+        chat_template = tokenizer_config.get('chat_template', chat_template_alt)
         if chat_template is None or isinstance(chat_template, (str, list)):
             self.chat_template = chat_template
         else:
Repository: facebook/react
Pull request: Inline discreteUpdates

This API is only used by the event system, to set the event priority for the scope of a function. We don't need it anymore because we can modify the priority directly, like we already do for continuous input events.

Changed files:
filename: packages/react-dom/src/events/ReactDOMEventListener.js
patch: @@ -31,7 +31,6 @@ import getEventTarget from './getEventTarget';
 import {getClosestInstanceFromNode} from '../client/ReactDOMComponentTree';
 
 import {dispatchEventForPluginEventSystem} from './DOMPluginEventSystem';
-import {discreteUpdates} from './ReactDOMUpdateBatching';
 
 import {
   getCurrentPriorityLevel as getCurrentSchedulerPriorityLevel,
@@ -112,13 +111,16 @@ function dispatchDiscreteEvent(
   container,
   nativeEvent,
 ) {
-  discreteUpdates(
-    dispatchEvent,
-    domEventName,
-    eventSystemFlags,
-    container,
-    nativeEvent,
-  );
+  const previousPriority = getCurrentUpdatePriority();
+  const prevTransition = ReactCurrentBatchConfig.transition;
+  ReactCurrentBatchConfig.transition = 0;
+  try {
+    setCurrentUpdatePriority(DiscreteEventPriority);
+    dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);
+  } finally {
+    setCurrentUpdatePriority(previousPriority);
+    ReactCurrentBatchConfig.transition = prevTransition;
+  }
 }
 
 function dispatchContinuousEvent(