helloadhavan/github_issues huggingface dataset:
Repository: vercel/next.js
Pull request: Update Rspack production test manifest

This auto-generated PR updates the production integration test manifest used when testing Rspack.

Changed files:
filename: test/rspack-build-tests-manifest.json
patch: @@ -3311,6 +3311,7 @@
       "app dir - metadata dynamic routes should pick configured metadataBase instead of deployment url for canonical url",
       "app dir - metadata dynamic routes should support edge runtime of image routes",
       "app dir - metadata dynamic routes should use localhost for local prod and fallback to deployment url when metadataBase is falsy",
+      "app dir - metadata dynamic routes sitemap should 404 for non-existing id from generateImageMetadata",
       "app dir - metadata dynamic routes sitemap should generate static paths of dynamic sitemap in production",
       "app dir - metadata dynamic routes sitemap should handle sitemap.[ext] dynamic routes",
       "app dir - metadata dynamic routes sitemap should not throw if client components are imported but not used in sitemap",
@@ -6479,7 +6480,8 @@
   },
   "test/e2e/app-dir/sitemap-group/sitemap-group.test.ts": {
     "passed": [
-      "sitemap-group should not add suffix to sitemap under group routes"
+      "sitemap-group should not add suffix to sitemap under group routes",
+      "sitemap-group should not add suffix to static sitemap.xml under group routes"
     ],
     "failed": [],
     "pending": [],
@@ -19931,6 +19933,13 @@
     "flakey": [],
     "runtimeError": false
   },
