Repository: wandb/wandb (branch: main)
Commit date: 2024-01-05T02:35:47Z

Workflow file: .github/workflows/pre-commit.yml (pre-commit)
name: pre-commit

on:
  pull_request:
  push:
    branches: [main]

jobs:
  pre-commit:
    runs-on: ubuntu-latest
    services:
      pypi_wayback:
        image: ghcr.io/waleko/pypi-wayback
        ports:
          - 8629:8080
    steps:
    - uses: actions/checkout@v3
    - uses: actions/setup-go@v4
      with:
        go-version: '1.21'
    - uses: actions/setup-python@v3
    - name: setup env
      run: |
        ./core/scripts/code-checks.sh update
    - uses: pre-commit/action@v3.0.0
      with:
        extra_args: --hook-stage pre-push --all-files
      env:
        SKIP: go-generate-graphql

env:
  PIP_INDEX_URL: http://localhost:8629/2024-01-05
  UV_INDEX_URL: http://localhost:8629/2024-01-05


Failed build logs:
step_name: pre-commit/6_Run pre-commitaction@v3.0.0.txt
log: ##[group]Run pre-commit/action@v3.0.0
with:
  extra_args: --hook-stage pre-push --all-files
env:
  pythonLocation: /opt/hostedtoolcache/Python/3.12.1/x64
  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.1/x64/lib
  SKIP: go-generate-graphql
