Unverified Commit 45ad88db authored by Pol Dellaiera's avatar Pol Dellaiera Committed by GitHub
Browse files

python312Packages.wandb: 0.16.0 -> 0.18.5 (#350098)

parents 0d43af99 d92fb02e
Loading
Loading
Loading
Loading
+25 −9
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchPypi,
  fetchFromGitHub,
  setuptools,
  six,
  pythonAtLeast,
  distutils,
}:

buildPythonPackage rec {
  pname = "docker-pycreds";
  version = "0.4.0";
  format = "setuptools";
  pyproject = true;

  src = fetchPypi {
    inherit pname version;
    sha256 = "6ce3270bcaf404cc4c3e27e4b6c70d3521deae82fb508767870fdbf772d584d4";
  src = fetchFromGitHub {
    owner = "shin-";
    repo = "dockerpy-creds";
    rev = "refs/tags/${version}";
    hash = "sha256-yYsMsRW6Bb8vmwT0mPjs0pRqBbznGtHnGb3JNHjLjys=";
  };

  build-system = [
    setuptools
  ];

  dependencies =
    [ six ]
    ++ lib.optionals (pythonAtLeast "3.12") [
      distutils
    ];

  pythonImportsCheck = [ "dockerpycreds" ];

  # require docker-credential-helpers binaries
  doCheck = false;

  propagatedBuildInputs = [ six ];

  meta = with lib; {
  meta = {
    description = "Python bindings for the docker credentials store API";
    homepage = "https://github.com/shin-/dockerpy-creds";
    license = licenses.asl20;
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [ GaetanLepage ];
  };
}
+69 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  coreutils,

  # build-system
  setuptools,

  # dependencies
  aiohttp,
  certifi,
  python-dateutil,
  pyyaml,
  six,
  urllib3,

  # tests
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "kubernetes-asyncio";
  version = "31.1.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "tomplus";
    repo = "kubernetes_asyncio";
    rev = "refs/tags/${version}";
    hash = "sha256-YKBqhUeLqLiQ6bK235zTm4salnSLUxl4DUiFLQSjWqw=";
  };

  postPatch = ''
    substituteInPlace kubernetes_asyncio/config/google_auth_test.py \
      --replace-fail "/bin/echo" "${lib.getExe' coreutils "echo"}"
  '';

  build-system = [
    setuptools
  ];

  dependencies = [
    aiohttp
    certifi
    python-dateutil
    pyyaml
    six
    urllib3
  ];

  pythonImportsCheck = [
    "kubernetes_asyncio"
  ];

  nativeCheckInputs = [
    pytestCheckHook
  ];

  __darwinAllowLocalNetworking = true;

  meta = {
    description = "Python asynchronous client library for Kubernetes http://kubernetes.io";
    homepage = "https://github.com/tomplus/kubernetes_asyncio";
    changelog = "https://github.com/tomplus/kubernetes_asyncio/blob/${src.rev}/CHANGELOG.md";
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [ GaetanLepage ];
  };
}
+233 −231
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  appdirs,
  azure-containerregistry,
  fetchFromGitHub,

  ## wandb-core
  buildGoModule,
  git,
  versionCheckHook,

  ## gpu-stats
  rustPlatform,
  darwin,

  ## wandb
  buildPythonPackage,
  substituteAll,

  # build-system
  hatchling,

  # dependencies
  click,
  docker-pycreds,
  gitpython,
  platformdirs,
  protobuf,
  psutil,
  pyyaml,
  requests,
  sentry-sdk_2,
  setproctitle,
  setuptools,
  pythonOlder,
  typing-extensions,

  # tests
  pytestCheckHook,
  azure-core,
  azure-containerregistry,
  azure-identity,
  azure-storage-blob,
  bokeh,
  boto3,
  buildPythonPackage,
  click,
  docker-pycreds,
  fetchFromGitHub,
  coverage,
  flask,
  git,
  gitpython,
  google-cloud-artifact-registry,
  google-cloud-compute,
  google-cloud-storage,
  hypothesis,
  imageio,
  jsonref,
  jsonschema,
  keras,
  kubernetes,
  kubernetes-asyncio,
  matplotlib,
  mlflow,
  moviepy,
  nbclient,
  nbformat,
  pandas,
  parameterized,
  protobuf,
  psutil,
  pillow,
  plotly,
  pydantic,
  pyfakefs,
  pyte,
  pytest-asyncio,
  pytest-cov-stub,
  pytest-mock,
  pytest-timeout,
  pytest-xdist,
  pytestCheckHook,
  pythonOlder,
  pyyaml,
  requests,
  rdkit,
  responses,
  scikit-learn,
  sentry-sdk,
  setproctitle,
  setuptools,
  soundfile,
  substituteAll,
  tenacity,
  torch,
  tqdm,
}:

