Skip to content

Commit

Permalink
Add /checkpoint/_src/path/snapshot/BUILD and /checkpoint/_src/path/BU…
Browse files Browse the repository at this point in the history
…ILD.

PiperOrigin-RevId: 699277104
  • Loading branch information
liangyaning33 authored and Orbax Authors committed Nov 22, 2024
1 parent 5048d35 commit 309c59f
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 1 deletion.
4 changes: 3 additions & 1 deletion BUILD
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
package(default_visibility = ["//visibility:private"])

licenses(["notice"])
exports_files(["LICENSE"])

exports_files(["LICENSE"])
21 changes: 21 additions & 0 deletions checkpoint/orbax/checkpoint/_src/path/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
load("//devtools/python/blaze:pytype.bzl", "pytype_strict_library", pytype_strict_test = "pytype_strict_contrib_test")
load("//devtools/python/blaze:strict.bzl", "py_library_providing_imports_info")

package(
default_applicable_licenses = ["//third_party/py/orbax/checkpoint:package_license"],
default_visibility = [
"//third_party/py/orbax/checkpoint:__subpackages__",
],
)

py_library(
name = "utils",
srcs = ["utils.py"],
srcs_version = "PY3",
)

py_library(
name = "path",
srcs = ["__init__.py"],
lib_rule = pytype_strict_library,
)
30 changes: 30 additions & 0 deletions checkpoint/orbax/checkpoint/_src/path/snapshot/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
load("//devtools/python/blaze:pytype.bzl", "pytype_strict_library")
load("//devtools/python/blaze:strict.bzl", "py_strict_test")

package(
default_applicable_licenses = ["//third_party/py/orbax/checkpoint:package_license"],
default_visibility = [
"//learning/deepmind/jax/roc:__subpackages__",
"//third_party/py/orbax/checkpoint:__subpackages__",
],
)

py_library(
name = "snapshot",
srcs = ["snapshot.py"],
srcs_version = "PY3",
deps = [
"//pyglib:timer",
"//third_party/py/orbax/checkpoint/_src/path:utils",
],
)

py_test(
name = "snapshot_test",
srcs = ["snapshot_test.py"],
srcs_version = "PY3",
deps = [
":snapshot",
"//absl/testing:absltest",
],
)

0 comments on commit 309c59f

Please sign in to comment.