##[endgroup]
##[group]Run python -m pip install pre-commit
[36;1mpython -m pip install pre-commit[0m
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  pythonLocation: /opt/hostedtoolcache/Python/3.12.1/x64
  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.1/x64/lib
  SKIP: go-generate-graphql
##[endgroup]
Collecting pre-commit
  Downloading pre_commit-3.6.0-py2.py3-none-any.whl.metadata (1.3 kB)
Collecting cfgv>=2.0.0 (from pre-commit)
  Downloading cfgv-3.4.0-py2.py3-none-any.whl.metadata (8.5 kB)
Collecting identify>=1.0.0 (from pre-commit)
  Downloading identify-2.5.33-py2.py3-none-any.whl.metadata (4.4 kB)
Collecting nodeenv>=0.11.1 (from pre-commit)
  Downloading nodeenv-1.8.0-py2.py3-none-any.whl.metadata (21 kB)
Collecting pyyaml>=5.1 (from pre-commit)
  Downloading PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (2.1 kB)
Collecting virtualenv>=20.10.0 (from pre-commit)
  Downloading virtualenv-20.25.0-py3-none-any.whl.metadata (4.5 kB)
Collecting setuptools (from nodeenv>=0.11.1->pre-commit)
  Downloading setuptools-69.0.3-py3-none-any.whl.metadata (6.3 kB)
Collecting distlib<1,>=0.3.7 (from virtualenv>=20.10.0->pre-commit)
  Downloading distlib-0.3.8-py2.py3-none-any.whl.metadata (5.1 kB)
Collecting filelock<4,>=3.12.2 (from virtualenv>=20.10.0->pre-commit)
  Downloading filelock-3.13.1-py3-none-any.whl.metadata (2.8 kB)
Collecting platformdirs<5,>=3.9.1 (from virtualenv>=20.10.0->pre-commit)
  Downloading platformdirs-4.1.0-py3-none-any.whl.metadata (11 kB)
Downloading pre_commit-3.6.0-py2.py3-none-any.whl (204 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 204.0/204.0 kB 24.9 MB/s eta 0:00:00
Downloading cfgv-3.4.0-py2.py3-none-any.whl (7.2 kB)
Downloading identify-2.5.33-py2.py3-none-any.whl (98 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 98.9/98.9 kB 31.9 MB/s eta 0:00:00
Downloading nodeenv-1.8.0-py2.py3-none-any.whl (22 kB)
Downloading PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (724 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 725.0/725.0 kB 87.3 MB/s eta 0:00:00
Downloading virtualenv-20.25.0-py3-none-any.whl (3.8 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.8/3.8 MB 72.7 MB/s eta 0:00:00
Downloading distlib-0.3.8-py2.py3-none-any.whl (468 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 468.9/468.9 kB 7.7 MB/s eta 0:00:00
Downloading filelock-3.13.1-py3-none-any.whl (11 kB)
Downloading platformdirs-4.1.0-py3-none-any.whl (17 kB)
Downloading setuptools-69.0.3-py3-none-any.whl (819 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 819.5/819.5 kB 91.8 MB/s eta 0:00:00
Installing collected packages: distlib, setuptools, pyyaml, platformdirs, identify, filelock, cfgv, virtualenv, nodeenv, pre-commit
Successfully installed cfgv-3.4.0 distlib-0.3.8 filelock-3.13.1 identify-2.5.33 nodeenv-1.8.0 platformdirs-4.1.0 pre-commit-3.6.0 pyyaml-6.0.1 setuptools-69.0.3 virtualenv-20.25.0
##[group]Run python -m pip freeze --local
[36;1mpython -m pip freeze --local[0m
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  pythonLocation: /opt/hostedtoolcache/Python/3.12.1/x64
  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.1/x64/lib
  SKIP: go-generate-graphql
##[endgroup]
cfgv==3.4.0
distlib==0.3.8
filelock==3.13.1
identify==2.5.33
nodeenv==1.8.0
platformdirs==4.1.0
pre-commit==3.6.0
PyYAML==6.0.1
setuptools==69.0.3
virtualenv==20.25.0
##[group]Run actions/cache@v3
with:
  path: ~/.cache/pre-commit
  key: pre-commit-3|/opt/hostedtoolcache/Python/3.12.1/x64|a333fd88224707918ef5e53726a9b083fdaa934e65d17db828a35f3ab158770e
  enableCrossOsArchive: false
  fail-on-cache-miss: false
  lookup-only: false
env:
  pythonLocation: /opt/hostedtoolcache/Python/3.12.1/x64
  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.1/x64/lib
  SKIP: go-generate-graphql
##[endgroup]
Cache Size: ~47 MB (48931996 B)
[command]/usr/bin/tar -xf /home/runner/work/_temp/d66a1327-5ef6-416a-9696-d11eeb3ab5be/cache.tzst -P -C /home/runner/work/wandb/wandb --use-compress-program unzstd
Cache restored successfully
Cache restored from key: pre-commit-3|/opt/hostedtoolcache/Python/3.12.1/x64|a333fd88224707918ef5e53726a9b083fdaa934e65d17db828a35f3ab158770e
##[group]Run pre-commit run --show-diff-on-failure --color=always --hook-stage pre-push --all-files
[36;1mpre-commit run --show-diff-on-failure --color=always --hook-stage pre-push --all-files[0m
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  pythonLocation: /opt/hostedtoolcache/Python/3.12.1/x64
  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.1/x64/lib
  SKIP: go-generate-graphql
##[endgroup]
clippy...................................................................[42mPassed[m
ruff.....................................................................[41mFailed[m
[2m- hook id: ruff[m
[2m- files were modified by this hook[m

Found 1 error (1 fixed, 0 remaining).

black-jupyter............................................................[41mFailed[m
[2m- hook id: black-jupyter[m
[2m- files were modified by this hook[m

[1mreformatted wandb/integration/ultralytics/callback.py[0m

[1mAll done! ✨ 🍰 ✨[0m
[34m[1m1 file [0m[1mreformatted[0m, [34m887 files [0mleft unchanged.

blacken-docs.............................................................[42mPassed[m
clang-format.............................................................[42mPassed[m
check for merge conflicts................................................[42mPassed[m
trailing-whitespace......................................................[42mPassed[m
end-of-file-fixer........................................................[42mPassed[m
check-yaml...............................................................[42mPassed[m
check-added-large-files..................................................[42mPassed[m
check-shebang-scripts-are-executable.....................................[42mPassed[m
check-executables-have-shebangs..........................................[42mPassed[m
check-symlinks.......................................(no files to check)[46;30mSkipped[m
check-toml...............................................................[42mPassed[m
debug-statements.........................................................[42mPassed[m
forbid-submodules....................................(no files to check)[46;30mSkipped[m
black....................................................................[42mPassed[m
go-generate-proto........................................................[42mPassed[m
go-generate-graphql.....................................................[43;30mSkipped[m
go-fmt...................................................................[42mPassed[m
go-imports...............................................................[42mPassed[m
go-unit-tests............................................................[41mFailed[m
[2m- hook id: go-unit-tests[m
[2m- exit code: 1[m

?   	github.com/wandb/wandb/core/api/graphql	[no test files]
/home/runner/work/wandb/wandb
?   	github.com/wandb/wandb/core/api/proto	[no test files]
/home/runner/work/wandb/wandb
go: downloading google.golang.org/protobuf v1.31.0
go: downloading github.com/segmentio/encoding v0.3.6
go: downloading github.com/Khan/genqlient v0.6.0
go: downloading github.com/go-git/go-git/v5 v5.11.0
go: downloading github.com/segmentio/asm v1.1.3
go: downloading github.com/hashicorp/go-retryablehttp v0.7.4
go: downloading golang.org/x/time v0.5.0
go: downloading github.com/radovskyb/watcher v1.0.7
go: downloading github.com/NVIDIA/go-nvml v0.12.0-1
go: downloading github.com/shirou/gopsutil/v3 v3.23.6
go: downloading github.com/getsentry/sentry-go v0.22.0
go: downloading github.com/vektah/gqlparser/v2 v2.5.1
go: downloading dario.cat/mergo v1.0.0
go: downloading github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371
go: downloading github.com/go-git/go-billy/v5 v5.5.0
go: downloading github.com/sergi/go-diff v1.1.0
go: downloading github.com/hashicorp/go-cleanhttp v0.5.2
go: downloading github.com/tklauser/go-sysconf v0.3.11
go: downloading golang.org/x/sys v0.15.0
go: downloading github.com/cyphar/filepath-securejoin v0.2.4
go: downloading github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376
go: downloading github.com/pjbgf/sha1cd v0.3.0
go: downloading github.com/emirpasic/gods v1.18.1
go: downloading github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99
go: downloading golang.org/x/crypto v0.16.0
go: downloading github.com/tklauser/numcpus v0.6.0
go: downloading golang.org/x/text v0.14.0
go: downloading gopkg.in/warnings.v0 v0.1.2
go: downloading github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da
go: downloading github.com/kevinburke/ssh_config v1.2.0
go: downloading github.com/skeema/knownhosts v1.2.1
go: downloading github.com/xanzy/ssh-agent v0.3.3
go: downloading golang.org/x/net v0.19.0
go: downloading github.com/cloudflare/circl v1.3.3
?   	github.com/wandb/wandb/core/cmd/benchmark	[no test files]
/home/runner/work/wandb/wandb
?   	github.com/wandb/wandb/core/cmd/examples/embed	[no test files]
/home/runner/work/wandb/wandb
?   	github.com/wandb/wandb/core/cmd/wandb-core	[no test files]
/home/runner/work/wandb/wandb
go: downloading github.com/stretchr/testify v1.8.4
go: downloading gopkg.in/yaml.v3 v3.0.1
go: downloading github.com/pmezard/go-difflib v1.0.0
go: downloading github.com/davecgh/go-spew v1.1.1
=== RUN   TestExponentialBackoffWithJitter_NonHTTP429
--- PASS: TestExponentialBackoffWithJitter_NonHTTP429 (0.00s)
=== RUN   TestExponentialBackoffWithJitter_HTTP429
--- PASS: TestExponentialBackoffWithJitter_HTTP429 (0.00s)
=== RUN   TestExponentialBackoffWithJitter_MaxBackoffLimit
--- PASS: TestExponentialBackoffWithJitter_MaxBackoffLimit (0.00s)
=== RUN   TestClientResponseLogger
--- PASS: TestClientResponseLogger (0.00s)
=== RUN   TestDefaultRetryPolicy
=== RUN   TestDefaultRetryPolicy/BadRequest
=== RUN   TestDefaultRetryPolicy/Conflict
=== RUN   TestDefaultRetryPolicy/Unauthorized
=== RUN   TestDefaultRetryPolicy/Forbidden
=== RUN   TestDefaultRetryPolicy/NotFound
=== RUN   TestDefaultRetryPolicy/Other4xxError
--- PASS: TestDefaultRetryPolicy (0.00s)
    --- PASS: TestDefaultRetryPolicy/BadRequest (0.00s)
    --- PASS: TestDefaultRetryPolicy/Conflict (0.00s)
    --- PASS: TestDefaultRetryPolicy/Unauthorized (0.00s)
    --- PASS: TestDefaultRetryPolicy/Forbidden (0.00s)
    --- PASS: TestDefaultRetryPolicy/NotFound (0.00s)
    --- PASS: TestDefaultRetryPolicy/Other4xxError (0.00s)
=== RUN   TestUpsertBucketRetryPolicy
=== RUN   TestUpsertBucketRetryPolicy/Gone
=== RUN   TestUpsertBucketRetryPolicy/Conflict
--- PASS: TestUpsertBucketRetryPolicy (0.00s)
    --- PASS: TestUpsertBucketRetryPolicy/Gone (0.00s)
    --- PASS: TestUpsertBucketRetryPolicy/Conflict (0.00s)
=== RUN   TestCheckRetry
--- PASS: TestCheckRetry (0.00s)
PASS
ok  	github.com/wandb/wandb/core/internal/clients	1.014s
/home/runner/work/wandb/wandb
go: downloading github.com/golang/mock v1.6.0
?   	github.com/wandb/wandb/core/internal/clienttest	[no test files]
/home/runner/work/wandb/wandb
?   	github.com/wandb/wandb/core/internal/corelib	[no test files]
/home/runner/work/wandb/wandb
?   	github.com/wandb/wandb/core/internal/coretest	[no test files]
/home/runner/work/wandb/wandb
=== RUN   TestNewDebouncer
--- PASS: TestNewDebouncer (0.00s)
=== RUN   TestDebouncer
--- PASS: TestDebouncer (0.15s)
PASS
ok  	github.com/wandb/wandb/core/internal/debounce	1.160s
/home/runner/work/wandb/wandb
?   	github.com/wandb/wandb/core/internal/execbin	[no test files]
/home/runner/work/wandb/wandb
=== RUN   TestDefaultFileTransfer_Download
=== RUN   TestDefaultFileTransfer_Download/test_download_file_successfully
--- PASS: TestDefaultFileTransfer_Download (1.71s)
    --- PASS: TestDefaultFileTransfer_Download/test_download_file_successfully (1.71s)
PASS
ok  	github.com/wandb/wandb/core/internal/filetransfer	2.725s
/home/runner/work/wandb/wandb
?   	github.com/wandb/wandb/core/internal/gowandb/internal_runopts	[no test files]
/home/runner/work/wandb/wandb
?   	github.com/wandb/wandb/core/internal/gql	[no test files]
/home/runner/work/wandb/wandb
?   	github.com/wandb/wandb/core/internal/gqltest	[no test files]
/home/runner/work/wandb/wandb
?   	github.com/wandb/wandb/core/internal/launcher	[no test files]
/home/runner/work/wandb/wandb
=== RUN   TestShortID
=== RUN   TestShortID/shortid
--- PASS: TestShortID (0.00s)
    --- PASS: TestShortID/shortid (0.00s)
PASS
ok  	github.com/wandb/wandb/core/internal/shared	1.010s
/home/runner/work/wandb/wandb
?   	github.com/wandb/wandb/core/internal/version	[no test files]
/home/runner/work/wandb/wandb
=== RUN   TestNew
--- PASS: TestNew (0.00s)
=== RUN   TestWatchFile
panic: test timed out after 30s
running tests:
	TestWatchFile (30s)

goroutine 330 [running]:
testing.(*M).startAlarm.func1()
	/opt/hostedtoolcache/go/1.21.5/x64/src/testing/testing.go:2259 +0x259
created by time.goFunc
	/opt/hostedtoolcache/go/1.21.5/x64/src/time/sleep.go:176 +0x45

goroutine 1 [chan receive]:
testing.(*T).Run(0xc0000831e0, {0x74176b, 0xd}, 0x76b8c0)
	/opt/hostedtoolcache/go/1.21.5/x64/src/testing/testing.go:1649 +0x871
testing.runTests.func1(0x0?)
	/opt/hostedtoolcache/go/1.21.5/x64/src/testing/testing.go:2054 +0x85
testing.tRunner(0xc0000831e0, 0xc000191af8)
	/opt/hostedtoolcache/go/1.21.5/x64/src/testing/testing.go:1595 +0x262
testing.runTests(0xc0000ad680?, {0x950fe0, 0x3, 0x3}, {0x445aaa?, 0xd0?, 0x958060?})
	/opt/hostedtoolcache/go/1.21.5/x64/src/testing/testing.go:2052 +0x8ae
testing.(*M).Run(0xc0000ad680)
	/opt/hostedtoolcache/go/1.21.5/x64/src/testing/testing.go:1925 +0xcd8
main.main()
	_testmain.go:53 +0x2be

goroutine 22 [semacquire]:
sync.runtime_Semacquire(0xc0000d18a8?)
	/opt/hostedtoolcache/go/1.21.5/x64/src/runtime/sema.go:62 +0x25
sync.(*WaitGroup).Wait(0xc0000d18a0)
	/opt/hostedtoolcache/go/1.21.5/x64/src/sync/waitgroup.go:116 +0xa5
github.com/wandb/wandb/core/internal/watcher_test.TestWatchFile(0xc0000836c0)
	/home/runner/work/wandb/wandb/core/internal/watcher/watcher_test.go:76 +0x49a
testing.tRunner(0xc0000836c0, 0x76b8c0)
	/opt/hostedtoolcache/go/1.21.5/x64/src/testing/testing.go:1595 +0x262
created by testing.(*T).Run in goroutine 1
	/opt/hostedtoolcache/go/1.21.5/x64/src/testing/testing.go:1648 +0x846

goroutine 23 [sleep]:
time.Sleep(0x5f5e100)
	/opt/hostedtoolcache/go/1.21.5/x64/src/runtime/time.go:195 +0x125
github.com/radovskyb/watcher.(*Watcher).Start(0xc0000d6f00, 0x5f5e100)
	/home/runner/go/pkg/mod/github.com/radovskyb/watcher@v1.0.7/watcher.go:608 +0x1db
github.com/wandb/wandb/core/internal/watcher.(*Watcher).Start.func1()
	/home/runner/work/wandb/wandb/core/internal/watcher/watcher.go:130 +0x45
created by github.com/wandb/wandb/core/internal/watcher.(*Watcher).Start in goroutine 22
	/home/runner/work/wandb/wandb/core/internal/watcher/watcher.go:129 +0x8e

goroutine 25 [select]:
github.com/wandb/wandb/core/internal/watcher.(*Watcher).watch(0xc0000d4660)
	/home/runner/work/wandb/wandb/core/internal/watcher/watcher.go:62 +0x245
github.com/wandb/wandb/core/internal/watcher.(*Watcher).Start.func2()
	/home/runner/work/wandb/wandb/core/internal/watcher/watcher.go:145 +0x145
created by github.com/wandb/wandb/core/internal/watcher.(*Watcher).Start in goroutine 22
	/home/runner/work/wandb/wandb/core/internal/watcher/watcher.go:142 +0x1e5
FAIL	github.com/wandb/wandb/core/internal/watcher	30.012s
FAIL
unit tests failed

go-vet...................................................................[42mPassed[m
golangci-lint............................................................[42mPassed[m
go-critic................................................................[42mPassed[m
go-cyclo.................................................................[42mPassed[m
go-mod-tidy..............................................................[42mPassed[m
go-build.................................................................[42mPassed[m
pre-commit hook(s) made changes.
If you are seeing this message in CI, reproduce locally with: `pre-commit run --all-files`.
To run `pre-commit` as part of git workflow, use `pre-commit install`.
All changes made by hooks:
[1mdiff --git a/wandb/integration/ultralytics/bbox_utils.py b/wandb/integration/ultralytics/bbox_utils.py[m
[1mindex 798aa57..9cee915 100644[m
[1m--- a/wandb/integration/ultralytics/bbox_utils.py[m
[1m+++ b/wandb/integration/ultralytics/bbox_utils.py[m
[36m@@ -3,6 +3,7 @@[m [mfrom typing import Any, Dict, List, Optional, Tuple, Union[m
 import torch[m
 from ultralytics.engine.results import Results[m
 from ultralytics.models.yolo.detect import DetectionPredictor[m
[32m+[m
 try:[m
     from ultralytics.yolo.utils import ops[m
 except ModuleNotFoundError:[m
[1mdiff --git a/wandb/integration/ultralytics/callback.py b/wandb/integration/ultralytics/callback.py[m
[1mindex ed8a224..618fc5a 100644[m
[1m--- a/wandb/integration/ultralytics/callback.py[m
[1m+++ b/wandb/integration/ultralytics/callback.py[m
[36m@@ -42,6 +42,7 @@[m [mtry:[m
         SegmentationValidator,[m
     )[m
     from ultralytics.utils.torch_utils import de_parallel[m
[32m+[m
     try:[m
         from ultralytics.yolo.utils import RANK, __version__[m
     except ModuleNotFoundError:[m
##[error]Process completed with exit code 1.


Changed files:
tests/pytest_tests/system_tests/test_core/test_sync_tb.py
wandb/integration/ultralytics/bbox_utils.py
wandb/integration/ultralytics/callback.py

Fix diff:
diff --git a/tests/pytest_tests/system_tests/test_core/test_sync_tb.py b/tests/pytest_tests/system_tests/test_core/test_sync_tb.py
index d913b91c1..6c989d3f2 100644
--- a/tests/pytest_tests/system_tests/test_core/test_sync_tb.py
+++ b/tests/pytest_tests/system_tests/test_core/test_sync_tb.py
@@ -15,6 +15,7 @@ def create_model():
     )
 
 
+@pytest.mark.xfail(reason="flaky test, depends on an external service")
 def test_sync_tensorboard(relay_server, wandb_init):
     with relay_server() as relay:
         run = wandb_init(sync_tensorboard=True)
diff --git a/wandb/integration/ultralytics/bbox_utils.py b/wandb/integration/ultralytics/bbox_utils.py
index 798aa573a..9cee9157d 100644
--- a/wandb/integration/ultralytics/bbox_utils.py
+++ b/wandb/integration/ultralytics/bbox_utils.py
@@ -3,6 +3,7 @@ from typing import Any, Dict, List, Optional, Tuple, Union
 import torch
 from ultralytics.engine.results import Results
 from ultralytics.models.yolo.detect import DetectionPredictor
+
 try:
     from ultralytics.yolo.utils import ops
 except ModuleNotFoundError:
diff --git a/wandb/integration/ultralytics/callback.py b/wandb/integration/ultralytics/callback.py
index ed8a22465..618fc5aff 100644
--- a/wandb/integration/ultralytics/callback.py
+++ b/wandb/integration/ultralytics/callback.py
@@ -42,6 +42,7 @@ try:
         SegmentationValidator,
     )
     from ultralytics.utils.torch_utils import de_parallel
+
     try:
         from ultralytics.yolo.utils import RANK, __version__
     except ModuleNotFoundError: