Skip to content

Commit 2a7e309

Browse files
liangyaning33Orbax Authors
authored andcommitted
Add orbax/checkpoint/_src/logging/BUILD and updated logging dependency to the updated build target.
PiperOrigin-RevId: 715154137
1 parent 94408bb commit 2a7e309

File tree

4 files changed

+85
-0
lines changed

4 files changed

+85
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package(
2+
default_applicable_licenses = ["//:package_license"],
3+
default_visibility = ["//visibility:public"],
4+
)
5+
6+
py_library(
7+
name = "asyncio_utils",
8+
srcs = ["asyncio_utils.py"],
9+
)
10+
11+
py_test(
12+
name = "asyncio_utils_test",
13+
srcs = ["asyncio_utils_test.py"],
14+
deps = [":asyncio_utils"],
15+
)
16+
17+
py_library(
18+
name = "composite",
19+
srcs = ["composite.py"],
20+
)
21+
22+
py_test(
23+
name = "composite_test",
24+
srcs = ["composite_test.py"],
25+
deps = [":composite"],
26+
)
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
package(
2+
default_applicable_licenses = ["//:package_license"],
3+
default_visibility = ["//visibility:public"],
4+
)
5+
6+
py_library(
7+
name = "abstract_logger",
8+
srcs = ["abstract_logger.py"],
9+
)
10+
11+
py_library(
12+
name = "step_statistics",
13+
srcs = ["step_statistics.py"],
14+
)
15+
16+
py_library(
17+
name = "cloud_logger",
18+
srcs = ["cloud_logger.py"],
19+
deps = [":abstract_logger"],
20+
)
21+
22+
py_test(
23+
name = "cloud_logger_test",
24+
srcs = ["cloud_logger_test.py"],
25+
deps = [":cloud_logger"],
26+
)
27+
28+
py_library(
29+
name = "standard_logger",
30+
srcs = ["standard_logger.py"],
31+
deps = [":abstract_logger"],
32+
)
33+
34+
py_test(
35+
name = "standard_logger_test",
36+
srcs = ["standard_logger_test.py"],
37+
deps = [":standard_logger"],
38+
)
39+
40+
py_library(
41+
name = "composite_logger",
42+
srcs = ["composite_logger.py"],
43+
deps = [":abstract_logger"],
44+
)
45+
46+
py_test(
47+
name = "composite_logger_test",
48+
srcs = ["composite_logger_test.py"],
49+
deps = [
50+
":abstract_logger",
51+
":cloud_logger",
52+
":composite_logger",
53+
":standard_logger",
54+
],
55+
)

checkpoint/orbax/checkpoint/_src/metadata/BUILD

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ py_test(
6262
py_library(
6363
name = "checkpoint",
6464
srcs = ["checkpoint.py"],
65+
deps = ["//checkpoint/orbax/checkpoint/_src/logging:step_statistics"],
6566
)
6667

6768
py_test(
@@ -71,6 +72,7 @@ py_test(
7172
":checkpoint",
7273
":root_metadata_serialization",
7374
":step_metadata_serialization",
75+
"//checkpoint/orbax/checkpoint/_src/logging:step_statistics",
7476
],
7577
)
7678

@@ -89,6 +91,7 @@ py_library(
8991
deps = [
9092
":checkpoint",
9193
":metadata_serialization_utils",
94+
"//checkpoint/orbax/checkpoint/_src/logging:step_statistics",
9295
],
9396
)
9497

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ etils[epath]
2020
simplejson
2121
chex
2222
optax
23+
mock
2324
nest_asyncio
2425
tensorstore
2526
humanize

0 commit comments

Comments
 (0)