From 44d61cba73fbe839efbfe70c874272d0f24c9609 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Tue, 23 Jun 2026 09:41:54 +0000 Subject: [PATCH] python3Packages.wandb: 0.27.2 -> 0.28.0 Diff: https://github.com/wandb/wandb/compare/v0.27.2...v0.28.0 Changelog: https://github.com/wandb/wandb/blob/v0.28.0/CHANGELOG.md --- .../python-modules/wandb/default.nix | 4 +- .../wandb/hardcode-git-path.patch | 39 +++++++++++++++++-- 2 files changed, 37 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/wandb/default.nix b/pkgs/development/python-modules/wandb/default.nix index fd074fd4ac96..ef48cfe56e18 100644 --- a/pkgs/development/python-modules/wandb/default.nix +++ b/pkgs/development/python-modules/wandb/default.nix @@ -77,12 +77,12 @@ }: let - version = "0.27.2"; + version = "0.28.0"; src = fetchFromGitHub { owner = "wandb"; repo = "wandb"; tag = "v${version}"; - hash = "sha256-guNepG8h8Pl8SaJqImS5UsWNFmPyrWidsXh+q9Es73I="; + hash = "sha256-YdM/LrrWQFup/1Fkv49//eOFfYFCRgpuuH7+DZIOT1M="; }; wandb-xpu = rustPlatform.buildRustPackage { diff --git a/pkgs/development/python-modules/wandb/hardcode-git-path.patch b/pkgs/development/python-modules/wandb/hardcode-git-path.patch index 8d37ac1ceaeb..cf1fb4e0d48c 100644 --- a/pkgs/development/python-modules/wandb/hardcode-git-path.patch +++ b/pkgs/development/python-modules/wandb/hardcode-git-path.patch @@ -1,8 +1,39 @@ +diff --git a/tests/unit_tests/test_wandb_settings.py b/tests/unit_tests/test_wandb_settings.py +index 4089d0719..694715290 100644 +--- a/tests/unit_tests/test_wandb_settings.py ++++ b/tests/unit_tests/test_wandb_settings.py +@@ -698,7 +698,7 @@ def test_reports_invalid_system_settings( + def test_infer_git_root_finds_repo(tmp_path): + git_root = tmp_path / "repo" + git_root.mkdir() +- subprocess.run(["git", "init", str(git_root)], check=True, capture_output=True) ++ subprocess.run(["@git@", "init", str(git_root)], check=True, capture_output=True) + subdir = git_root / "subdir" + subdir.mkdir() + +@@ -718,7 +718,7 @@ def test_infer_git_root_no_repo(tmp_path): + def test_infer_git_root_skips_if_already_set(tmp_path): + git_root = tmp_path / "repo" + git_root.mkdir() +- subprocess.run(["git", "init", str(git_root)], check=True, capture_output=True) ++ subprocess.run(["@git@", "init", str(git_root)], check=True, capture_output=True) + + preset = "/some/other/path" + s = Settings(root_dir=str(git_root), git_root=preset) +@@ -730,7 +730,7 @@ def test_infer_git_root_skips_if_already_set(tmp_path): + def test_infer_git_root_skips_if_disable_git(tmp_path): + git_root = tmp_path / "repo" + git_root.mkdir() +- subprocess.run(["git", "init", str(git_root)], check=True, capture_output=True) ++ subprocess.run(["@git@", "init", str(git_root)], check=True, capture_output=True) + + s = Settings(root_dir=str(git_root), disable_git=True) + s.infer_git_root() diff --git a/wandb/cli/cli.py b/wandb/cli/cli.py -index 2623a3d75..ea78e52b8 100644 +index 0ec7996cc..973b10643 100644 --- a/wandb/cli/cli.py +++ b/wandb/cli/cli.py -@@ -3264,7 +3264,7 @@ def restore(ctx, run, no_git, branch, project, entity): +@@ -3265,7 +3265,7 @@ def restore(ctx, run, no_git, branch, project, entity): commit, json_config, patch_content, metadata = api.run_config( project, run=run, entity=entity ) @@ -11,7 +42,7 @@ index 2623a3d75..ea78e52b8 100644 image = metadata.get("docker") restore_message = f"""`wandb restore` needs to be run from the same git repository as the original run. Run `git clone {repo}` and restore from there or pass the --no-git flag.""" -@@ -3283,7 +3283,7 @@ Run `git clone {repo}` and restore from there or pass the --no-git flag.""" +@@ -3284,7 +3284,7 @@ Run `git clone {repo}` and restore from there or pass the --no-git flag.""" if commit and git.enabled: wandb.termlog(f"Fetching origin and finding commit: {commit}") @@ -20,7 +51,7 @@ index 2623a3d75..ea78e52b8 100644 try: git.repo.commit(commit) except ValueError: -@@ -3336,7 +3336,7 @@ Run `git clone {repo}` and restore from there or pass the --no-git flag.""" +@@ -3337,7 +3337,7 @@ Run `git clone {repo}` and restore from there or pass the --no-git flag.""" # --reject is necessary or else this fails any time a binary file # occurs in the diff exit_code = subprocess.call(