• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Description:
2#   Low-level utilities for reading and writing checkpoints.
3
4load("//tensorflow:tensorflow.bzl", "tf_py_test")
5
6package(
7    default_visibility = [
8        "//tensorflow:internal",
9    ],
10    licenses = ["notice"],
11)
12
13py_library(
14    name = "checkpoint_options",
15    srcs = ["checkpoint_options.py"],
16    srcs_version = "PY3",
17    deps = [
18        "//tensorflow/python:util",
19        "//tensorflow/python/checkpoint:checkpoint_options",
20        "//tensorflow/python/util:tf_export",
21    ],
22)
23
24py_library(
25    name = "functional_saver",
26    srcs = ["functional_saver.py"],
27    srcs_version = "PY3",
28    deps = [
29        ":checkpoint_options",
30        ":saveable_object",
31        ":saveable_object_util",
32        "//tensorflow/python:util",
33        "//tensorflow/python/checkpoint:functional_saver",
34        "//tensorflow/python/eager:def_function",
35        "//tensorflow/python/saved_model/registration",
36    ],
37)
38
39py_library(
40    name = "saveable_object",
41    srcs = ["saveable_object.py"],
42    srcs_version = "PY3",
43)
44
45py_library(
46    name = "saveable_object_util",
47    srcs = ["saveable_object_util.py"],
48    srcs_version = "PY3",
49    deps = [
50        ":saveable_object",
51        "//tensorflow/python:resource_variable_ops",
52        "//tensorflow/python:variables",
53        "//tensorflow/python/checkpoint:saveable_compat",
54        "//tensorflow/python/trackable:base",
55        "//tensorflow/python/trackable:python_state",
56        "//tensorflow/python/trackable:trackable_utils",
57        "//tensorflow/python/types",
58        "//tensorflow/python/util:tf_export",
59    ],
60)
61
62tf_py_test(
63    name = "saveable_object_util_test",
64    srcs = ["saveable_object_util_test.py"],
65    deps = [
66        ":saveable_object_util",
67        "//tensorflow/python:resource_variable_ops",
68        "//tensorflow/python:variables",
69        "//tensorflow/python/checkpoint",
70        "//tensorflow/python/checkpoint:saveable_compat",
71        "//tensorflow/python/eager:context",
72        "//tensorflow/python/eager:test",
73        "//tensorflow/python/framework:dtypes",
74        "//tensorflow/python/framework:ops",
75        "//tensorflow/python/trackable:base",
76        "//tensorflow/python/trackable:resource",
77    ],
78)
79