buildPythonPackage rec {
  pname = "wandb";
  version = "0.16.0";
  format = "pyproject";

  disabled = pythonOlder "3.6";

let
  version = "0.18.5";
  src = fetchFromGitHub {
    owner = pname;
    repo = pname;
    owner = "wandb";
    repo = "wandb";
    rev = "refs/tags/v${version}";
    hash = "sha256-XXs9KjiAPzZ932r4UJ87RpM+qhg/bNDWEYsq2Ua6SRw=";
    hash = "sha256-nx50baneYSSIWPAIOkUk4cGCNpWAhv7IwFDQJ4vUMiw=";
  };

  gpu-stats = rustPlatform.buildRustPackage rec {
    pname = "gpu-stats";
    version = "0.2.0";
    inherit src;

    sourceRoot = "${src.name}/gpu_stats";

    cargoHash = "sha256-4udGG4I2Hr8r84c4WX6QGG/+bcHK4csXqwddvIiKmkw=";

    buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
      darwin.apple_sdk.frameworks.IOKit
    ];

    nativeInstallCheckInputs = [
      versionCheckHook
    ];
    versionCheckProgram = "${placeholder "out"}/bin/gpu_stats";
    versionCheckProgramArg = [ "--version" ];
    doInstallCheck = true;

    meta = {
      mainProgram = "gpu_stats";
      # ld: library not found for -lIOReport
      # TODO: succeeds on https://github.com/NixOS/nixpkgs/pull/348827, so try again once it lands on master
      broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64;
    };
  };

  wandb-core = buildGoModule rec {
    pname = "wandb-core";
    inherit src version;

    sourceRoot = "${src.name}/core";

    # hardcode the `gpu_stats` binary path.
    postPatch = ''
      substituteInPlace pkg/monitor/gpu.go \
        --replace-fail \
          'cmdPath, err := getGPUStatsCmdPath()' \
          'cmdPath, err := "${lib.getExe gpu-stats}", error(nil)'
    '';

    vendorHash = null;

    nativeBuildInputs = [
      git
    ];

    nativeInstallCheckInputs = [
      versionCheckHook
    ];
    versionCheckProgramArg = [ "--version" ];
    doInstallCheck = true;

    __darwinAllowLocalNetworking = true;

    meta.mainProgram = "wandb-core";
  };
in

