From 09b839a8d2626c18702ed800d97a7db40555fd77 Mon Sep 17 00:00:00 2001 From: Samuel Ainsworth Date: Fri, 21 Oct 2022 12:31:37 -0700 Subject: [PATCH] python3Packages.wandb: 0.12.21 -> 0.13.4 --- .../python-modules/wandb/default.nix | 49 +++++++++---------- .../wandb/hardcode-git-path.patch | 25 +++------- 2 files changed, 29 insertions(+), 45 deletions(-) diff --git a/pkgs/development/python-modules/wandb/default.nix b/pkgs/development/python-modules/wandb/default.nix index b1ad380f04b9..8bf588eaba51 100644 --- a/pkgs/development/python-modules/wandb/default.nix +++ b/pkgs/development/python-modules/wandb/default.nix @@ -23,7 +23,6 @@ , pytest-mock , pytest-xdist , pytestCheckHook -, python-dateutil , pythonOlder , pythonRelaxDepsHook , torch @@ -40,16 +39,16 @@ buildPythonPackage rec { pname = "wandb"; - version = "0.12.21"; + version = "0.13.4"; format = "setuptools"; disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = pname; - repo = "client"; + repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-jKb2pNmCW4MYz6ncsMNg7o5giCI2bpKER/kb8lfJekI="; + hash = "sha256-+3fLExLQChXKx1LCnNvPLNTUzopP+D+6tOikFrjdysY="; }; patches = [ @@ -73,7 +72,6 @@ buildPythonPackage rec { promise protobuf psutil - python-dateutil pyyaml requests sentry-sdk @@ -109,11 +107,26 @@ buildPythonPackage rec { disabledTestPaths = [ # Tests that try to get chatty over sockets or spin up servers, not possible in the nix build environment. - "tests/unit_tests/integrations/test_keras.py" - "tests/unit_tests/integrations/test_torch.py" + "tests/unit_tests_old/test_cli.py" + "tests/unit_tests_old/test_data_types.py" + "tests/unit_tests_old/test_file_stream.py" + "tests/unit_tests_old/test_file_upload.py" + "tests/unit_tests_old/test_footer.py" + "tests/unit_tests_old/test_internal_api.py" + "tests/unit_tests_old/test_keras.py" + "tests/unit_tests_old/test_metric_internal.py" + "tests/unit_tests_old/test_public_api.py" + "tests/unit_tests_old/test_report_api.py" + "tests/unit_tests_old/test_runtime.py" + "tests/unit_tests_old/test_sender.py" + "tests/unit_tests_old/test_tb_watcher.py" + "tests/unit_tests_old/test_time_resolution.py" + "tests/unit_tests_old/test_wandb_agent.py" + "tests/unit_tests_old/test_wandb_artifacts.py" + "tests/unit_tests_old/test_wandb_integration.py" + "tests/unit_tests_old/test_wandb_run.py" "tests/unit_tests/test_cli.py" "tests/unit_tests/test_data_types.py" - "tests/unit_tests/test_file_stream.py" "tests/unit_tests/test_file_upload.py" "tests/unit_tests/test_footer.py" "tests/unit_tests/test_internal_api.py" @@ -125,31 +138,15 @@ buildPythonPackage rec { "tests/unit_tests/test_mode_disabled.py" "tests/unit_tests/test_model_workflows.py" "tests/unit_tests/test_mp_full.py" + "tests/unit_tests/test_plots.py" "tests/unit_tests/test_public_api.py" - "tests/unit_tests/test_redir.py" "tests/unit_tests/test_runtime.py" "tests/unit_tests/test_sender.py" "tests/unit_tests/test_start_method.py" "tests/unit_tests/test_tb_watcher.py" "tests/unit_tests/test_telemetry_full.py" - "tests/unit_tests/test_util.py" - "tests/unit_tests/wandb_agent_test.py" - "tests/unit_tests/wandb_artifacts_test.py" - "tests/unit_tests/wandb_integration_test.py" - "tests/unit_tests/wandb_run_test.py" - "tests/unit_tests/wandb_settings_test.py" - "tests/unit_tests/wandb_sweep_test.py" - "tests/unit_tests/wandb_tensorflow_test.py" - "tests/unit_tests/wandb_verify_test.py" "tests/unit_tests/test_tpu.py" - "tests/unit_tests/test_plots.py" - "tests/unit_tests/test_report_api.py" - - # Requires metaflow, which is not yet packaged. - "tests/unit_tests/integrations/test_metaflow.py" - - # Fails and borks the pytest runner as well. - "tests/unit_tests/wandb_test.py" + "tests/unit_tests/test_util.py" # Tries to access /homeless-shelter "tests/unit_tests/test_tables.py" diff --git a/pkgs/development/python-modules/wandb/hardcode-git-path.patch b/pkgs/development/python-modules/wandb/hardcode-git-path.patch index 23097c535e06..ff1a4f2567fa 100644 --- a/pkgs/development/python-modules/wandb/hardcode-git-path.patch +++ b/pkgs/development/python-modules/wandb/hardcode-git-path.patch @@ -10,12 +10,12 @@ index 82fadfe1..25c1454c 100644 + s, o = subprocess.getstatusoutput("@git@ rev-parse HEAD") if s: return - wandb_local = f"git+https://github.com/wandb/client.git@{o}#egg=wandb" + wandb_local = f"git+https://github.com/wandb/wandb.git@{o}#egg=wandb" diff --git a/wandb/cli/cli.py b/wandb/cli/cli.py index 5767e61c..56009fec 100644 --- a/wandb/cli/cli.py +++ b/wandb/cli/cli.py -@@ -1745,7 +1745,7 @@ def restore(ctx, run, no_git, branch, project, entity): +@@ -1917,7 +1917,7 @@ def restore(ctx, run, no_git, branch, project, entity): commit, json_config, patch_content, metadata = api.run_config( project, run=run, entity=entity ) @@ -24,8 +24,8 @@ index 5767e61c..56009fec 100644 image = metadata.get("docker") restore_message = ( """`wandb restore` needs to be run from the same git repository as the original run. -@@ -1764,7 +1764,7 @@ Run `git clone %s` and restore from there or pass the --no-git flag.""" - +@@ -1936,7 +1936,7 @@ Run `git clone %s` and restore from there or pass the --no-git flag.""" + if commit and api.git.enabled: wandb.termlog(f"Fetching origin and finding commit: {commit}") - subprocess.check_call(["git", "fetch", "--all"]) @@ -33,7 +33,7 @@ index 5767e61c..56009fec 100644 try: api.git.repo.commit(commit) except ValueError: -@@ -1818,7 +1818,7 @@ Run `git clone %s` and restore from there or pass the --no-git flag.""" +@@ -1990,7 +1990,7 @@ Run `git clone %s` 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( @@ -42,19 +42,6 @@ index 5767e61c..56009fec 100644 ) if exit_code == 0: wandb.termlog("Applied patch") -diff --git a/wandb/sdk/internal/internal_api.py b/wandb/sdk/internal/internal_api.py -index 612220b9..b761bfbd 100644 ---- a/wandb/sdk/internal/internal_api.py -+++ b/wandb/sdk/internal/internal_api.py -@@ -660,7 +660,7 @@ class Api: - ) - patch = BytesIO() - if self.git.dirty: -- self.git.repo.git.execute(["git", "diff"], output_stream=patch) -+ self.git.repo.git.execute(["@git@", "diff"], output_stream=patch) - patch.seek(0) - cwd = "." - if self.git.enabled: diff --git a/wandb/sdk/internal/meta.py b/wandb/sdk/internal/meta.py index 6c53f750..c385951a 100644 --- a/wandb/sdk/internal/meta.py @@ -67,7 +54,7 @@ index 6c53f750..c385951a 100644 + diff_args = ["@git@", "diff"] if self._git.has_submodule_diff: diff_args.append("--submodule=diff") - + diff --git a/wandb/vendor/graphql-core-1.1/wandb_graphql/pyutils/version.py b/wandb/vendor/graphql-core-1.1/wandb_graphql/pyutils/version.py index 614df9f5..38db460b 100644 --- a/wandb/vendor/graphql-core-1.1/wandb_graphql/pyutils/version.py