python3Packages.wandb: 0.19.11 -> 0.21.3 (#441417)

authored by Gaétan Lepage and committed by GitHub 82059705 88366822

+26 -37
+26 -37
pkgs/development/python-modules/wandb/default.nix
··· 4 4 fetchFromGitHub, 5 5 6 6 ## wandb-core 7 - buildGoModule, 8 - git, 7 + buildGo125Module, 8 + gitMinimal, 9 9 versionCheckHook, 10 - fetchpatch2, 11 10 12 11 ## gpu-stats 13 12 rustPlatform, ··· 44 43 azure-storage-blob, 45 44 bokeh, 46 45 boto3, 46 + cloudpickle, 47 47 coverage, 48 48 flask, 49 49 google-cloud-artifact-registry, ··· 78 78 }: 79 79 80 80 let 81 - version = "0.19.11"; 81 + version = "0.21.3"; 82 82 src = fetchFromGitHub { 83 83 owner = "wandb"; 84 84 repo = "wandb"; 85 85 tag = "v${version}"; 86 - hash = "sha256-JsciaNN1l3Ldty8dB2meRXWz62JdLRXeG09b7PNrQx4="; 86 + hash = "sha256-GJk+Q/PY3/jo/yeetYRgqgMdXdYSlGt7Ny1NqdfHF0Q="; 87 87 }; 88 88 89 89 gpu-stats = rustPlatform.buildRustPackage { 90 90 pname = "gpu-stats"; 91 - version = "0.4.0"; 91 + version = "0.6.0"; 92 92 inherit src; 93 93 94 94 sourceRoot = "${src.name}/gpu_stats"; 95 95 96 - cargoHash = "sha256-q8csheytw57C6+wPPaANkMkW1Smoo+IViiA6Cdrag4Q="; 96 + cargoHash = "sha256-iZinowkbBc3nuE0uRS2zLN2y97eCMD1mp/MKVKdnXaE="; 97 97 98 98 checkFlags = [ 99 99 # fails in sandbox ··· 103 103 nativeInstallCheckInputs = [ 104 104 versionCheckHook 105 105 ]; 106 - versionCheckProgram = "${placeholder "out"}/bin/gpu_stats"; 107 106 versionCheckProgramArg = "--version"; 108 107 doInstallCheck = true; 109 108 ··· 112 111 }; 113 112 }; 114 113 115 - wandb-core = buildGoModule rec { 114 + wandb-core = buildGo125Module rec { 116 115 pname = "wandb-core"; 117 116 inherit src version; 118 117 119 118 sourceRoot = "${src.name}/core"; 120 119 121 - # x86_64-darwin fails with: 122 - # "link: duplicated definition of symbol dlopen, from github.com/ebitengine/purego and github.com/ebitengine/purego" 123 - # This is fixed in purego 0.8.3, but wandb-core uses 0.8.2, so we pull in the fix here. 124 - patches = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ 125 - (fetchpatch2 { 126 - url = "https://github.com/ebitengine/purego/commit/1638563e361522e5f63511d84c4541ae1c5fd704.patch"; 127 - stripLen = 1; 128 - extraPrefix = "vendor/github.com/ebitengine/purego/"; 129 - # These are not vendored by wandb-core 130 - excludes = [ 131 - "vendor/github.com/ebitengine/purego/.github/workflows/test.yml" 132 - "vendor/github.com/ebitengine/purego/internal/fakecgo/gen.go" 133 - ]; 134 - hash = "sha256-GoT/OL6r3rJY5zoUyl3kGzSRpX3PoI7Yjpe7oRb0cFc="; 135 - }) 136 - ]; 137 - 138 120 # hardcode the `gpu_stats` binary path. 139 121 postPatch = '' 140 - substituteInPlace pkg/monitor/gpuresourcemanager.go \ 122 + substituteInPlace internal/monitor/gpuresourcemanager.go \ 141 123 --replace-fail \ 142 124 'cmdPath, err := getGPUCollectorCmdPath()' \ 143 125 'cmdPath, err := "${lib.getExe gpu-stats}", error(nil)' ··· 146 128 vendorHash = null; 147 129 148 130 nativeBuildInputs = [ 149 - git 131 + gitMinimal 150 132 ]; 151 133 152 134 nativeInstallCheckInputs = [ ··· 182 164 patches = [ 183 165 # Replace git paths 184 166 (replaceVars ./hardcode-git-path.patch { 185 - git = lib.getExe git; 167 + git = lib.getExe gitMinimal; 186 168 }) 187 169 ]; 188 170 189 - # Hard-code the path to the `wandb-core` binary in the code. 190 - postPatch = '' 191 - substituteInPlace wandb/util.py \ 192 - --replace-fail \ 193 - 'bin_path = pathlib.Path(__file__).parent / "bin" / "wandb-core"' \ 194 - 'bin_path = pathlib.Path("${lib.getExe wandb-core}")' 195 - ''; 171 + postPatch = 172 + # Prevent hatch from building wandb-core 173 + '' 174 + substituteInPlace hatch_build.py \ 175 + --replace-fail "artifacts.extend(self._build_wandb_core())" "" 176 + '' 177 + # Hard-code the path to the `wandb-core` binary in the code. 178 + + '' 179 + substituteInPlace wandb/util.py \ 180 + --replace-fail \ 181 + 'bin_path = pathlib.Path(__file__).parent / "bin" / "wandb-core"' \ 182 + 'bin_path = pathlib.Path("${lib.getExe wandb-core}")' 183 + ''; 196 184 197 185 env = { 198 186 # Prevent the install script to try building and embedding the `gpu_stats` and `wandb-core` ··· 237 225 azure-containerregistry 238 226 azure-identity 239 227 azure-storage-blob 228 + bokeh 240 229 boto3 241 - bokeh 230 + cloudpickle 242 231 coverage 243 232 flask 244 233 google-cloud-artifact-registry