buildPythonPackage rec {
  pname = "wandb";
  pyproject = true;

  inherit src version;

  patches = [
    # Replace git paths
    (substituteAll {
      src = ./hardcode-git-path.patch;
      git = "${lib.getBin git}/bin/git";
      git = lib.getExe git;
    })
  ];

  nativeBuildInputs = [
    setuptools
  # Hard-code the path to the `wandb-core` binary in the code.
  postPatch = ''
    substituteInPlace wandb/util.py \
      --replace-fail \
        'bin_path = pathlib.Path(__file__).parent / "bin" / "wandb-core"' \
        'bin_path = pathlib.Path("${lib.getExe wandb-core}")'
  '';

  env = {
    # Prevent the install script to try building and embedding the `gpu_stats` and `wandb-core`
    # binaries in the wheel.
    # Their path have been patched accordingly in the `wandb-core` and `wanbd` source codes.
    # https://github.com/wandb/wandb/blob/v0.18.5/hatch_build.py#L37-L47
    WANDB_BUILD_SKIP_GPU_STATS = true;
    WANDB_BUILD_UNIVERSAL = true;
  };

  build-system = [
    hatchling
  ];

  # setuptools is necessary since pkg_resources is required at runtime.
  propagatedBuildInputs = [
    appdirs
  dependencies =
    [
      click
      docker-pycreds
      gitpython
      platformdirs
      protobuf
      psutil
      pyyaml
      requests
    sentry-sdk
      sentry-sdk_2
      setproctitle
      # setuptools is necessary since pkg_resources is required at runtime.
      setuptools
    ]
    ++ lib.optionals (pythonOlder "3.12") [
      typing-extensions
    ];

  __darwinAllowLocalNetworking = true;

  nativeCheckInputs = [
    azure-containerregistry
    pytestCheckHook
    azure-core
    azure-containerregistry
    azure-identity
    azure-storage-blob
    bokeh
    boto3
    bokeh
    coverage
    flask
    google-cloud-artifact-registry
    google-cloud-compute
    google-cloud-storage
    hypothesis
    imageio
    jsonref
    jsonschema
    keras
    kubernetes
    kubernetes-asyncio
    matplotlib
    mlflow
    moviepy
    nbclient
    nbformat
    pandas
    parameterized
    pillow
    plotly
    pydantic
    pyfakefs
    pyte
    pytest-asyncio
    pytest-cov-stub
    pytest-mock
    pytest-timeout
    pytest-xdist
    pytestCheckHook
    rdkit
    responses
    scikit-learn
    soundfile
    tenacity
    torch
    tqdm
  ];

  # Set BOKEH_CDN_VERSION to stop bokeh throwing an exception in tests
  preCheck = ''
    export HOME=$(mktemp -d)
    export BOKEH_CDN_VERSION=${bokeh.version}
  '';

  pythonRelaxDeps = [ "protobuf" ];

  pytestFlagsArray = [
    # We want to run only unit tests
    "tests/pytest_tests"
  ];

  disabledTestPaths =
    [
      # Tests that try to get chatty over sockets or spin up servers, not possible in the nix build environment.
      "tests/pytest_tests/system_tests/test_notebooks/test_notebooks.py"
      "tests/pytest_tests/unit_tests_old/test_cli.py"
      "tests/pytest_tests/unit_tests_old/test_data_types.py"
      "tests/pytest_tests/unit_tests_old/test_file_stream.py"
      "tests/pytest_tests/unit_tests_old/test_file_upload.py"
      "tests/pytest_tests/unit_tests_old/test_footer.py"
      "tests/pytest_tests/unit_tests_old/test_internal_api.py"
      "tests/pytest_tests/unit_tests_old/test_metric_internal.py"
      "tests/pytest_tests/unit_tests_old/test_public_api.py"
      "tests/pytest_tests/unit_tests_old/test_runtime.py"
      "tests/pytest_tests/unit_tests_old/test_sender.py"
      "tests/pytest_tests/unit_tests_old/test_summary.py"
      "tests/pytest_tests/unit_tests_old/test_tb_watcher.py"
      "tests/pytest_tests/unit_tests_old/test_time_resolution.py"
      "tests/pytest_tests/unit_tests_old/test_wandb_agent.py"
      "tests/pytest_tests/unit_tests_old/test_wandb_integration.py"
      "tests/pytest_tests/unit_tests_old/test_wandb_run.py"
      "tests/pytest_tests/unit_tests_old/test_wandb.py"
      "tests/pytest_tests/unit_tests_old/tests_launch/test_launch_aws.py"
      "tests/pytest_tests/unit_tests_old/tests_launch/test_launch_cli.py"
      "tests/pytest_tests/unit_tests_old/tests_launch/test_launch_docker.py"
      "tests/pytest_tests/unit_tests_old/tests_launch/test_launch.py"
      "tests/pytest_tests/unit_tests/test_cli.py"
      "tests/pytest_tests/unit_tests/test_data_types.py"
      "tests/pytest_tests/unit_tests/test_internal_api.py"
      "tests/pytest_tests/unit_tests/test_mode_disabled.py"
      "tests/pytest_tests/unit_tests/test_model_workflows.py"
      "tests/pytest_tests/unit_tests/test_plots.py"
      "tests/pytest_tests/unit_tests/test_public_api.py"
      "tests/pytest_tests/unit_tests/test_sender.py"
      "tests/pytest_tests/unit_tests/test_util.py"
      "tests/pytest_tests/unit_tests/test_wandb_verify.py"

      # Requires docker access
      "tests/pytest_tests/system_tests/test_artifacts/test_artifact_saver.py"
      "tests/pytest_tests/system_tests/test_artifacts/test_misc.py"
      "tests/pytest_tests/system_tests/test_artifacts/test_misc2.py"
      "tests/pytest_tests/system_tests/test_artifacts/test_object_references.py"
      "tests/pytest_tests/system_tests/test_artifacts/test_wandb_artifacts_full.py"
      "tests/pytest_tests/system_tests/test_artifacts/test_wandb_artifacts.py"
      "tests/pytest_tests/system_tests/test_core/test_cli_full.py"
      "tests/pytest_tests/system_tests/test_core/test_data_types_full.py"
      "tests/pytest_tests/system_tests/test_core/test_file_stream_internal.py"
      "tests/pytest_tests/system_tests/test_core/test_file_upload.py"
      "tests/pytest_tests/system_tests/test_core/test_footer.py"
      "tests/pytest_tests/system_tests/test_core/test_keras_full.py"
      "tests/pytest_tests/system_tests/test_core/test_label_full.py"
      "tests/pytest_tests/system_tests/test_core/test_metric_full.py"
      "tests/pytest_tests/system_tests/test_core/test_metric_internal.py"
      "tests/pytest_tests/system_tests/test_core/test_mode_disabled_full.py"
      "tests/pytest_tests/system_tests/test_core/test_model_workflow.py"
      "tests/pytest_tests/system_tests/test_core/test_mp_full.py"
      "tests/pytest_tests/system_tests/test_core/test_public_api.py"
      "tests/pytest_tests/system_tests/test_core/test_redir_full.py"
      "tests/pytest_tests/system_tests/test_core/test_report_api.py"
      "tests/pytest_tests/system_tests/test_core/test_save_policies.py"
      "tests/pytest_tests/system_tests/test_core/test_sender.py"
      "tests/pytest_tests/system_tests/test_core/test_start_method.py"
      "tests/pytest_tests/system_tests/test_core/test_system_info.py"
      "tests/pytest_tests/system_tests/test_core/test_tb_watcher.py"
      "tests/pytest_tests/system_tests/test_core/test_telemetry_full.py"
      "tests/pytest_tests/system_tests/test_core/test_time_resolution.py"
      "tests/pytest_tests/system_tests/test_core/test_torch_full.py"
      "tests/pytest_tests/system_tests/test_core/test_validation_data_logger.py"
      "tests/pytest_tests/system_tests/test_core/test_wandb_init.py"
      "tests/pytest_tests/system_tests/test_core/test_wandb_integration.py"
      "tests/pytest_tests/system_tests/test_core/test_wandb_run.py"
      "tests/pytest_tests/system_tests/test_core/test_wandb_settings.py"
      "tests/pytest_tests/system_tests/test_core/test_wandb_tensorflow.py"
      "tests/pytest_tests/system_tests/test_core/test_wandb_verify.py"
      "tests/pytest_tests/system_tests/test_core/test_wandb.py"
      "tests/pytest_tests/system_tests/test_importers/test_import_mlflow.py"
      "tests/pytest_tests/system_tests/test_launch/test_github_reference.py"
      "tests/pytest_tests/system_tests/test_launch/test_job_status_tracker.py"
      "tests/pytest_tests/system_tests/test_launch/test_job.py"
      "tests/pytest_tests/system_tests/test_launch/test_launch_add.py"
      "tests/pytest_tests/system_tests/test_launch/test_launch_cli.py"
      "tests/pytest_tests/system_tests/test_launch/test_launch_kubernetes.py"
      "tests/pytest_tests/system_tests/test_launch/test_launch_local_container.py"
      "tests/pytest_tests/system_tests/test_launch/test_launch_run.py"
      "tests/pytest_tests/system_tests/test_launch/test_launch_sagemaker.py"
      "tests/pytest_tests/system_tests/test_launch/test_launch_sweep_cli.py"
      "tests/pytest_tests/system_tests/test_launch/test_launch_sweep.py"
      "tests/pytest_tests/system_tests/test_launch/test_launch_vertex.py"
      "tests/pytest_tests/system_tests/test_launch/test_launch.py"
      "tests/pytest_tests/system_tests/test_launch/test_wandb_reference.py"
      "tests/pytest_tests/system_tests/test_nexus/test_nexus.py"
      "tests/pytest_tests/system_tests/test_sweep/test_public_api.py"
      "tests/pytest_tests/system_tests/test_sweep/test_sweep_scheduler.py"
      "tests/pytest_tests/system_tests/test_sweep/test_sweep_utils.py"
      "tests/pytest_tests/system_tests/test_sweep/test_wandb_agent_full.py"
      "tests/pytest_tests/system_tests/test_sweep/test_wandb_agent.py"
      "tests/pytest_tests/system_tests/test_sweep/test_wandb_sweep.py"
      "tests/pytest_tests/system_tests/test_system_metrics/test_open_metrics.py"
      "tests/pytest_tests/system_tests/test_system_metrics/test_system_monitor.py"

      # Tries to access /homeless-shelter
      "tests/pytest_tests/unit_tests/test_tables.py"

      # E       AssertionError: assert 'Cannot use both --async and --queue with wandb launch' in 'wandb: ERROR Find detailed error logs at: /build/source/wandb/debug-cli.nixbld.log\nError: The wandb service process exited with 1. Ensure that `sys.executable` is a valid python interpreter. You can override it with the `_executable` setting or with the `WANDB__EXECUTABLE` environment variable.\n'
      # E        +  where 'wandb: ERROR Find detailed error logs at: /build/source/wandb/debug-cli.nixbld.log\nError: The wandb service process exited with 1. Ensure that `sys.executable` is a valid python interpreter. You can override it with the `_executable` setting or with the `WANDB__EXECUTABLE` environment variable.\n' = <Result SystemExit(1)>.output
      "tests/pytest_tests/unit_tests_old/tests_launch/test_launch_jobs.py"

      # Requires google-cloud-aiplatform which is not packaged as of 2023-04-25.
      "tests/pytest_tests/unit_tests/test_launch/test_runner/test_vertex.py"

      # Requires google-cloud-artifact-registry which is not packaged as of 2023-04-25.
      "tests/pytest_tests/unit_tests/test_launch/test_registry/test_gcp_artifact_registry.py"

      # Requires kfp which is not packaged as of 2023-04-25.
      "tests/pytest_tests/system_tests/test_core/test_kfp.py"

      # Requires kubernetes_asyncio which is not packaged as of 2024-01-14.
      "tests/pytest_tests/unit_tests/test_launch/test_builder/test_kaniko.py"
      "tests/pytest_tests/unit_tests/test_launch/test_runner/test_kubernetes.py"
      "tests/pytest_tests/unit_tests/test_launch/test_runner/test_safe_watch.py"

      # Requires metaflow which is not packaged as of 2023-04-25.
      "tests/pytest_tests/unit_tests/test_metaflow.py"

      # Requires tensorflow which is broken as of 2023-09-03
      "tests/pytest_tests/unit_tests/test_keras.py"

      # Try to get hardware information, not possible in the nix build environment
      "tests/pytest_tests/unit_tests/test_system_metrics/test_disk.py"

      # See https://github.com/wandb/wandb/issues/5423
      "tests/pytest_tests/unit_tests/test_docker.py"
      "tests/pytest_tests/unit_tests/test_library_public.py"

      # See https://github.com/wandb/wandb/issues/6836
      "tests/pytest_tests/unit_tests_old/test_logging.py"
    ]
    ++ lib.optionals stdenv.hostPlatform.isLinux [
      # Same as above
      "tests/pytest_tests/unit_tests/test_artifacts/test_storage.py"
    ]
    ++ lib.optionals stdenv.hostPlatform.isDarwin [
      # Same as above
      "tests/pytest_tests/unit_tests/test_lib/test_filesystem.py"
  disabledTestPaths = [
    # Require docker access
    "tests/release_tests/test_launch"
    "tests/system_tests"
  ];

  disabledTests =
    [
      # Timing sensitive
      "test_login_timeout"

      # Tensorflow 2.13 is too old for the current version of keras
      # ModuleNotFoundError: No module named 'keras.api._v2'
      "test_saved_model_keras"
      "test_sklearn_saved_model"
      "test_pytorch_saved_model"
      "test_tensorflow_keras_saved_model"
      # Probably failing because of lack of internet access
      # AttributeError: module 'wandb.sdk.launch.registry' has no attribute 'azure_container_registry'. Did you mean: 'elastic_container_registry'?
      "test_registry_from_uri"

      # Require docker
      "test_get_requirements_section_pyproject"
      "test_local_custom_env"
      "test_local_custom_port"
      "test_local_default"

      # Expects python binary to be named `python3` but nix provides `python3.12`
      # AssertionError: assert ['python3.12', 'main.py'] == ['python3', 'main.py']
      "test_get_entrypoint"

      # Require internet access
      "test_audio_refs"
      "test_bind_image"
      "test_check_cors_configuration"
      "test_check_wandb_version"
      "test_from_path_project_type"
      "test_image_accepts_bounding_boxes"
      "test_image_accepts_bounding_boxes_optional_args"
      "test_image_accepts_masks"
      "test_image_accepts_masks_without_class_labels"
      "test_image_seq_to_json"
      "test_max_images"
      "test_media_keys_escaped_as_glob_for_publish"
      "test_parse_path"
      "test_parse_project_path"
      "test_translates_azure_err_to_normal_err"

      # Tries to access a storage disk but there are none in the sandbox
      # psutil.test_disk_out() returns None
      "test_disk_in"
      "test_disk_out"

      # AssertionError: assert is_available('http://localhost:9400/metrics')
      "test_dcgm"

      # Error in the moviepy package:
      # TypeError: must be real number, not NoneType
      "test_video_numpy_mp4"
    ]
    ++ lib.optionals stdenv.hostPlatform.isDarwin [
      # Disable test that fails on darwin due to issue with python3Packages.psutil:
      # https://github.com/giampaolo/psutil/issues/1219
      "test_tpu_system_stats"
    ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [
      # AssertionError: assert not copy2_mock.called
      "test_copy_or_overwrite_changed_no_copy"

      # Fatal Python error: Aborted
      "test_convert_plots"
      "test_gpu_apple"
      "test_image_from_matplotlib_with_image"
      "test_make_plot_media_from_matplotlib_with_image"
      "test_make_plot_media_from_matplotlib_without_image"
      "test_matplotlib_contains_images"
      "test_matplotlib_image"
      "test_matplotlib_plotly_with_multiple_axes"
      "test_matplotlib_to_plotly"
      "test_plotly_from_matplotlib_with_image"
    ];

  pythonImportsCheck = [ "wandb" ];

  # unmaintainable list of disabled tests
  passthru.skipBulkUpdate = true;

  meta = with lib; {
  meta = {
    description = "CLI and library for interacting with the Weights and Biases API";
    homepage = "https://github.com/wandb/wandb";
    changelog = "https://github.com/wandb/wandb/raw/v${version}/CHANGELOG.md";
    license = licenses.mit;
    maintainers = with maintainers; [ samuela ];
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ samuela ];
    broken = gpu-stats.meta.broken || wandb-core.meta.broken;
  };
}
+21 −21
Original line number Diff line number Diff line
diff --git a/tests/functional_tests/t0_main/kfp/wandb_probe.py b/tests/functional_tests/t0_main/kfp/wandb_probe.py
index 82fadfe1..25c1454c 100644
--- a/tests/functional_tests/t0_main/kfp/wandb_probe.py
+++ b/tests/functional_tests/t0_main/kfp/wandb_probe.py
diff --git a/landfill/functional_tests/kfp/wandb_probe.py b/landfill/functional_tests/kfp/wandb_probe.py
index 86b18a438..23e237e3b 100644
--- a/landfill/functional_tests/kfp/wandb_probe.py
+++ b/landfill/functional_tests/kfp/wandb_probe.py
@@ -5,7 +5,7 @@ import subprocess
 def wandb_probe_package():
     if not os.environ.get("WB_PROBE_PACKAGE"):
@@ -12,19 +12,19 @@ index 82fadfe1..25c1454c 100644
         return
     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
index 1453100cc..9dc468201 100644
--- a/wandb/cli/cli.py
+++ b/wandb/cli/cli.py
@@ -1919,7 +1919,7 @@ def restore(ctx, run, no_git, branch, project, entity):
@@ -2531,7 +2531,7 @@ def restore(ctx, run, no_git, branch, project, entity):
     commit, json_config, patch_content, metadata = api.run_config(
         project, run=run, entity=entity
     )
-    repo = metadata.get("git", {}).get("repo")
+    repo = metadata.get("@git@", {}).get("repo")
     image = metadata.get("docker")
     restore_message = (
         """`wandb restore` needs to be run from the same git repository as the original run.
@@ -1938,7 +1938,7 @@ Run `git clone %s` and restore from there or pass the --no-git flag."""
     restore_message = """`wandb restore` needs to be run from the same git repository as the original run.
 Run `git clone {}` and restore from there or pass the --no-git flag.""".format(repo)
@@ -2547,7 +2547,7 @@ Run `git clone {}` and restore from there or pass the --no-git flag.""".format(r
 
     if commit and api.git.enabled:
         wandb.termlog(f"Fetching origin and finding commit: {commit}")
@@ -33,7 +33,7 @@ index 5767e61c..56009fec 100644
         try:
             api.git.repo.commit(commit)
         except ValueError:
@@ -1992,7 +1992,7 @@ Run `git clone %s` and restore from there or pass the --no-git flag."""
@@ -2604,7 +2604,7 @@ Run `git clone {}` and restore from there or pass the --no-git flag.""".format(r
             # --reject is necessary or else this fails any time a binary file
             # occurs in the diff
             exit_code = subprocess.call(
@@ -42,16 +42,16 @@ index 5767e61c..56009fec 100644
             )
             if exit_code == 0:
                 wandb.termlog("Applied patch")
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
+++ b/wandb/vendor/graphql-core-1.1/wandb_graphql/pyutils/version.py
@@ -67,7 +67,7 @@ def get_git_changeset():
diff --git a/wandb/vendor/promise-2.3.0/wandb_promise/pyutils/version.py b/wandb/vendor/promise-2.3.0/wandb_promise/pyutils/version.py
index 47d439145..16118feb0 100644
--- a/wandb/vendor/promise-2.3.0/wandb_promise/pyutils/version.py
+++ b/wandb/vendor/promise-2.3.0/wandb_promise/pyutils/version.py
@@ -69,7 +69,7 @@ def get_git_changeset():
     repo_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
     try:
         git_log = subprocess.Popen(
-            'git log --pretty=format:%ct --quiet -1 HEAD',
+            '@git@ log --pretty=format:%ct --quiet -1 HEAD',
             stdout=subprocess.PIPE, stderr=subprocess.PIPE,
             shell=True, cwd=repo_dir, universal_newlines=True,
         )
-            "git log --pretty=format:%ct --quiet -1 HEAD",
+            "@git@ log --pretty=format:%ct --quiet -1 HEAD",
             stdout=subprocess.PIPE,
             stderr=subprocess.PIPE,
             shell=True,
+2 −0

File changed.

Preview size limit exceeded, changes collapsed.