+  "test/production/app-dir/tsconfig-no-relative-resolve/tsconfig-no-relative-resolve.test.ts": {
+    "passed": ["tsconfig-no-relative-resolve should fail to build"],
+    "failed": [],
+    "pending": [],
+    "flakey": [],
+    "runtimeError": false
+  },
   "test/production/app-dir/typed-routes-with-webpack-worker/typed-routes-with-webpack-worker.test.ts": {
     "passed": [
       "app dir - typed-routes-with-webpack-worker builds successfully without errors",
Repository: ggml-org/llama.cpp
Pull request: Avoid logging to stdout for model loading messages in mtmd-cli

This change helps with using llama-mtmd-cli so that by default only the model output is redirected to stdout which increases the usefulness of its as a standalone tool

*Make sure to read the [contributing guidelines](https://github.com/ggml-org/llama.cpp/blob/master/CONTRIBUTING.md) before submitting a PR*


Changed files:
filename: tools/mtmd/mtmd-cli.cpp
patch: @@ -285,7 +285,7 @@ int main(int argc, char ** argv) {
     }
 
     mtmd_cli_context ctx(params);
-    LOG("%s: loading model: %s\n", __func__, params.model.path.c_str());
+    LOG_INF("%s: loading model: %s\n", __func__, params.model.path.c_str());
 
     bool is_single_turn = !params.prompt.empty() && !params.image.empty();
Repository: huggingface/transformers
Pull request: feat: err when unsupported attn impl is set w/ `--continuous_batching`

In #40479, we introduced a new `--continuous_batching` flag. Here we add a check to make sure the `--attn_implementation` is compatible with CB and error when not.

Changed files:
filename: src/transformers/commands/serving.py
patch: @@ -483,6 +483,19 @@ def __init__(self, args: ServeArguments):
         # Store and process input arguments
         self.args = args
         self.use_continuous_batching = self.args.continuous_batching
+        if self.use_continuous_batching:
+            default_attn_impl = ContinuousBatchingManager.default_attention_implementation()
+            # checking if attn_implementation is supported by continuous batching
+            if self.args.attn_implementation is None:
+                self.args.attn_implementation = default_attn_impl  # default to sdpa_paged
+                logger.info(f"No attn_implementation passed, defaulting to {default_attn_impl}")
+            supported_attn_impl = ContinuousBatchingManager.supported_attention_implementations()
+            if self.args.attn_implementation not in supported_attn_impl:
+                raise ValueError(
+                    f"Continuous batching only supports {supported_attn_impl} as attn_implementation, got "
+                    f"{self.args.attn_implementation}"
+                    f"Try setting `--attn_implementation={default_attn_impl}`"
+                )
         self.enable_cors = self.args.enable_cors
 
         if self.args.default_seed is not None:

filename: src/transformers/generation/continuous_batching/continuous_api.py
patch: @@ -595,6 +595,14 @@ def request_id_iter(self, request_id):
             if self.batch_processor is not None:
                 request_cancelled = self.batch_processor.scheduler.request_is_cancelled(request_id)
 
+    @staticmethod
+    def supported_attention_implementations() -> set[str]:
+        return {"eager_paged", "sdpa_paged", "flash_attention_2"}
+
+    @staticmethod
+    def default_attention_implementation() -> str:
+        return "sdpa_paged"
+
     @traced
     def warmup(self, batch_processor):
         stream = torch.cuda.Stream(device=self.model.device)
Repository: electron/electron
Pull request: fix: `backgroundMaterial` on initial activate (36-x-y)

Manual backport of #46657 to 36-x-y. See that PR for details.

Notes: Fixed an issue where the backgroundMaterial feature did not work in a frameless window on initial window creation.

Changed files:
filename: patches/chromium/fix_activate_background_material_on_windows.patch
patch: @@ -14,7 +14,7 @@ This patch likely can't be upstreamed as-is, as Chromium doesn't have
 this use case in mind currently.
 
 diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
-index ecab7d7f95998a055f01d7b5180a8fb80eddb32c..96cf055f1144887c0b4b4aef83898508016b310f 100644
+index ecab7d7f95998a055f01d7b5180a8fb80eddb32c..5c74a092920cdb3b7e98d218c75874cac2d0542f 100644
 --- a/ui/views/win/hwnd_message_handler.cc
 +++ b/ui/views/win/hwnd_message_handler.cc
 @@ -954,13 +954,13 @@ void HWNDMessageHandler::FrameTypeChanged() {
@@ -33,6 +33,15 @@ index ecab7d7f95998a055f01d7b5180a8fb80eddb32c..96cf055f1144887c0b4b4aef83898508
  }
  
  void HWNDMessageHandler::SetWindowIcons(const gfx::ImageSkia& window_icon,
+@@ -1757,7 +1757,7 @@ void HWNDMessageHandler::OnActivateApp(BOOL active, DWORD thread_id) {
+   if (delegate_->HasNonClientView() && !active &&
+       thread_id != GetCurrentThreadId()) {
+     // Update the native frame if it is rendering the non-client area.
+-    if (HasSystemFrame()) {
++    if (is_translucent_ || HasSystemFrame()) {
+       DefWindowProcWithRedrawLock(WM_NCACTIVATE, FALSE, 0);
+     }
+   }
 @@ -2365,17 +2365,18 @@ LRESULT HWNDMessageHandler::OnNCActivate(UINT message,
      delegate_->SchedulePaint();
    }
Repository: ollama/ollama
Pull request: update where are models stored q


Changed files:
filename: docs/faq.md
patch: @@ -62,8 +62,6 @@ Refer to the section above for how to use environment variables on your platform
 - macOS: `~/.ollama/models`.
 - Linux: `/usr/share/ollama/.ollama/models`
 
-See [the CLI Documentation](./cli.md) for more on this.
-
 ## How do I set them to a different location?
 
 If a different directory needs to be used, set the environment variable `OLLAMA_MODELS` to the chosen directory. Refer to the section above for how to use environment variables on your platform.
Repository: denoland/deno
Pull request: fix(schema): add bundle to unstable field schema

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

Changed files:
filename: cli/schemas/config-file.v1.json
patch: @@ -900,6 +900,7 @@
         "type": "string",
         "examples": [
           "bare-node-builtins",
+          "bundle",
           "byonm",
           "cron",
           "detect-cjs",
Repository: facebook/react
Pull request: React DOM: Treat toggle and beforetoggle as discrete events

## Summary

Follow-up to https://github.com/facebook/react/pull/27981#discussion_r1493808116

`toggle` (and therefore `beforetoggle`) is an intentional event that is discrete (either we toggled something or we didn't). This PR adjusts the event priority accordingly. 

`toggle` was only supported on `<details>` and used to use continuous event priority. `beforetoggle` and the generic `toggle` event were only recently introduced.

## How did you test this change?

I don't think we have tests for event priority?

Changed files:
filename: packages/react-dom-bindings/src/events/ReactDOMEventListener.js
patch: @@ -290,6 +290,7 @@ export function findInstanceBlockingTarget(
 export function getEventPriority(domEventName: DOMEventName): EventPriority {
   switch (domEventName) {
     // Used by SimpleEventPlugin:
+    case 'beforetoggle':
     case 'cancel':
     case 'click':
     case 'close':
@@ -321,6 +322,7 @@ export function getEventPriority(domEventName: DOMEventName): EventPriority {
     case 'resize':
     case 'seeked':
     case 'submit':
+    case 'toggle':
     case 'touchcancel':
     case 'touchend':
     case 'touchstart':
@@ -345,7 +347,6 @@ export function getEventPriority(domEventName: DOMEventName): EventPriority {
     case 'select':
     case 'selectstart':
       return DiscreteEventPriority;
-    case 'beforetoggle':
     case 'drag':
     case 'dragenter':
     case 'dragexit':
@@ -358,7 +359,6 @@ export function getEventPriority(domEventName: DOMEventName): EventPriority {
     case 'pointerout':
     case 'pointerover':
     case 'scroll':
-    case 'toggle':
     case 'touchmove':
     case 'wheel':
     // Not used by React but could be by user code: (fall through)
Repository: huggingface/transformers
Pull request: Set accepts_loss_kwargs to False for ConvNext(|V2)ForImageClassification

The forward methods of these classes accept `kwargs`, which leads `Trainer`'s `compute_loss()` to incorrectly assume that they can handle `num_items_per_batch`, leading to training failure.  This sets `accepts_loss_kwargs` to false explicitly to mitigate that assumption.

cc: @muellerzr @SunMarc

Changed files:
filename: src/transformers/models/convnext/modeling_convnext.py
patch: @@ -310,6 +310,8 @@ def forward(
     """
 )
 class ConvNextForImageClassification(ConvNextPreTrainedModel):
+    accepts_loss_kwargs = False
+
     def __init__(self, config):
         super().__init__(config)
 

filename: src/transformers/models/convnextv2/modeling_convnextv2.py
patch: @@ -332,6 +332,8 @@ def forward(
 )
 # Copied from transformers.models.convnext.modeling_convnext.ConvNextForImageClassification with CONVNEXT->CONVNEXTV2,ConvNext->ConvNextV2,convnext->convnextv2
 class ConvNextV2ForImageClassification(ConvNextV2PreTrainedModel):
+    accepts_loss_kwargs = False
+
     def __init__(self, config):
         super().__init__(config)
Repository: vercel/next.js
Pull request: [metadata] not add suffix to sitemap.xml in group routes

follow up on #73570 for sitemap.xml case

Changed files:
filename: crates/next-core/src/next_app/metadata/mod.rs
patch: @@ -302,7 +302,7 @@ fn format_radix(mut x: u32, radix: u32) -> String {
 /// /(post)/sitemap -> /sitemap
 fn get_metadata_route_suffix(page: &str) -> Option<String> {
     // skip sitemap
-    if page.ends_with("/sitemap") {
+    if page.ends_with("/sitemap") || page.ends_with("/sitemap.xml") {
         return None;
     }
 

filename: packages/next/src/lib/metadata/get-metadata-route.ts
patch: @@ -31,7 +31,7 @@ function getMetadataRouteSuffix(page: string) {
   // e.g. /parent/opengraph-image -> /parent
   const parentPathname = path.dirname(page)
   // Only apply suffix to metadata routes except for sitemaps
-  if (page.endsWith('/sitemap')) {
+  if (page.endsWith('/sitemap') || page.endsWith('/sitemap.xml')) {
     return ''
   }
 

filename: test/e2e/app-dir/sitemap-group/app/(group)/bar/sitemap.xml
patch: @@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
+  <url>
+    <loc>https://vercel.com/</loc>
+    <lastmod>2023-03-06T18:04:14.008Z</lastmod>
+  </url>
+</urlset>

filename: test/e2e/app-dir/sitemap-group/sitemap-group.test.ts
patch: @@ -22,4 +22,21 @@ describe('sitemap-group', () => {
       "
     `)
   })
+
+  it('should not add suffix to static sitemap.xml under group routes', async () => {
+    const res = await next.fetch('/bar/sitemap.xml')
+    expect(res.status).toBe(200)
+    expect(res.headers.get('content-type')).toBe('application/xml')
+    const text = await res.text()
+    expect(text).toMatchInlineSnapshot(`
+      "<?xml version="1.0" encoding="UTF-8"?>
+      <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
+        <url>
+          <loc>https://vercel.com/</loc>
+          <lastmod>2023-03-06T18:04:14.008Z</lastmod>
+        </url>
+      </urlset>
+      "
+    `)
+  })
 })
Repository: nodejs/node
Pull request: doc: fix typo in writing-test.md

Corrects the misspelling of "optimial" to "optimal".

Changed files:
filename: doc/contributing/writing-tests.md
patch: @@ -24,7 +24,7 @@ See [directory structure overview][] for outline of existing test and locations.
 
 ## How to write a good test
 
-A good test should be written in a style that is optimial for debugging
+A good test should be written in a style that is optimal for debugging
 when it fails.
 
 In principle, when adding a new test, it should be placed in a new file.
Repository: denoland/deno
Pull request: fix: `is_elf` panic in sui

Fixes https://github.com/denoland/deno/issues/31378

<!--
Before submitting a PR, please read https://docs.deno.com/runtime/manual/references/contributing

1. Give the PR a descriptive title.

  Examples of good title:
    - fix(std/http): Fix race condition in server
    - docs(console): Update docstrings
    - feat(doc): Handle nested reexports

  Examples of bad title:
    - fix #7123
    - update docs
    - fix bugs

2. Ensure there is a related issue and it is referenced in the PR text.
3. Ensure there are tests that cover the changes.
4. Ensure `cargo test` passes.
5. Ensure `./tools/format.js` passes without changing files.
6. Ensure `./tools/lint.js` passes.
7. Open as a draft PR if your work is still in progress. The CI won't run
   all steps, but you can add '[ci]' to a commit message to force it to.
8. If you would like to run the benchmarks on the CI, add the 'ci-bench' label.
-->


Changed files:
filename: Cargo.lock
patch: @@ -5792,9 +5792,9 @@ dependencies = [
 
 [[package]]
 name = "libsui"
-version = "0.10.0"
+version = "0.11.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6744db763b6e19aff65ebac2c85cf71358b3aae385828fcf0d1e02878ab7767b"
+checksum = "73ff2746d6f3ea1421944f625fd827c52e0d7e97b91976d4c940c486da38b414"
 dependencies = [
  "editpe",
  "image",

filename: Cargo.toml
patch: @@ -312,7 +312,7 @@ dprint-plugin-markdown = "=0.20.0"
 dprint-plugin-typescript = "=0.95.11"
 env_logger = "=0.11.6"
 fancy-regex = "=0.14.0"
-libsui = "0.10.0"
+libsui = "0.11.0"
 malva = "=0.12.1"
 markup_fmt = "=0.22.0"
 open = "5.0.1"
Repository: ollama/ollama
Pull request: allow for starting llava queries with filepath

- shared cmd file pattern regex
- do not error when multimodal has starting file

There was a bug that a multimodal query starting with an unescaped file path resulted in an "Unknown command" error.

This change allows for multimodal models to have queries starting with the filepath.

```
$ ollama run llava
>>> /test
Unknown command '/test'. Type /? for help
>>> /Users/bruce/Downloads/Ollama_christmas_background.png what is this
Added image '/Users/bruce/Downloads/Ollama_christmas_background.png'
 This is a cartoon of cats, and it appears to be an illustration or drawing of the animals. The scene depicts them gathered around a Christmas tree. In total, there are nine cats in various positions, with some standing close together while others are more spread out. One cat can be seen sitting underneath the 
tree, perhaps enjoying the holiday festivities. The overall atmosphere seems to be joyful and playful as these cats interact and pose around their Christmas tree setting.

$ ollama run llama2
>>> /Users/bruce/Downloads/Ollama_christmas_background.png what is this
Unknown command '/Users/bruce/Downloads/Ollama_christmas_background.png'. Type /? for help
```

resolves #1511

Changed files:
filename: cmd/cmd.go
patch: @@ -928,16 +928,31 @@ func generateInteractive(cmd *cobra.Command, opts generateOptions) error {
 			return nil
 		case strings.HasPrefix(line, "/"):
 			args := strings.Fields(line)
-			fmt.Printf("Unknown command '%s'. Type /? for help\n", args[0])
-			continue
+			isFile := false
+
+			if multiModal {
+				for _, f := range extractFileNames(line) {
+					if strings.HasPrefix(f, args[0]) {
+						isFile = true
+						break
+					}
+				}
+			}
+
+			if isFile {
+				prompt += line
+			} else {
+				fmt.Printf("Unknown command '%s'. Type /? for help\n", args[0])
+				continue
+			}
 		default:
 			prompt += line
 		}
 
 		if len(prompt) > 0 && multiline == MultilineNone {
 			opts.Prompt = prompt
 			if multiModal {
-				newPrompt, images, err := extractFileNames(prompt)
+				newPrompt, images, err := extractFileData(prompt)
 				if err != nil {
 					return err
 				}
@@ -991,13 +1006,17 @@ func normalizeFilePath(fp string) string {
 	return fp
 }
 
-func extractFileNames(input string) (string, []ImageData, error) {
+func extractFileNames(input string) []string {
 	// Regex to match file paths starting with / or ./ and include escaped spaces (\ or %20)
 	// and followed by more characters and a file extension
 	regexPattern := `(?:\./|/)[\S\\ ]+?\.(?i:jpg|jpeg|png|svg)\b`
 	re := regexp.MustCompile(regexPattern)
 
-	filePaths := re.FindAllString(input, -1)
+	return re.FindAllString(input, -1)
+}
+
+func extractFileData(input string) (string, []ImageData, error) {
+	filePaths := extractFileNames(input)
 	var imgs []ImageData
 
 	for _, fp := range filePaths {
Repository: facebook/react
Pull request: feat(compiler-healthcheck): Support strict mode check for nextjs apps

## Summary

Closes #29130 

## How did you test this change?

Run the healthcheck in the compiler playground and the nodejs.org repo for the next config with a `.mjs` extension. Sanity with Vite React template.

Changed files:
filename: compiler/packages/react-compiler-healthcheck/src/checks/strictMode.ts
patch: @@ -8,16 +8,20 @@
 import chalk from "chalk";
 
 const JsFileExtensionRE = /(js|ts|jsx|tsx)$/;
+const NextConfigFileRE = /^next\.config\.(js|mjs)$/;
 const StrictModeRE = /<(React\.StrictMode|StrictMode)>/;
+const NextStrictModeRE = /reactStrictMode:\s*true/;
 let StrictModeUsage = false;
 
 export default {
   run(source: string, path: string): void {
-    if (JsFileExtensionRE.exec(path) === null) {
+    if (StrictModeUsage) {
       return;
     }
 
-    if (!StrictModeUsage) {
+    if (NextConfigFileRE.exec(path) !== null) {
+      StrictModeUsage = NextStrictModeRE.exec(source) !== null;
+    } else if (JsFileExtensionRE.exec(path) !== null) {
       StrictModeUsage = StrictModeRE.exec(source) !== null;
     }
   },

filename: compiler/packages/react-compiler-healthcheck/src/index.ts
patch: @@ -20,7 +20,7 @@ async function main() {
     .option("src", {
       description: "glob expression matching src files to compile",
       type: "string",
-      default: "**/+(*.{js,jsx,ts,tsx}|package.json)",
+      default: "**/+(*.{js,mjs,jsx,ts,tsx}|package.json)",
     })
     .parseSync();
Repository: ollama/ollama
Pull request: add magic header for unit tests

This change adds in the magic GGUF header for the temporary model image layer.

Changed files:
filename: server/routes_test.go
patch: @@ -6,7 +6,6 @@ import (
 	"encoding/json"
 	"fmt"
 	"io"
-
 	"net/http"
 	"net/http/httptest"
 	"os"
@@ -33,17 +32,29 @@ func Test_Routes(t *testing.T) {
 		Setup    func(t *testing.T, req *http.Request)
 		Expected func(t *testing.T, resp *http.Response)
 	}
-	var tempModelFile string
 
-	createTestModel := func(t *testing.T, name string) {
-		f, err := os.CreateTemp("", "ollama-model")
+	createTestFile := func(t *testing.T, name string) string {
+		f, err := os.CreateTemp(t.TempDir(), name)
+		assert.Nil(t, err)
+		defer f.Close()
+
+		_, err = f.Write([]byte("GGUF"))
+		assert.Nil(t, err)
+		_, err = f.Write([]byte{0x2, 0})
 		assert.Nil(t, err)
-		defer os.RemoveAll(f.Name())
 
-		modelfile := strings.NewReader(fmt.Sprintf("FROM %s", f.Name()))
+		return f.Name()
+	}
+
+	createTestModel := func(t *testing.T, name string) {
+		fname := createTestFile(t, "ollama-model")
+
+		modelfile := strings.NewReader(fmt.Sprintf("FROM %s", fname))
 		commands, err := parser.Parse(modelfile)
 		assert.Nil(t, err)
-		fn := func(resp api.ProgressResponse) {}
+		fn := func(resp api.ProgressResponse) {
+			t.Logf("Status: %s", resp.Status)
+		}
 		err = CreateModel(context.TODO(), name, "", commands, fn)
 		assert.Nil(t, err)
 	}
@@ -107,9 +118,9 @@ func Test_Routes(t *testing.T) {
 			Method: http.MethodPost,
 			Path:   "/api/create",
 			Setup: func(t *testing.T, req *http.Request) {
-				f, err := os.CreateTemp("", "ollama-model")
+				f, err := os.CreateTemp(t.TempDir(), "ollama-model")
 				assert.Nil(t, err)
-				tempModelFile = f.Name()
+				defer f.Close()
 
 				stream := false
 				createReq := api.CreateRequest{
@@ -123,8 +134,6 @@ func Test_Routes(t *testing.T) {
 				req.Body = io.NopCloser(bytes.NewReader(jsonData))
 			},
 			Expected: func(t *testing.T, resp *http.Response) {
-				os.RemoveAll(tempModelFile)
-
 				contentType := resp.Header.Get("Content-Type")
 				assert.Equal(t, "application/json", contentType)
 				_, err := io.ReadAll(resp.Body)
@@ -173,6 +182,7 @@ func Test_Routes(t *testing.T) {
 	os.Setenv("OLLAMA_MODELS", workDir)
 
 	for _, tc := range testCases {
+		t.Logf("Running Test: [%s]", tc.Name)
 		u := httpSrv.URL + tc.Path
 		req, err := http.NewRequestWithContext(context.TODO(), tc.Method, u, nil)
 		assert.Nil(t, err)
Repository: ollama/ollama
Pull request: add FAQ for slow networking in WSL2


Changed files:
filename: README.md
patch: @@ -17,7 +17,7 @@ Get up and running with large language models locally.
 
 ### Windows
 
-Coming soon!
+Coming soon! For now, you can install Ollama on Windows via WSL2.
 
 ### Linux & WSL2
 

filename: docs/faq.md
patch: @@ -154,3 +154,11 @@ docker run -d -e HTTPS_PROXY=https://my.proxy.example.com -p 11434:11434 ollama-
 The Ollama Docker container can be configured with GPU acceleration in Linux or Windows (with WSL2). This requires the [nvidia-container-toolkit](https://github.com/NVIDIA/nvidia-container-toolkit). See [ollama/ollama](https://hub.docker.com/r/ollama/ollama) for more details.
 
 GPU acceleration is not available for Docker Desktop in macOS due to the lack of GPU passthrough and emulation.
+
+## Why is networking slow in WSL2 on Windows 10?
+
+This can impact both installing Ollama, as well as downloading models.
+
+Open `Control Panel > Networking and Internet > View network status and tasks` and click on `Change adapter settings` on the left panel. Find the `vEthernel (WSL)` adapter, right click and select `Properties`.
+Click on `Configure` and open the `Advanced` tab. Search through each of the properties until you find `Large Send Offload Version 2 (IPv4)` and `Large Send Offload Version 2 (IPv6)`. *Disable* both of these
+properties.
Repository: huggingface/transformers
Pull request: Fix backward compatibility with accelerate in Trainer

`Accelerator().parallelism_config` only exists from accelerate 1.10. This PR ensure backward compatibility with older versions

cc @ArthurZucker for patch please 🙏

Changed files:
filename: src/transformers/trainer.py
patch: @@ -5626,7 +5626,7 @@ def get_batch_samples(
                     # In the DataParallel case, convert the scalar tensor into a 1-dim tensor
                     num_items_in_batch = num_items_in_batch.unsqueeze(0)
                 # Divide by number of devices with the same batch
-                if pc := self.accelerator.parallelism_config:
+                if pc := getattr(self.accelerator, "parallelism_config", None):
                     num_items_in_batch = num_items_in_batch // pc.non_data_parallel_size
 
         return batch_samples, num_items_in_batch