Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions dgf/src/api/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ py_library(
":analyse",
":convert",
":data",
":deploy",
":exception",
":filesystem",
":generate",
Expand Down Expand Up @@ -205,3 +206,11 @@ py_library(
"//dgf/src/analyse:sampling",
],
)

py_library(
name = "deploy",
srcs = ["deploy.py"],
deps = [
"//dgf/src/deploy:vertex",
],
)
1 change: 1 addition & 0 deletions dgf/src/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
from dgf.src.api import jax
from dgf.src.api import exception
from dgf.src.api import print
from dgf.src.api import deploy

# TODO(gbm): Remove this alias. Instead, users have to do "from dgf import beam".
from dgf.src.api import beam
19 changes: 19 additions & 0 deletions dgf/src/api/deploy.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2022 Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""API exports for deployment modules."""

# pylint: disable=unused-import,g-importing-member,g-import-not-at-top,g-bad-import-order,reimported,disable=attribute-error

from dgf.src.deploy.vertex import to_vertex_ai
49 changes: 49 additions & 0 deletions dgf/src/deploy/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
load("@rules_python//python:py_library.bzl", "py_library")
load("@rules_python//python:py_test.bzl", "py_test")

package(

default_visibility = ["//visibility:public"],
)

py_library(
name = "vertex",
srcs = ["vertex.py"],
deps = [
"//dgf/src/learning/ten_lines:common",
"//dgf/src/util:filesystem",
"//dgf/src/util:log",
"//dgf/src/util/weak_dep:weak_dep_tensorflow",
# google/cloud/aiplatform dep,
# yaml dep,
],
)

py_test(
name = "vertex_test",
srcs = ["vertex_test.py"],
shard_count = 5,
deps = [
":vertex",
# absl/testing:absltest dep,
"//dgf/src/learning/ten_lines:common",
"//dgf/src/util/weak_dep:weak_dep_tensorflow",
# yaml dep,
],
)

py_test(
name = "vertex_integration_test",
srcs = ["vertex_integration_test.py"],
tags = [
"manual",
"notap",
],
deps = [
":vertex",
# absl/testing:absltest dep,
# absl/testing:parameterized dep,
"//dgf/src/learning/ten_lines:node_prediction",
"//dgf/src/util:gen_test_graph",
],
)
15 changes: 15 additions & 0 deletions dgf/src/deploy/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2022 Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Deploy package."""
Loading
Loading