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 fetchFromGitHub, 5 6 ## wandb-core 7 - buildGoModule, 8 - git, 9 versionCheckHook, 10 - fetchpatch2, 11 12 ## gpu-stats 13 rustPlatform, ··· 44 azure-storage-blob, 45 bokeh, 46 boto3, 47 coverage, 48 flask, 49 google-cloud-artifact-registry, ··· 78 }: 79 80 let 81 - version = "0.19.11"; 82 src = fetchFromGitHub { 83 owner = "wandb"; 84 repo = "wandb"; 85 tag = "v${version}"; 86 - hash = "sha256-JsciaNN1l3Ldty8dB2meRXWz62JdLRXeG09b7PNrQx4="; 87 }; 88 89 gpu-stats = rustPlatform.buildRustPackage { 90 pname = "gpu-stats"; 91 - version = "0.4.0"; 92 inherit src; 93 94 sourceRoot = "${src.name}/gpu_stats"; 95 96 - cargoHash = "sha256-q8csheytw57C6+wPPaANkMkW1Smoo+IViiA6Cdrag4Q="; 97 98 checkFlags = [ 99 # fails in sandbox ··· 103 nativeInstallCheckInputs = [ 104 versionCheckHook 105 ]; 106 - versionCheckProgram = "${placeholder "out"}/bin/gpu_stats"; 107 versionCheckProgramArg = "--version"; 108 doInstallCheck = true; 109 ··· 112 }; 113 }; 114 115 - wandb-core = buildGoModule rec { 116 pname = "wandb-core"; 117 inherit src version; 118 119 sourceRoot = "${src.name}/core"; 120 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 # hardcode the `gpu_stats` binary path. 139 postPatch = '' 140 - substituteInPlace pkg/monitor/gpuresourcemanager.go \ 141 --replace-fail \ 142 'cmdPath, err := getGPUCollectorCmdPath()' \ 143 'cmdPath, err := "${lib.getExe gpu-stats}", error(nil)' ··· 146 vendorHash = null; 147 148 nativeBuildInputs = [ 149 - git 150 ]; 151 152 nativeInstallCheckInputs = [ ··· 182 patches = [ 183 # Replace git paths 184 (replaceVars ./hardcode-git-path.patch { 185 - git = lib.getExe git; 186 }) 187 ]; 188 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 - ''; 196 197 env = { 198 # Prevent the install script to try building and embedding the `gpu_stats` and `wandb-core` ··· 237 azure-containerregistry 238 azure-identity 239 azure-storage-blob 240 boto3 241 - bokeh 242 coverage 243 flask 244 google-cloud-artifact-registry
··· 4 fetchFromGitHub, 5 6 ## wandb-core 7 + buildGo125Module, 8 + gitMinimal, 9 versionCheckHook, 10 11 ## gpu-stats 12 rustPlatform, ··· 43 azure-storage-blob, 44 bokeh, 45 boto3, 46 + cloudpickle, 47 coverage, 48 flask, 49 google-cloud-artifact-registry, ··· 78 }: 79 80 let 81 + version = "0.21.3"; 82 src = fetchFromGitHub { 83 owner = "wandb"; 84 repo = "wandb"; 85 tag = "v${version}"; 86 + hash = "sha256-GJk+Q/PY3/jo/yeetYRgqgMdXdYSlGt7Ny1NqdfHF0Q="; 87 }; 88 89 gpu-stats = rustPlatform.buildRustPackage { 90 pname = "gpu-stats"; 91 + version = "0.6.0"; 92 inherit src; 93 94 sourceRoot = "${src.name}/gpu_stats"; 95 96 + cargoHash = "sha256-iZinowkbBc3nuE0uRS2zLN2y97eCMD1mp/MKVKdnXaE="; 97 98 checkFlags = [ 99 # fails in sandbox ··· 103 nativeInstallCheckInputs = [ 104 versionCheckHook 105 ]; 106 versionCheckProgramArg = "--version"; 107 doInstallCheck = true; 108 ··· 111 }; 112 }; 113 114 + wandb-core = buildGo125Module rec { 115 pname = "wandb-core"; 116 inherit src version; 117 118 sourceRoot = "${src.name}/core"; 119 120 # hardcode the `gpu_stats` binary path. 121 postPatch = '' 122 + substituteInPlace internal/monitor/gpuresourcemanager.go \ 123 --replace-fail \ 124 'cmdPath, err := getGPUCollectorCmdPath()' \ 125 'cmdPath, err := "${lib.getExe gpu-stats}", error(nil)' ··· 128 vendorHash = null; 129 130 nativeBuildInputs = [ 131 + gitMinimal 132 ]; 133 134 nativeInstallCheckInputs = [ ··· 164 patches = [ 165 # Replace git paths 166 (replaceVars ./hardcode-git-path.patch { 167 + git = lib.getExe gitMinimal; 168 }) 169 ]; 170 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 + ''; 184 185 env = { 186 # Prevent the install script to try building and embedding the `gpu_stats` and `wandb-core` ··· 225 azure-containerregistry 226 azure-identity 227 azure-storage-blob 228 + bokeh 229 boto3 230 + cloudpickle 231 coverage 232 flask 233 google-cloud-artifact-registry