uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
154
pkgs/development/python-modules/wandb/default.nix
Normal file
154
pkgs/development/python-modules/wandb/default.nix
Normal file
|
|
@ -0,0 +1,154 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, azure-core
|
||||
, bokeh
|
||||
, buildPythonPackage
|
||||
, click
|
||||
, docker_pycreds
|
||||
, fetchFromGitHub
|
||||
, flask
|
||||
, git
|
||||
, GitPython
|
||||
, jsonref
|
||||
, jsonschema
|
||||
, matplotlib
|
||||
, nbclient
|
||||
, nbformat
|
||||
, pandas
|
||||
, pathtools
|
||||
, promise
|
||||
, protobuf
|
||||
, psutil
|
||||
, pydantic
|
||||
, pytest-mock
|
||||
, pytest-xdist
|
||||
, pytestCheckHook
|
||||
, python-dateutil
|
||||
, pythonOlder
|
||||
, pyyaml
|
||||
, requests
|
||||
, scikit-learn
|
||||
, sentry-sdk
|
||||
, setproctitle
|
||||
, setuptools
|
||||
, shortuuid
|
||||
, substituteAll
|
||||
, tqdm
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "wandb";
|
||||
version = "0.12.17";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = pname;
|
||||
repo = "client";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-hY01cql/j3ieL1zJoPOM/QZiF0X/ivekFRfX+TvZhyM=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(substituteAll {
|
||||
src = ./hardcode-git-path.patch;
|
||||
git = "${lib.getBin git}/bin/git";
|
||||
})
|
||||
];
|
||||
|
||||
# setuptools is necessary since pkg_resources is required at runtime.
|
||||
propagatedBuildInputs = [
|
||||
click
|
||||
docker_pycreds
|
||||
GitPython
|
||||
pathtools
|
||||
promise
|
||||
protobuf
|
||||
psutil
|
||||
python-dateutil
|
||||
pyyaml
|
||||
requests
|
||||
sentry-sdk
|
||||
setproctitle
|
||||
setuptools
|
||||
shortuuid
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
export HOME=$(mktemp -d)
|
||||
'';
|
||||
|
||||
checkInputs = [
|
||||
azure-core
|
||||
bokeh
|
||||
flask
|
||||
jsonref
|
||||
jsonschema
|
||||
matplotlib
|
||||
nbclient
|
||||
nbformat
|
||||
pandas
|
||||
pydantic
|
||||
pytest-mock
|
||||
pytest-xdist
|
||||
pytestCheckHook
|
||||
scikit-learn
|
||||
tqdm
|
||||
];
|
||||
|
||||
disabledTestPaths = [
|
||||
# Tests that try to get chatty over sockets or spin up servers, not possible in the nix build environment.
|
||||
"tests/test_cli.py"
|
||||
"tests/test_data_types.py"
|
||||
"tests/test_file_stream.py"
|
||||
"tests/test_file_upload.py"
|
||||
"tests/test_footer.py"
|
||||
"tests/test_internal_api.py"
|
||||
"tests/test_label_full.py"
|
||||
"tests/test_login.py"
|
||||
"tests/test_meta.py"
|
||||
"tests/test_metric_full.py"
|
||||
"tests/test_metric_internal.py"
|
||||
"tests/test_mode_disabled.py"
|
||||
"tests/test_mp_full.py"
|
||||
"tests/test_public_api.py"
|
||||
"tests/test_redir.py"
|
||||
"tests/test_runtime.py"
|
||||
"tests/test_sender.py"
|
||||
"tests/test_start_method.py"
|
||||
"tests/test_tb_watcher.py"
|
||||
"tests/test_telemetry_full.py"
|
||||
"tests/wandb_agent_test.py"
|
||||
"tests/wandb_artifacts_test.py"
|
||||
"tests/wandb_integration_test.py"
|
||||
"tests/wandb_run_test.py"
|
||||
"tests/wandb_settings_test.py"
|
||||
"tests/wandb_sweep_test.py"
|
||||
"tests/wandb_verify_test.py"
|
||||
"tests/test_model_workflows.py"
|
||||
|
||||
# Fails and borks the pytest runner as well.
|
||||
"tests/wandb_test.py"
|
||||
|
||||
# Tries to access /homeless-shelter
|
||||
"tests/test_tables.py"
|
||||
];
|
||||
|
||||
# Disable test that fails on darwin due to issue with python3Packages.psutil:
|
||||
# https://github.com/giampaolo/psutil/issues/1219
|
||||
disabledTests = lib.optional stdenv.isDarwin [
|
||||
"test_tpu_system_stats"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"wandb"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A CLI and library for interacting with the Weights and Biases API";
|
||||
homepage = "https://github.com/wandb/client";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ samuela ];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
diff --git a/functional_tests/kfp/wandb_probe.py b/functional_tests/kfp/wandb_probe.py
|
||||
index 82fadfe1..25c1454c 100644
|
||||
--- a/functional_tests/kfp/wandb_probe.py
|
||||
+++ b/functional_tests/kfp/wandb_probe.py
|
||||
@@ -5,7 +5,7 @@ import subprocess
|
||||
def wandb_probe_package():
|
||||
if not os.environ.get("WB_PROBE_PACKAGE"):
|
||||
return
|
||||
- s, o = subprocess.getstatusoutput("git rev-parse HEAD")
|
||||
+ s, o = subprocess.getstatusoutput("@git@ rev-parse HEAD")
|
||||
if s:
|
||||
return
|
||||
wandb_local = f"git+https://github.com/wandb/client.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):
|
||||
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.
|
||||
@@ -1764,7 +1764,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"])
|
||||
+ subprocess.check_call(["@git@", "fetch", "--all"])
|
||||
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."""
|
||||
# --reject is necessary or else this fails any time a binary file
|
||||
# occurs in the diff
|
||||
exit_code = subprocess.call(
|
||||
- ["git", "apply", "--reject", patch_rel_path], cwd=root
|
||||
+ ["@git@", "apply", "--reject", patch_rel_path], cwd=root
|
||||
)
|
||||
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
|
||||
+++ b/wandb/sdk/internal/meta.py
|
||||
@@ -125,7 +125,7 @@ class Meta:
|
||||
logger.debug("save patches")
|
||||
try:
|
||||
root = self._git.root
|
||||
- diff_args = ["git", "diff"]
|
||||
+ 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
|
||||
+++ b/wandb/vendor/graphql-core-1.1/wandb_graphql/pyutils/version.py
|
||||
@@ -67,7 +67,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,
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue