diff --git a/cmake/oneflow.cmake b/cmake/oneflow.cmake index 8989a2d7e59c5d03afe1a42a7b49e68625d26128..7497afa5095941dba1ded7beb6960ad619d32a68 100644 --- a/cmake/oneflow.cmake +++ b/cmake/oneflow.cmake @@ -298,10 +298,9 @@ add_custom_target(of_pyscript_copy ALL COMMAND rm -rf ${of_pyscript_dir}/oneflow/python COMMAND rm -rf ${of_pyscript_dir}/oneflow/compatible COMMAND ${CMAKE_COMMAND} -E create_symlink "${PROJECT_SOURCE_DIR}/oneflow/python" "${of_pyscript_dir}/oneflow/python" - COMMAND ${CMAKE_COMMAND} -E copy_directory "${PROJECT_SOURCE_DIR}/oneflow/compatible_single_client_python" "${of_pyscript_dir}/oneflow/compatible/single_client/python" COMMAND "${CMAKE_COMMAND}" -E copy "${PROJECT_SOURCE_DIR}/oneflow/single_client_init.py" "${of_pyscript_dir}/oneflow/compatible/single_client/__init__.py" - COMMAND ${Python_EXECUTABLE} "${PROJECT_SOURCE_DIR}/tools/conver_single_client_name_space.py" "${of_pyscript_dir}/oneflow/compatible" + COMMAND ${CMAKE_COMMAND} -E create_symlink "${PROJECT_SOURCE_DIR}/oneflow/compatible_single_client_python" "${of_pyscript_dir}/oneflow/compatible/single_client/python" COMMAND ${CMAKE_COMMAND} -E touch "${of_pyscript_dir}/oneflow/compatible/__init__.py" COMMAND "${CMAKE_COMMAND}" -E copy "${PROJECT_SOURCE_DIR}/oneflow/single_client_main.py" "${of_pyscript_dir}/oneflow/compatible/single_client/__main__.py" diff --git a/oneflow/compatible_single_client_python/advanced/distribute_ops.py b/oneflow/compatible_single_client_python/advanced/distribute_ops.py index 09d61c6a76e9b31f52830c12be7ab2b000adb6b8..52628293488f55f7dd01d151ed8b3cca595208c7 100644 --- a/oneflow/compatible_single_client_python/advanced/distribute_ops.py +++ b/oneflow/compatible_single_client_python/advanced/distribute_ops.py @@ -20,16 +20,16 @@ from oneflow.compatible.single_client.core.operator import op_conf_pb2 as op_con from oneflow.compatible.single_client.core.register import ( logical_blob_id_pb2 as logical_blob_id_util, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( interpret_util as interpret_util, ) -from oneflow.compatible_single_client_python.framework import id_util as id_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import id_util as id_util +from oneflow.compatible.single_client.python.framework import ( remote_blob as remote_blob_util, ) -from oneflow.compatible_single_client_python.framework import hob as hob -from oneflow.compatible_single_client_python.lib.core import enable_if as enable_if -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.framework import hob as hob +from oneflow.compatible.single_client.python.lib.core import enable_if as enable_if +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export from typing import Union, Tuple, List, Optional, Sequence, Callable import oneflow._oneflow_internal diff --git a/oneflow/compatible_single_client_python/autograd/autograd.py b/oneflow/compatible_single_client_python/autograd/autograd.py index c095a9e801cbc8f8f5850be287f625317db1f4ea..df06e6a1c9885300962023fa2569dfe7daec27e5 100644 --- a/oneflow/compatible_single_client_python/autograd/autograd.py +++ b/oneflow/compatible_single_client_python/autograd/autograd.py @@ -16,9 +16,9 @@ limitations under the License. from typing import Union, Sequence, Tuple -from oneflow.compatible_single_client_python.framework.tensor import Tensor -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export -from oneflow.compatible_single_client_python.framework.tensor_tuple_util import ( +from oneflow.compatible.single_client.python.framework.tensor import Tensor +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.framework.tensor_tuple_util import ( convert_to_tensor_tuple, ) from oneflow._oneflow_internal import TensorTuple diff --git a/oneflow/compatible_single_client_python/contrib/tensorrt/tensorrt_api.py b/oneflow/compatible_single_client_python/contrib/tensorrt/tensorrt_api.py index 2394aeadf108e682667f0c30e4c7b873ab94714d..e354f5305d1857b0f9049ab0ab6beb07ab0d7944 100644 --- a/oneflow/compatible_single_client_python/contrib/tensorrt/tensorrt_api.py +++ b/oneflow/compatible_single_client_python/contrib/tensorrt/tensorrt_api.py @@ -16,7 +16,7 @@ limitations under the License. from __future__ import absolute_import import traceback -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export import oneflow._oneflow_internal diff --git a/oneflow/compatible_single_client_python/deprecated/init_cluster_env.py b/oneflow/compatible_single_client_python/deprecated/init_cluster_env.py index c668eadb86fc277cb8318b2b0681a099ce5e90a1..8367579a5680f5a78b853e69c1a46b89f0422081 100644 --- a/oneflow/compatible_single_client_python/deprecated/init_cluster_env.py +++ b/oneflow/compatible_single_client_python/deprecated/init_cluster_env.py @@ -22,12 +22,12 @@ import uuid from tempfile import NamedTemporaryFile from google.protobuf import text_format as pbtxt -from oneflow.compatible_single_client_python.framework import env_util as env_util +from oneflow.compatible.single_client.python.framework import env_util as env_util from oneflow.compatible.single_client.core.job.env_pb2 import EnvProto from oneflow.compatible.single_client.core.control.ctrl_bootstrap_pb2 import ( BootstrapConf, ) -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export import subprocess diff --git a/oneflow/compatible_single_client_python/deprecated/initializer_util.py b/oneflow/compatible_single_client_python/deprecated/initializer_util.py index 33b434f2c7d7b52ad7617a411b0ac3e02cced50f..9b1bc362a2b0b177888fb67f30000b65bb49d487 100644 --- a/oneflow/compatible_single_client_python/deprecated/initializer_util.py +++ b/oneflow/compatible_single_client_python/deprecated/initializer_util.py @@ -22,7 +22,7 @@ from oneflow.compatible.single_client.core.operator import op_conf_pb2 as op_con from oneflow.compatible.single_client.core.job import ( initializer_conf_pb2 as initializer_conf_util, ) -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export @oneflow_export("truncated_normal") diff --git a/oneflow/compatible_single_client_python/eager/boxing_hob.py b/oneflow/compatible_single_client_python/eager/boxing_hob.py index f56534880f4db397aa58d5e9a4964efe679de17b..9e8bf5d7c3c37e2bb958ae4e36084d746926d269 100644 --- a/oneflow/compatible_single_client_python/eager/boxing_hob.py +++ b/oneflow/compatible_single_client_python/eager/boxing_hob.py @@ -15,13 +15,13 @@ limitations under the License. """ from __future__ import absolute_import -from oneflow.compatible_single_client_python.lib.core.high_order_bool import ( +from oneflow.compatible.single_client.python.lib.core.high_order_bool import ( bool_functor, ) -from oneflow.compatible_single_client_python.lib.core.high_order_bool import ( +from oneflow.compatible.single_client.python.lib.core.high_order_bool import ( hob_context_attr, ) -from oneflow.compatible_single_client_python.lib.core.high_order_bool import BoolFunctor +from oneflow.compatible.single_client.python.lib.core.high_order_bool import BoolFunctor import oneflow._oneflow_internal diff --git a/oneflow/compatible_single_client_python/eager/boxing_middle.py b/oneflow/compatible_single_client_python/eager/boxing_middle.py index a4586bd13dfd2b3507654aefac4e8c095bfeac53..3ba66fab977b90e64a77dea0fd188cc94be82ce3 100644 --- a/oneflow/compatible_single_client_python/eager/boxing_middle.py +++ b/oneflow/compatible_single_client_python/eager/boxing_middle.py @@ -15,7 +15,7 @@ limitations under the License. """ from __future__ import absolute_import -from oneflow.compatible_single_client_python.eager import symbol as symbol_util +from oneflow.compatible.single_client.python.eager import symbol as symbol_util from oneflow.compatible.single_client.core.job import ( sbp_parallel_pb2 as sbp_parallel_pb, ) diff --git a/oneflow/compatible_single_client_python/eager/boxing_util.py b/oneflow/compatible_single_client_python/eager/boxing_util.py index 0f5e5dc62ec087ffe09cf53487d8e3dc1acd4bed..ba8026cd7aeaa12151b1f61c5ce06cfce6b7381b 100644 --- a/oneflow/compatible_single_client_python/eager/boxing_util.py +++ b/oneflow/compatible_single_client_python/eager/boxing_util.py @@ -16,7 +16,7 @@ limitations under the License. from __future__ import absolute_import from contextlib import contextmanager -from oneflow.compatible_single_client_python.eager import symbol as symbol_util +from oneflow.compatible.single_client.python.eager import symbol as symbol_util from oneflow.compatible.single_client.core.operator import op_conf_pb2 as op_conf_pb from oneflow.compatible.single_client.core.operator import ( op_attribute_pb2 as op_attribute_pb, @@ -24,22 +24,22 @@ from oneflow.compatible.single_client.core.operator import ( from oneflow.compatible.single_client.core.job import ( sbp_parallel_pb2 as sbp_parallel_pb, ) -from oneflow.compatible_single_client_python.framework import id_util as id_util -from oneflow.compatible_single_client_python.framework import c_api_util as c_api_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import id_util as id_util +from oneflow.compatible.single_client.python.framework import c_api_util as c_api_util +from oneflow.compatible.single_client.python.framework import ( balanced_splitter as balanced_splitter, ) -from oneflow.compatible_single_client_python.lib.core import enable_if as enable_if -from oneflow.compatible_single_client_python.lib.core import ( +from oneflow.compatible.single_client.python.lib.core import enable_if as enable_if +from oneflow.compatible.single_client.python.lib.core import ( high_order_bool as high_order_bool, ) from oneflow.compatible.single_client.core.register import ( logical_blob_id_pb2 as logical_blob_id_util, ) -from oneflow.compatible_single_client_python.eager import boxing_hob as boxing_hob -from oneflow.compatible_single_client_python.eager import op_infer_util as op_infer_util -from oneflow.compatible_single_client_python.eager.boxing_hob import BoxingHobContext -from oneflow.compatible_single_client_python.eager import boxing_middle as boxing_middle +from oneflow.compatible.single_client.python.eager import boxing_hob as boxing_hob +from oneflow.compatible.single_client.python.eager import op_infer_util as op_infer_util +from oneflow.compatible.single_client.python.eager.boxing_hob import BoxingHobContext +from oneflow.compatible.single_client.python.eager import boxing_middle as boxing_middle import random from oneflow.compatible import single_client as flow from oneflow._oneflow_internal.oneflow.core.job import placement as placement_cfg diff --git a/oneflow/compatible_single_client_python/eager/eager_blob_util.py b/oneflow/compatible_single_client_python/eager/eager_blob_util.py index 400d6e88189d1502d0ffd25f4eab168ddb712cbe..3131096250b0b9258ad44edaa808325fca8a75cd 100644 --- a/oneflow/compatible_single_client_python/eager/eager_blob_util.py +++ b/oneflow/compatible_single_client_python/eager/eager_blob_util.py @@ -15,14 +15,14 @@ limitations under the License. """ from __future__ import absolute_import -from oneflow.compatible_single_client_python.framework.dtype import ( +from oneflow.compatible.single_client.python.framework.dtype import ( convert_proto_dtype_to_oneflow_dtype, ) -from oneflow.compatible_single_client_python.framework import blob_trait as blob_trait -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import blob_trait as blob_trait +from oneflow.compatible.single_client.python.framework import ( python_callback as python_callback, ) -from oneflow.compatible_single_client_python.lib.core import async_util as async_util +from oneflow.compatible.single_client.python.lib.core import async_util as async_util import oneflow._oneflow_internal diff --git a/oneflow/compatible_single_client_python/eager/gradient_util.py b/oneflow/compatible_single_client_python/eager/gradient_util.py index dcd40eaef80b8cffdf06a013578c09daeb778605..cd83e9eddc663b32d535b808dcbed0585548e125 100644 --- a/oneflow/compatible_single_client_python/eager/gradient_util.py +++ b/oneflow/compatible_single_client_python/eager/gradient_util.py @@ -15,7 +15,7 @@ limitations under the License. """ from __future__ import absolute_import -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( session_context as session_ctx, ) diff --git a/oneflow/compatible_single_client_python/eager/interpreter_callback.py b/oneflow/compatible_single_client_python/eager/interpreter_callback.py index d387c7449243fb1234658d06fbaa70f9adc1d65d..4295829ee25c69fc8856e2d0462ad1e2a31c31cd 100644 --- a/oneflow/compatible_single_client_python/eager/interpreter_callback.py +++ b/oneflow/compatible_single_client_python/eager/interpreter_callback.py @@ -15,16 +15,16 @@ limitations under the License. """ from __future__ import absolute_import -from oneflow.compatible_single_client_python.eager import gradient_util as gradient_util -from oneflow.compatible_single_client_python.eager import op_executor as op_executor +from oneflow.compatible.single_client.python.eager import gradient_util as gradient_util +from oneflow.compatible.single_client.python.eager import op_executor as op_executor from oneflow.compatible.single_client.core.operator import ( op_attribute_pb2 as op_attribute_pb, ) from oneflow.compatible.single_client.core.job import scope_pb2 as scope_pb from oneflow.compatible.single_client.core.job import placement_pb2 as placement_pb from google.protobuf import text_format -from oneflow.compatible_single_client_python.framework import scope_util as scope_util -from oneflow.compatible_single_client_python.eager import ( +from oneflow.compatible.single_client.python.framework import scope_util as scope_util +from oneflow.compatible.single_client.python.eager import ( symbol_storage as symbol_storage, ) import oneflow._oneflow_internal diff --git a/oneflow/compatible_single_client_python/eager/op_executor.py b/oneflow/compatible_single_client_python/eager/op_executor.py index 2dd4045cf6d8ed5c1e034743c87e4a6a05db78bf..98ad05a16a6e0cdb7c3fd65e01962150da76c70f 100644 --- a/oneflow/compatible_single_client_python/eager/op_executor.py +++ b/oneflow/compatible_single_client_python/eager/op_executor.py @@ -25,29 +25,29 @@ from oneflow.compatible.single_client.core.operator import op_conf_pb2 as op_con from oneflow.compatible.single_client.core.operator import ( interface_blob_conf_pb2 as inter_face_blob_conf_util, ) -from oneflow.compatible_single_client_python.eager import boxing_util as boxing_util -from oneflow.compatible_single_client_python.eager import ( +from oneflow.compatible.single_client.python.eager import boxing_util as boxing_util +from oneflow.compatible.single_client.python.eager import ( blob_register as blob_register_util, ) -from oneflow.compatible_single_client_python.eager import ( +from oneflow.compatible.single_client.python.eager import ( symbol_storage as symbol_storage, ) -from oneflow.compatible_single_client_python.framework import c_api_util as c_api_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import c_api_util as c_api_util +from oneflow.compatible.single_client.python.framework import ( remote_blob as remote_blob_util, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( python_callback as python_callback, ) -from oneflow.compatible_single_client_python.experimental import ( +from oneflow.compatible.single_client.python.experimental import ( name_scope as name_scope, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( session_context as session_ctx, ) -from oneflow.compatible_single_client_python.framework import scope_util as scope_util -from oneflow.compatible_single_client_python.eager import op_infer_util as op_infer_util -from oneflow.compatible_single_client_python.eager import ( +from oneflow.compatible.single_client.python.framework import scope_util as scope_util +from oneflow.compatible.single_client.python.eager import op_infer_util as op_infer_util +from oneflow.compatible.single_client.python.eager import ( blob_register as blob_register_util, ) from oneflow._oneflow_internal.oneflow.core.job import placement as placement_cfg diff --git a/oneflow/compatible_single_client_python/eager/op_infer_util.py b/oneflow/compatible_single_client_python/eager/op_infer_util.py index 880a1fdf0c3d10ff022b806529fad0990649135e..cbdbcdbcf8cd225424daa8406205259c56915824 100644 --- a/oneflow/compatible_single_client_python/eager/op_infer_util.py +++ b/oneflow/compatible_single_client_python/eager/op_infer_util.py @@ -17,7 +17,7 @@ from __future__ import absolute_import from oneflow.compatible.single_client.core.operator import ( op_node_signature_pb2 as op_node_signature_pb, ) -from oneflow.compatible_single_client_python.framework import c_api_util as c_api_util +from oneflow.compatible.single_client.python.framework import c_api_util as c_api_util from oneflow._oneflow_internal.oneflow.core.operator import ( op_node_signature as op_node_signature_cfg, ) diff --git a/oneflow/compatible_single_client_python/eager/symbol.py b/oneflow/compatible_single_client_python/eager/symbol.py index 72a380c431da6ae22190afbbd323fdb9efaa2cc7..85118667c7e4e83705556b0901bc3fde5dac364f 100644 --- a/oneflow/compatible_single_client_python/eager/symbol.py +++ b/oneflow/compatible_single_client_python/eager/symbol.py @@ -15,7 +15,7 @@ limitations under the License. """ from __future__ import absolute_import -from oneflow.compatible_single_client_python.framework import c_api_util as c_api_util +from oneflow.compatible.single_client.python.framework import c_api_util as c_api_util from oneflow.compatible.single_client.core.job import placement_pb2 as placement_pb import functools diff --git a/oneflow/compatible_single_client_python/experimental/enable_typing_check.py b/oneflow/compatible_single_client_python/experimental/enable_typing_check.py index 062c8846c874942b5a8b8d65054c759f305e12b8..c59de5ffe8a9e399a1269335367b0e47ed4c09ea 100644 --- a/oneflow/compatible_single_client_python/experimental/enable_typing_check.py +++ b/oneflow/compatible_single_client_python/experimental/enable_typing_check.py @@ -15,9 +15,9 @@ limitations under the License. """ from __future__ import absolute_import -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export -from oneflow.compatible_single_client_python.framework import hob as hob -from oneflow.compatible_single_client_python.lib.core import enable_if as enable_if +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.framework import hob as hob +from oneflow.compatible.single_client.python.lib.core import enable_if as enable_if @oneflow_export("experimental.enable_typing_check") diff --git a/oneflow/compatible_single_client_python/experimental/indexed_slices_ops.py b/oneflow/compatible_single_client_python/experimental/indexed_slices_ops.py index b13eb57da87afe83e5649447978bb8b5aa0d69fe..7e9dd4c282f9b7a0a0b6fa7fd3a8c801ff752202 100644 --- a/oneflow/compatible_single_client_python/experimental/indexed_slices_ops.py +++ b/oneflow/compatible_single_client_python/experimental/indexed_slices_ops.py @@ -21,21 +21,21 @@ from oneflow.compatible.single_client.core.operator import op_conf_pb2 as op_con from oneflow.compatible.single_client.core.register import ( logical_blob_id_pb2 as logical_blob_id_util, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( interpret_util as interpret_util, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( distribute as distribute_util, ) -from oneflow.compatible_single_client_python.framework import id_util as id_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import id_util as id_util +from oneflow.compatible.single_client.python.framework import ( input_blob_def as input_blob_util, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( remote_blob as remote_blob_util, ) import oneflow._oneflow_internal -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export from typing import Optional, Tuple diff --git a/oneflow/compatible_single_client_python/experimental/interface_op_read_and_write.py b/oneflow/compatible_single_client_python/experimental/interface_op_read_and_write.py index 95ac989f3d4a2eea4131a856ee3e18673e6b9136..bf0fb08b03d1cc304a615cab9fa0a50ea375722c 100644 --- a/oneflow/compatible_single_client_python/experimental/interface_op_read_and_write.py +++ b/oneflow/compatible_single_client_python/experimental/interface_op_read_and_write.py @@ -17,21 +17,21 @@ from oneflow.compatible import single_client as flow from oneflow.compatible.single_client.core.register import ( logical_blob_id_pb2 as logical_blob_id_util, ) -from oneflow.compatible_single_client_python.lib.core import async_util as async_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.lib.core import async_util as async_util +from oneflow.compatible.single_client.python.framework import ( input_blob_def as input_blob_def_util, ) -from oneflow.compatible_single_client_python.framework import dtype as dtype_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import dtype as dtype_util +from oneflow.compatible.single_client.python.framework import ( remote_blob as remote_blob_util, ) -from oneflow.compatible_single_client_python.framework import push_util as push_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import push_util as push_util +from oneflow.compatible.single_client.python.framework import ( session_context as session_ctx, ) -from oneflow.compatible_single_client_python.framework import runtime_mode as rt_mode -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export -from oneflow.compatible_single_client_python.eager import op_executor as op_executor +from oneflow.compatible.single_client.python.framework import runtime_mode as rt_mode +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.eager import op_executor as op_executor from oneflow._oneflow_internal.oneflow.core.job import placement as placement_cfg from oneflow._oneflow_internal.oneflow.core.register import logical_blob_id as lbi_util from oneflow._oneflow_internal.oneflow.core.common import shape as shape_proto_cfg diff --git a/oneflow/compatible_single_client_python/experimental/load_mnist.py b/oneflow/compatible_single_client_python/experimental/load_mnist.py index 9bd14a3abe737c358d0d0b1d68bc0dcec2929eda..f23b5a0527f3f5a9a85b91e2c861a0e823ce3953 100644 --- a/oneflow/compatible_single_client_python/experimental/load_mnist.py +++ b/oneflow/compatible_single_client_python/experimental/load_mnist.py @@ -19,7 +19,7 @@ import numpy as np from tqdm import tqdm import requests -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export def get_sha256hash(file_path, Bytes=1024): diff --git a/oneflow/compatible_single_client_python/experimental/name_scope.py b/oneflow/compatible_single_client_python/experimental/name_scope.py index 29ced6abec14a3810bf7ce1bc4d8b0ecfbcfffbe..00ca5a732d1aff98c213e7986d4a6aaa92d1f53c 100644 --- a/oneflow/compatible_single_client_python/experimental/name_scope.py +++ b/oneflow/compatible_single_client_python/experimental/name_scope.py @@ -17,11 +17,11 @@ from __future__ import absolute_import from contextlib import contextmanager -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( session_context as session_context, ) -from oneflow.compatible_single_client_python.framework import scope_util as scope_util -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.framework import scope_util as scope_util +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, oneflow_deprecate, ) diff --git a/oneflow/compatible_single_client_python/experimental/square_sum_op.py b/oneflow/compatible_single_client_python/experimental/square_sum_op.py index 8daaa44e5e6a0514ac5e05ec5b7a2149fa86f8b1..90e9484e5aa4ffdc130816bcf361815f15a4c77d 100644 --- a/oneflow/compatible_single_client_python/experimental/square_sum_op.py +++ b/oneflow/compatible_single_client_python/experimental/square_sum_op.py @@ -23,21 +23,21 @@ from oneflow.compatible.single_client.core.operator import op_conf_pb2 as op_con from oneflow.compatible.single_client.core.register import ( logical_blob_id_pb2 as logical_blob_id_util, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( interpret_util as interpret_util, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( distribute as distribute_util, ) -from oneflow.compatible_single_client_python.framework import id_util as id_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import id_util as id_util +from oneflow.compatible.single_client.python.framework import ( input_blob_def as input_blob_util, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( remote_blob as remote_blob_util, ) import oneflow._oneflow_internal -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export from typing import Optional diff --git a/oneflow/compatible_single_client_python/experimental/ssp_variable_proxy_op.py b/oneflow/compatible_single_client_python/experimental/ssp_variable_proxy_op.py index 5f7f14b61dd93bd7f32c882e653152e7136f4b04..17e22f87a5a01ae01731c6ddea1449fab61c7732 100644 --- a/oneflow/compatible_single_client_python/experimental/ssp_variable_proxy_op.py +++ b/oneflow/compatible_single_client_python/experimental/ssp_variable_proxy_op.py @@ -15,11 +15,11 @@ limitations under the License. """ from oneflow.compatible import single_client as flow from typing import Tuple -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.framework import ( remote_blob as remote_blob_util, ) -from oneflow.compatible_single_client_python.framework import id_util as id_util +from oneflow.compatible.single_client.python.framework import id_util as id_util import oneflow._oneflow_internal diff --git a/oneflow/compatible_single_client_python/experimental/unique_op.py b/oneflow/compatible_single_client_python/experimental/unique_op.py index 0f166dcfb5620de8ba278929b808a89a59f72fba..29320b3cf240ee2dbe6712845ef43f0d74425df3 100644 --- a/oneflow/compatible_single_client_python/experimental/unique_op.py +++ b/oneflow/compatible_single_client_python/experimental/unique_op.py @@ -22,20 +22,20 @@ from oneflow.compatible.single_client.core.operator import op_conf_pb2 as op_con from oneflow.compatible.single_client.core.register import ( logical_blob_id_pb2 as logical_blob_id_util, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( interpret_util as interpret_util, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( distribute as distribute_util, ) -from oneflow.compatible_single_client_python.framework import id_util as id_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import id_util as id_util +from oneflow.compatible.single_client.python.framework import ( input_blob_def as input_blob_util, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( remote_blob as remote_blob_util, ) -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export import oneflow._oneflow_internal diff --git a/oneflow/compatible_single_client_python/framework/c_api_util.py b/oneflow/compatible_single_client_python/framework/c_api_util.py index 6000c53a0234a6381799240fba452b7164dc959b..67ed135b76e9ed2924094f3b1c16c27d99982303 100644 --- a/oneflow/compatible_single_client_python/framework/c_api_util.py +++ b/oneflow/compatible_single_client_python/framework/c_api_util.py @@ -39,7 +39,7 @@ from oneflow.compatible.single_client.core.job.inter_user_job_info_pb2 import ( # import oneflow.compatible.single_client as flow from oneflow._oneflow_internal.oneflow.core.job import placement as placement_cfg -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export import oneflow._oneflow_internal diff --git a/oneflow/compatible_single_client_python/framework/check_point.py b/oneflow/compatible_single_client_python/framework/check_point.py index bd359d401bd0a1228d62032b921aa258f261c7ea..1e689de222b4c277595a83a56dac8746ab9a24e5 100644 --- a/oneflow/compatible_single_client_python/framework/check_point.py +++ b/oneflow/compatible_single_client_python/framework/check_point.py @@ -18,22 +18,22 @@ import os import shutil import numpy as np -from oneflow.compatible_single_client_python.framework import hob as hob -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import hob as hob +from oneflow.compatible.single_client.python.framework import ( job_instance as job_instance, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( check_point_v2 as check_point_v2, ) -from oneflow.compatible_single_client_python.framework import config_util as config_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import config_util as config_util +from oneflow.compatible.single_client.python.framework import ( session_context as session_ctx, ) -from oneflow.compatible_single_client_python.lib.core import enable_if as enable_if -from oneflow.compatible_single_client_python.eager import op_executor as op_executor +from oneflow.compatible.single_client.python.lib.core import enable_if as enable_if +from oneflow.compatible.single_client.python.eager import op_executor as op_executor -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export from typing import List, Union diff --git a/oneflow/compatible_single_client_python/framework/check_point_v2.py b/oneflow/compatible_single_client_python/framework/check_point_v2.py index 0b855c031984b839115f4671176b7a7ee6bf707b..01105421bca6ba7c4dc29d65c003effe67740878 100644 --- a/oneflow/compatible_single_client_python/framework/check_point_v2.py +++ b/oneflow/compatible_single_client_python/framework/check_point_v2.py @@ -21,40 +21,40 @@ from google.protobuf import text_format from oneflow.compatible import single_client as flow import oneflow._oneflow_internal from oneflow.compatible.single_client.core.operator import op_conf_pb2 as op_conf_pb -from oneflow.compatible_single_client_python.framework import config_util as config_util -from oneflow.compatible_single_client_python.framework import dtype as dtype_util -from oneflow.compatible_single_client_python.framework import runtime_mode as rt_mode -from oneflow.compatible_single_client_python.ops import ( +from oneflow.compatible.single_client.python.framework import config_util as config_util +from oneflow.compatible.single_client.python.framework import dtype as dtype_util +from oneflow.compatible.single_client.python.framework import runtime_mode as rt_mode +from oneflow.compatible.single_client.python.ops import ( initializer_util as initializer_util, ) from oneflow.compatible.single_client.core.job import ( initializer_conf_pb2 as initializer_conf_util, ) -from oneflow.compatible_single_client_python.framework import id_util as id_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import id_util as id_util +from oneflow.compatible.single_client.python.framework import ( session_context as session_ctx, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( remote_blob as remote_blob_util, ) -from oneflow.compatible_single_client_python.lib.core import async_util as async_util -from oneflow.compatible_single_client_python.eager import boxing_util as boxing_util -from oneflow.compatible_single_client_python.eager import op_infer_util as op_infer_util +from oneflow.compatible.single_client.python.lib.core import async_util as async_util +from oneflow.compatible.single_client.python.eager import boxing_util as boxing_util +from oneflow.compatible.single_client.python.eager import op_infer_util as op_infer_util from oneflow.compatible.single_client.core.framework import ( variable_meta_info_pb2 as variable_meta_info_pb, ) from oneflow.compatible.single_client.core.framework import ( user_op_attr_pb2 as attr_value_pb, ) -from oneflow.compatible_single_client_python.experimental import ( +from oneflow.compatible.single_client.python.experimental import ( interface_op_read_and_write, ) from oneflow.compatible.single_client.core.register import ( logical_blob_id_pb2 as logical_blob_id_util, ) -from oneflow.compatible_single_client_python.ops import get_variable as get_variable +from oneflow.compatible.single_client.python.ops import get_variable as get_variable -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export from oneflow._oneflow_internal.oneflow.core.register import logical_blob_id as lbi_util import oneflow._oneflow_internal from oneflow._oneflow_internal import EagerBlobTrait diff --git a/oneflow/compatible_single_client_python/framework/compile_context.py b/oneflow/compatible_single_client_python/framework/compile_context.py index 012b9d1e2531b296de43d184b6922651b612d470..cb7caf0fef704a863665d52675591c2050ab9fe5 100644 --- a/oneflow/compatible_single_client_python/framework/compile_context.py +++ b/oneflow/compatible_single_client_python/framework/compile_context.py @@ -18,22 +18,22 @@ from __future__ import absolute_import from contextlib import contextmanager from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.experimental import ( +from oneflow.compatible.single_client.python.experimental import ( name_scope as name_scope, ) -from oneflow.compatible_single_client_python.framework import c_api_util as c_api_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import c_api_util as c_api_util +from oneflow.compatible.single_client.python.framework import ( distribute_context as distribute_ctx, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( placement_context as placement_context, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( session_context as session_ctx, ) -from oneflow.compatible_single_client_python.framework import hob as hob -from oneflow.compatible_single_client_python.lib.core import enable_if as enable_if -from oneflow.compatible_single_client_python.experimental import ( +from oneflow.compatible.single_client.python.framework import hob as hob +from oneflow.compatible.single_client.python.lib.core import enable_if as enable_if +from oneflow.compatible.single_client.python.experimental import ( name_scope as name_scope, ) import oneflow._oneflow_internal diff --git a/oneflow/compatible_single_client_python/framework/compiler.py b/oneflow/compatible_single_client_python/framework/compiler.py index 283a95f8a81cc8e1c84661fb0c690ee472aa32e5..2508ec6f9f7b2c52860225f2c1f2b6be1abe004c 100644 --- a/oneflow/compatible_single_client_python/framework/compiler.py +++ b/oneflow/compatible_single_client_python/framework/compiler.py @@ -18,38 +18,38 @@ from __future__ import absolute_import from contextlib import contextmanager import inspect -from oneflow.compatible_single_client_python.framework import c_api_util as c_api_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import c_api_util as c_api_util +from oneflow.compatible.single_client.python.framework import ( distribute as distribute_util, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( input_blob_def as input_blob_util, ) -from oneflow.compatible_single_client_python.framework import hob as hob -from oneflow.compatible_single_client_python.lib.core import enable_if as enable_if -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import hob as hob +from oneflow.compatible.single_client.python.lib.core import enable_if as enable_if +from oneflow.compatible.single_client.python.framework import ( placement_util as placement_util, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( placement_context as placement_ctx, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( remote_blob as remote_blob_util, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( runtime_mode as runtime_mode, ) -from oneflow.compatible_single_client_python.framework import push_util as push_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import push_util as push_util +from oneflow.compatible.single_client.python.framework import ( session_context as session_ctx, ) -from oneflow.compatible_single_client_python.framework import scope_util as scope_util -from oneflow.compatible_single_client_python.framework import typing as oft -from oneflow.compatible_single_client_python.framework import typing_util as oft_util -from oneflow.compatible_single_client_python.lib.core import ( +from oneflow.compatible.single_client.python.framework import scope_util as scope_util +from oneflow.compatible.single_client.python.framework import typing as oft +from oneflow.compatible.single_client.python.framework import typing_util as oft_util +from oneflow.compatible.single_client.python.lib.core import ( func_inspect_util as func_inspect_util, ) -from oneflow.compatible_single_client_python import ops as ops +from oneflow.compatible.single_client.python import ops as ops import typing from oneflow.compatible import single_client as flow import oneflow._oneflow_internal diff --git a/oneflow/compatible_single_client_python/framework/config_util.py b/oneflow/compatible_single_client_python/framework/config_util.py index a64d3e8028d47a310e1a8c6feb47452be30e198d..f3b0163fc1c3de8930a2f1c5bd12accb4acc2c2f 100644 --- a/oneflow/compatible_single_client_python/framework/config_util.py +++ b/oneflow/compatible_single_client_python/framework/config_util.py @@ -15,12 +15,12 @@ limitations under the License. """ from __future__ import absolute_import, print_function -from oneflow.compatible_single_client_python.framework import hob as hob -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import hob as hob +from oneflow.compatible.single_client.python.framework import ( session_context as session_ctx, ) -from oneflow.compatible_single_client_python.lib.core import enable_if as enable_if -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.lib.core import enable_if as enable_if +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export import oneflow._oneflow_internal import traceback diff --git a/oneflow/compatible_single_client_python/framework/distribute.py b/oneflow/compatible_single_client_python/framework/distribute.py index 87105ed17ac099b87a5d0e62761979b6fabea193..549ac7ad92c3de98adc72cabf7c24dc79c68cfa9 100644 --- a/oneflow/compatible_single_client_python/framework/distribute.py +++ b/oneflow/compatible_single_client_python/framework/distribute.py @@ -17,10 +17,10 @@ from __future__ import absolute_import from contextlib import contextmanager -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( distribute_context as distribute_ctx, ) -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, oneflow_deprecate, oneflow_export_value, diff --git a/oneflow/compatible_single_client_python/framework/distribute_context.py b/oneflow/compatible_single_client_python/framework/distribute_context.py index 038f6dece1fe02a6c9801e2ec894b06c25680c83..b1c5f497231de15e1da8a9a0a1f16f5fd038431f 100644 --- a/oneflow/compatible_single_client_python/framework/distribute_context.py +++ b/oneflow/compatible_single_client_python/framework/distribute_context.py @@ -15,10 +15,10 @@ limitations under the License. """ from __future__ import absolute_import -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( session_context as session_ctx, ) -from oneflow.compatible_single_client_python.framework import scope_util as scope_util +from oneflow.compatible.single_client.python.framework import scope_util as scope_util class DistributeStrategy(object): diff --git a/oneflow/compatible_single_client_python/framework/dtype.py b/oneflow/compatible_single_client_python/framework/dtype.py index 6228e97759ff698fe9a94558dbff7ed3b472d112..a1eeacac88516a32e2f900b218cda398a78ae665 100644 --- a/oneflow/compatible_single_client_python/framework/dtype.py +++ b/oneflow/compatible_single_client_python/framework/dtype.py @@ -17,7 +17,7 @@ from __future__ import absolute_import import numpy as np from oneflow.compatible.single_client.core.common import data_type_pb2 as data_type_pb2 -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export from oneflow.compatible import single_client as flow import oneflow._oneflow_internal diff --git a/oneflow/compatible_single_client_python/framework/env_util.py b/oneflow/compatible_single_client_python/framework/env_util.py index 44f81e7acb1d3ce88a253bd19d80a26ab1be2e6e..c868ed03fae3f339b826e587cf82c500a2342227 100644 --- a/oneflow/compatible_single_client_python/framework/env_util.py +++ b/oneflow/compatible_single_client_python/framework/env_util.py @@ -23,18 +23,18 @@ from oneflow.compatible.single_client.core.control import ( ctrl_bootstrap_pb2 as ctrl_bootstrap_pb, ) from oneflow.compatible.single_client.core.job import env_pb2 as env_pb -from oneflow.compatible_single_client_python.framework import c_api_util as c_api_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import c_api_util as c_api_util +from oneflow.compatible.single_client.python.framework import ( placement_context as placement_ctx, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( session_context as session_ctx, ) -from oneflow.compatible_single_client_python.framework import scope_util as scope_util +from oneflow.compatible.single_client.python.framework import scope_util as scope_util from oneflow.compatible.single_client.core.job import resource_pb2 as resource_util -from oneflow.compatible_single_client_python.framework import hob as hob -from oneflow.compatible_single_client_python.lib.core import enable_if as enable_if -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.framework import hob as hob +from oneflow.compatible.single_client.python.lib.core import enable_if as enable_if +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, oneflow_deprecate, ) diff --git a/oneflow/compatible_single_client_python/framework/function_desc.py b/oneflow/compatible_single_client_python/framework/function_desc.py index b37cbcf86c97ca4943fc86c135537b0343735693..2d5787db4f98be8f27408dbc20740008f7c3e7df 100644 --- a/oneflow/compatible_single_client_python/framework/function_desc.py +++ b/oneflow/compatible_single_client_python/framework/function_desc.py @@ -15,16 +15,16 @@ limitations under the License. """ from __future__ import absolute_import -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( session_context as session_ctx, ) -from oneflow.compatible_single_client_python.framework import hob as hob -from oneflow.compatible_single_client_python.lib.core import enable_if as enable_if -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import hob as hob +from oneflow.compatible.single_client.python.lib.core import enable_if as enable_if +from oneflow.compatible.single_client.python.framework import ( session_context as session_ctx, ) from oneflow._oneflow_internal.oneflow.core.job import job_conf as job_conf_cfg -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export import oneflow._oneflow_internal diff --git a/oneflow/compatible_single_client_python/framework/function_util.py b/oneflow/compatible_single_client_python/framework/function_util.py index 8d55780f5ad86e67d2b21de5eebbb162093c41ad..29563603a6a4003bec6accdc279a670b01ba0faf 100644 --- a/oneflow/compatible_single_client_python/framework/function_util.py +++ b/oneflow/compatible_single_client_python/framework/function_util.py @@ -22,30 +22,30 @@ import inspect import traceback from typing import Any, Callable, Optional, Union -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( session_context as session_ctx, ) -from oneflow.compatible_single_client_python.framework import hob as hob -from oneflow.compatible_single_client_python.lib.core import enable_if as enable_if -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.framework import hob as hob +from oneflow.compatible.single_client.python.lib.core import enable_if as enable_if +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, oneflow_deprecate, ) -from oneflow.compatible_single_client_python.framework.function_desc import FunctionDesc -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework.function_desc import FunctionDesc +from oneflow.compatible.single_client.python.framework import ( placement_context as placement_ctx, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( distribute_context as distribute_ctx, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( placement_context as placement_ctx, ) -from oneflow.compatible_single_client_python.framework import typing_util as oft_util -from oneflow.compatible_single_client_python.framework import runtime_mode as rt_mode -from oneflow.compatible_single_client_python.lib.core import pb_util as pb_util -from oneflow.compatible_single_client_python.framework.function_desc import FunctionDesc -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.framework import typing_util as oft_util +from oneflow.compatible.single_client.python.framework import runtime_mode as rt_mode +from oneflow.compatible.single_client.python.lib.core import pb_util as pb_util +from oneflow.compatible.single_client.python.framework.function_desc import FunctionDesc +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export from oneflow._oneflow_internal.oneflow.core.common import data_type as data_type_cfg import oneflow._oneflow_internal import traceback diff --git a/oneflow/compatible_single_client_python/framework/generator.py b/oneflow/compatible_single_client_python/framework/generator.py index 945525fe8deab5e1f95155de0ba815c981ecb874..de7e4ddc5c806156a749594998b8bddc56a94268 100644 --- a/oneflow/compatible_single_client_python/framework/generator.py +++ b/oneflow/compatible_single_client_python/framework/generator.py @@ -16,7 +16,7 @@ limitations under the License. from __future__ import absolute_import from oneflow.compatible import single_client as flow import oneflow._oneflow_internal -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export @oneflow_export("Generator") diff --git a/oneflow/compatible_single_client_python/framework/hob.py b/oneflow/compatible_single_client_python/framework/hob.py index 5b312a81e12c70dcd8b9454b5459f68942ae432c..b128beb44d6b241a4dea8c19bc6fbe18c95f24d7 100644 --- a/oneflow/compatible_single_client_python/framework/hob.py +++ b/oneflow/compatible_single_client_python/framework/hob.py @@ -13,12 +13,12 @@ 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. """ -from oneflow.compatible_single_client_python.framework import runtime_mode as rt_mode -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import runtime_mode as rt_mode +from oneflow.compatible.single_client.python.framework import ( session_context as session_ctx, ) from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.lib.core.high_order_bool import ( +from oneflow.compatible.single_client.python.lib.core.high_order_bool import ( bool_functor, ) import oneflow._oneflow_internal diff --git a/oneflow/compatible_single_client_python/framework/id_util.py b/oneflow/compatible_single_client_python/framework/id_util.py index 87082cb3d0e4a1dbfb42ab69c04de0e0c338e2ca..4adf933532720c100b57d738fe163bfda7d43b06 100644 --- a/oneflow/compatible_single_client_python/framework/id_util.py +++ b/oneflow/compatible_single_client_python/framework/id_util.py @@ -15,7 +15,7 @@ limitations under the License. """ from __future__ import absolute_import -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export import oneflow._oneflow_internal diff --git a/oneflow/compatible_single_client_python/framework/input_blob_def.py b/oneflow/compatible_single_client_python/framework/input_blob_def.py index 55c4dd60c8a952d850832b64b892e83349c6a39d..e3834cc57ee40ba2155156162f183583c0ceb4c6 100644 --- a/oneflow/compatible_single_client_python/framework/input_blob_def.py +++ b/oneflow/compatible_single_client_python/framework/input_blob_def.py @@ -29,21 +29,21 @@ from oneflow.compatible.single_client.core.operator import ( from oneflow.compatible.single_client.core.job import ( sbp_parallel_pb2 as sbp_parallel_pb, ) -from oneflow.compatible_single_client_python.framework import c_api_util as c_api_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import c_api_util as c_api_util +from oneflow.compatible.single_client.python.framework import ( compile_context as compile_context, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( distribute as distribute_util, ) -from oneflow.compatible_single_client_python.framework import id_util as id_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import id_util as id_util +from oneflow.compatible.single_client.python.framework import ( placement_context as placement_ctx, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( remote_blob as remote_blob_util, ) -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export from oneflow._oneflow_internal.oneflow.core.register import logical_blob_id as lbi_util import oneflow._oneflow_internal from functools import reduce diff --git a/oneflow/compatible_single_client_python/framework/interpret_util.py b/oneflow/compatible_single_client_python/framework/interpret_util.py index e9e7632e5830ebabcdc2d39986275baa8a505dc6..f17035edb1de9ed998ea46f5e913c9fb1fa27d73 100644 --- a/oneflow/compatible_single_client_python/framework/interpret_util.py +++ b/oneflow/compatible_single_client_python/framework/interpret_util.py @@ -15,13 +15,13 @@ limitations under the License. """ from __future__ import absolute_import -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( compile_context as compile_ctx, ) -from oneflow.compatible_single_client_python.framework import hob as hob -from oneflow.compatible_single_client_python.lib.core import enable_if as enable_if -from oneflow.compatible_single_client_python.eager import op_executor as op_executor -from oneflow.compatible_single_client_python.eager import gradient_util as gradient_util +from oneflow.compatible.single_client.python.framework import hob as hob +from oneflow.compatible.single_client.python.lib.core import enable_if as enable_if +from oneflow.compatible.single_client.python.eager import op_executor as op_executor +from oneflow.compatible.single_client.python.eager import gradient_util as gradient_util from oneflow.compatible import single_client as flow import oneflow._oneflow_internal diff --git a/oneflow/compatible_single_client_python/framework/job_instance.py b/oneflow/compatible_single_client_python/framework/job_instance.py index 63c9da2eab181e333f9d8c18baf9adcbdd660558..4ec08a51401410bbb227a0fb139b512c649f0944 100644 --- a/oneflow/compatible_single_client_python/framework/job_instance.py +++ b/oneflow/compatible_single_client_python/framework/job_instance.py @@ -18,7 +18,7 @@ from __future__ import absolute_import import sys import traceback -from oneflow.compatible_single_client_python.framework import ofblob as ofblob +from oneflow.compatible.single_client.python.framework import ofblob as ofblob import oneflow._oneflow_internal diff --git a/oneflow/compatible_single_client_python/framework/job_set_util.py b/oneflow/compatible_single_client_python/framework/job_set_util.py index 2ff851bfb5a163098c3eb68e081a4dff7b0a523c..0a916b526f6470513eb1699152a74da40234746b 100644 --- a/oneflow/compatible_single_client_python/framework/job_set_util.py +++ b/oneflow/compatible_single_client_python/framework/job_set_util.py @@ -18,7 +18,7 @@ from __future__ import absolute_import from typing import Optional, TypeVar from oneflow.compatible.single_client.core.job.job_set_pb2 import JobSet -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export _VT = TypeVar("_VT") diff --git a/oneflow/compatible_single_client_python/framework/local_blob.py b/oneflow/compatible_single_client_python/framework/local_blob.py index 8983fd0ce3ae9d403eddf84b197066a33689b23e..8bac97f77d35f040d383d1091b9bba7d3933ae0d 100644 --- a/oneflow/compatible_single_client_python/framework/local_blob.py +++ b/oneflow/compatible_single_client_python/framework/local_blob.py @@ -16,7 +16,7 @@ limitations under the License. from __future__ import absolute_import import numpy as np -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( remote_blob as remote_blob_util, ) import oneflow._oneflow_internal diff --git a/oneflow/compatible_single_client_python/framework/model.py b/oneflow/compatible_single_client_python/framework/model.py index eba5a9b1fff2759c75a576acc6be582e51a5bf38..06e6fc07478affd82b4b5a7bda7e8dfe054b9916 100644 --- a/oneflow/compatible_single_client_python/framework/model.py +++ b/oneflow/compatible_single_client_python/framework/model.py @@ -32,30 +32,30 @@ import inspect import numpy as np import oneflow._oneflow_internal -from oneflow.compatible_single_client_python.framework.check_point_v2 import ( +from oneflow.compatible.single_client.python.framework.check_point_v2 import ( LoadVariables, SaveVarDict, GetCheckpoint, ) -from oneflow.compatible_single_client_python.framework.function_util import ( +from oneflow.compatible.single_client.python.framework.function_util import ( api_oneflow_function, ) -from oneflow.compatible_single_client_python.framework.function_util import ( +from oneflow.compatible.single_client.python.framework.function_util import ( FunctionConfig as ExecutionConfig, ) -from oneflow.compatible_single_client_python.framework.local_blob import LocalBlob -from oneflow.compatible_single_client_python.framework.session_util import ( +from oneflow.compatible.single_client.python.framework.local_blob import LocalBlob +from oneflow.compatible.single_client.python.framework.session_util import ( api_clear_default_session, ) -from oneflow.compatible_single_client_python.framework.tensor import Tensor -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export -from oneflow.compatible_single_client_python.ops.optimizer import Optimizer -from oneflow.compatible_single_client_python.nn.optimizer.optimizer import ( +from oneflow.compatible.single_client.python.framework.tensor import Tensor +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.ops.optimizer import Optimizer +from oneflow.compatible.single_client.python.nn.optimizer.optimizer import ( Optimizer as OOPOptimizer, ) -from oneflow.compatible_single_client_python.framework import typing as oneflow_typing -from oneflow.compatible_single_client_python.framework import dtype as dtype_util +from oneflow.compatible.single_client.python.framework import typing as oneflow_typing +from oneflow.compatible.single_client.python.framework import dtype as dtype_util @oneflow_export("model.DataModule") diff --git a/oneflow/compatible_single_client_python/framework/module.py b/oneflow/compatible_single_client_python/framework/module.py index 6e6fc90803a6145f866a2cae2dd2ff4c70176d86..c6c94748066f17e0e19893d2af97cfd569fc0529 100644 --- a/oneflow/compatible_single_client_python/framework/module.py +++ b/oneflow/compatible_single_client_python/framework/module.py @@ -15,8 +15,8 @@ limitations under the License. """ from __future__ import absolute_import -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export -from oneflow.compatible_single_client_python.framework import id_util as id_util +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.framework import id_util as id_util @oneflow_export("deprecated.nn.Module") diff --git a/oneflow/compatible_single_client_python/framework/ofblob.py b/oneflow/compatible_single_client_python/framework/ofblob.py index 093d644333f860591d3bb11cda2efc3b4ddf85da..710dfa723eef8baf3f6d6619e527bccdcdf725d3 100644 --- a/oneflow/compatible_single_client_python/framework/ofblob.py +++ b/oneflow/compatible_single_client_python/framework/ofblob.py @@ -22,10 +22,10 @@ import numpy as np from oneflow.compatible import single_client as flow import oneflow._oneflow_internal from google.protobuf import text_format -from oneflow.compatible_single_client_python.framework.dtype import ( +from oneflow.compatible.single_client.python.framework.dtype import ( convert_proto_dtype_to_oneflow_dtype, ) -from oneflow.compatible_single_client_python.lib.core.box import Box +from oneflow.compatible.single_client.python.lib.core.box import Box class OfBlob(object): diff --git a/oneflow/compatible_single_client_python/framework/op_expr_util.py b/oneflow/compatible_single_client_python/framework/op_expr_util.py index 79967654447f1358694831d99571559b5bcef645..a6ba21f3bdd8761d2533255c83ba1acbc6f12f30 100644 --- a/oneflow/compatible_single_client_python/framework/op_expr_util.py +++ b/oneflow/compatible_single_client_python/framework/op_expr_util.py @@ -15,7 +15,7 @@ limitations under the License. """ from oneflow.compatible import single_client as flow import oneflow._oneflow_internal -from oneflow.compatible_single_client_python.framework.attr_util import ( +from oneflow.compatible.single_client.python.framework.attr_util import ( convert_to_user_attr_value, ) diff --git a/oneflow/compatible_single_client_python/framework/ops.py b/oneflow/compatible_single_client_python/framework/ops.py index 842d17be6ca61299e41e92007067f25034697e04..a3b9a3ad083f7669b65b519f18bbb06ade92bb00 100644 --- a/oneflow/compatible_single_client_python/framework/ops.py +++ b/oneflow/compatible_single_client_python/framework/ops.py @@ -20,19 +20,19 @@ from oneflow.compatible.single_client.core.operator import op_conf_pb2 as op_con from oneflow.compatible.single_client.core.register import ( logical_blob_id_pb2 as logical_blob_id_util, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( compile_context as compile_context, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( distribute as distribute_util, ) -from oneflow.compatible_single_client_python.framework import id_util as id_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import id_util as id_util +from oneflow.compatible.single_client.python.framework import ( remote_blob as remote_blob_util, ) -from oneflow.compatible_single_client_python.framework import hob as hob -from oneflow.compatible_single_client_python.lib.core import enable_if as enable_if -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.framework import hob as hob +from oneflow.compatible.single_client.python.lib.core import enable_if as enable_if +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, stable_api, ) diff --git a/oneflow/compatible_single_client_python/framework/placement_context.py b/oneflow/compatible_single_client_python/framework/placement_context.py index 4a16e81a5defca972b8034c5a08debaaf32be647..06aeefa6a8754125010519e31ec69aa1546a0116 100644 --- a/oneflow/compatible_single_client_python/framework/placement_context.py +++ b/oneflow/compatible_single_client_python/framework/placement_context.py @@ -19,9 +19,9 @@ import collections import re from oneflow.compatible.single_client.core.job import placement_pb2 as placement_pb -from oneflow.compatible_single_client_python.framework import c_api_util as c_api_util -from oneflow.compatible_single_client_python.framework import op_util as op_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import c_api_util as c_api_util +from oneflow.compatible.single_client.python.framework import op_util as op_util +from oneflow.compatible.single_client.python.framework import ( session_context as session_ctx, ) from oneflow.compatible import single_client as flow diff --git a/oneflow/compatible_single_client_python/framework/placement_util.py b/oneflow/compatible_single_client_python/framework/placement_util.py index 76743e41fc7f84e621a6aced2e1f5794b4169620..5004eb16a85835aa85ec9cbf0663aa289fd36afb 100644 --- a/oneflow/compatible_single_client_python/framework/placement_util.py +++ b/oneflow/compatible_single_client_python/framework/placement_util.py @@ -15,19 +15,19 @@ limitations under the License. """ from __future__ import absolute_import import re -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( placement_context as placement_ctx, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( session_context as session_ctx, ) -from oneflow.compatible_single_client_python.framework import scope_util as scope_util -from oneflow.compatible_single_client_python.framework import hob as hob -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.framework import scope_util as scope_util +from oneflow.compatible.single_client.python.framework import hob as hob +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, oneflow_deprecate, ) -from oneflow.compatible_single_client_python.lib.core import enable_if as enable_if +from oneflow.compatible.single_client.python.lib.core import enable_if as enable_if from oneflow.compatible import single_client as flow import traceback import oneflow._oneflow_internal diff --git a/oneflow/compatible_single_client_python/framework/profiler.py b/oneflow/compatible_single_client_python/framework/profiler.py index cc63035794dbb7ac6a346400fef36f7b17bc925c..9a8b92f0cb1dc41341a1ffc1ce523c2b4725f798 100644 --- a/oneflow/compatible_single_client_python/framework/profiler.py +++ b/oneflow/compatible_single_client_python/framework/profiler.py @@ -15,7 +15,7 @@ limitations under the License. """ from __future__ import absolute_import -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export import oneflow._oneflow_internal diff --git a/oneflow/compatible_single_client_python/framework/pull_util.py b/oneflow/compatible_single_client_python/framework/pull_util.py index 32aff237c278c6fd3579b2324de09e858b6d1fa8..733f40230566480ca821b9618a437faae90548b8 100644 --- a/oneflow/compatible_single_client_python/framework/pull_util.py +++ b/oneflow/compatible_single_client_python/framework/pull_util.py @@ -16,10 +16,10 @@ limitations under the License. from __future__ import absolute_import import threading -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( local_blob as local_blob_util, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( remote_blob as remote_blob_util, ) import oneflow._oneflow_internal diff --git a/oneflow/compatible_single_client_python/framework/push_util.py b/oneflow/compatible_single_client_python/framework/push_util.py index a088b1e40e92f3716dc096a22e30f17152449cb2..af6eff70ccc812b6ab882c08b651503a9ad37be1 100644 --- a/oneflow/compatible_single_client_python/framework/push_util.py +++ b/oneflow/compatible_single_client_python/framework/push_util.py @@ -16,21 +16,21 @@ limitations under the License. from __future__ import absolute_import from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( input_blob_def as input_blob_def, ) -from oneflow.compatible_single_client_python.framework import dtype as dtype_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import dtype as dtype_util +from oneflow.compatible.single_client.python.framework import ( python_callback as python_callback, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( balanced_splitter as balanced_splitter, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( remote_blob as remote_blob_util, ) -from oneflow.compatible_single_client_python.framework import id_util as id_util -from oneflow.compatible_single_client_python.eager import boxing_util as boxing_util +from oneflow.compatible.single_client.python.framework import id_util as id_util +from oneflow.compatible.single_client.python.eager import boxing_util as boxing_util from oneflow.compatible.single_client.core.operator import op_conf_pb2 as op_conf_util from oneflow.compatible.single_client.core.register import ( logical_blob_id_pb2 as logical_blob_id_util, diff --git a/oneflow/compatible_single_client_python/framework/python_callback.py b/oneflow/compatible_single_client_python/framework/python_callback.py index fb04c91fb6b633b9d38f10ef80866cd579b2182e..1ded41f174ecb59e13329b58cf1b6bbd29c11cf0 100644 --- a/oneflow/compatible_single_client_python/framework/python_callback.py +++ b/oneflow/compatible_single_client_python/framework/python_callback.py @@ -17,7 +17,7 @@ from __future__ import absolute_import import traceback -from oneflow.compatible_single_client_python.framework import ofblob as ofblob +from oneflow.compatible.single_client.python.framework import ofblob as ofblob from oneflow._oneflow_internal.oneflow.core.operator import ( op_attribute as op_attribute_cfg, ) diff --git a/oneflow/compatible_single_client_python/framework/register_class_method_util.py b/oneflow/compatible_single_client_python/framework/register_class_method_util.py index 72a8ee072b82ac2be14a3f29bd9949245042eaee..7343c606409bb3430dfa1ef50e01e1d12d7e005c 100644 --- a/oneflow/compatible_single_client_python/framework/register_class_method_util.py +++ b/oneflow/compatible_single_client_python/framework/register_class_method_util.py @@ -13,18 +13,18 @@ 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. """ -from oneflow.compatible_single_client_python.eager import ( +from oneflow.compatible.single_client.python.eager import ( eager_blob_util as eager_blob_util, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( op_expr_util as op_expr_util, ) -from oneflow.compatible_single_client_python.framework import functional as functional -from oneflow.compatible_single_client_python.framework import generator as generator -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import functional as functional +from oneflow.compatible.single_client.python.framework import generator as generator +from oneflow.compatible.single_client.python.framework import ( remote_blob as remote_blob_util, ) -from oneflow.compatible_single_client_python.framework import blob_trait as blob_trait +from oneflow.compatible.single_client.python.framework import blob_trait as blob_trait import oneflow._oneflow_internal diff --git a/oneflow/compatible_single_client_python/framework/register_python_callback.py b/oneflow/compatible_single_client_python/framework/register_python_callback.py index fcd325286a7965d655a638077e658446ee2b4fc3..00ef6039dc0b25d561550b86e6179a2bec687292 100644 --- a/oneflow/compatible_single_client_python/framework/register_python_callback.py +++ b/oneflow/compatible_single_client_python/framework/register_python_callback.py @@ -15,10 +15,10 @@ limitations under the License. """ from __future__ import absolute_import -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( python_callback as python_callback, ) -from oneflow.compatible_single_client_python.eager import ( +from oneflow.compatible.single_client.python.eager import ( interpreter_callback as interpreter_callback, ) import oneflow._oneflow_internal diff --git a/oneflow/compatible_single_client_python/framework/remote_blob.py b/oneflow/compatible_single_client_python/framework/remote_blob.py index 5795f51630d7b8a8b9d9c420047550804b9ad119..068bcf70bfbad07d0a7962c8b94a6ac98cc7aca7 100644 --- a/oneflow/compatible_single_client_python/framework/remote_blob.py +++ b/oneflow/compatible_single_client_python/framework/remote_blob.py @@ -19,22 +19,22 @@ from oneflow.compatible import single_client as flow from oneflow.compatible.single_client.core.register import ( logical_blob_id_pb2 as logical_blob_id_util, ) -from oneflow.compatible_single_client_python.framework import c_api_util as c_api_util -from oneflow.compatible_single_client_python.framework import id_util as id_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import c_api_util as c_api_util +from oneflow.compatible.single_client.python.framework import id_util as id_util +from oneflow.compatible.single_client.python.framework import ( placement_context as placement_ctx, ) -from oneflow.compatible_single_client_python.framework import blob_trait as blob_trait -from oneflow.compatible_single_client_python.framework.dtype import ( +from oneflow.compatible.single_client.python.framework import blob_trait as blob_trait +from oneflow.compatible.single_client.python.framework.dtype import ( convert_proto_dtype_to_oneflow_dtype, ) -from oneflow.compatible_single_client_python.lib.core import enable_if as enable_if -from oneflow.compatible_single_client_python.framework import hob as hob -from oneflow.compatible_single_client_python.eager import ( +from oneflow.compatible.single_client.python.lib.core import enable_if as enable_if +from oneflow.compatible.single_client.python.framework import hob as hob +from oneflow.compatible.single_client.python.eager import ( eager_blob_util as eager_blob_util, ) -from oneflow.compatible_single_client_python.eager import gradient_util as gradient_util -from oneflow.compatible_single_client_python.eager import boxing_util as boxing_util +from oneflow.compatible.single_client.python.eager import gradient_util as gradient_util +from oneflow.compatible.single_client.python.eager import boxing_util as boxing_util from oneflow._oneflow_internal.oneflow.core.job import placement as placement_cfg from oneflow._oneflow_internal.oneflow.core.register import logical_blob_id as lbi_util import oneflow._oneflow_internal diff --git a/oneflow/compatible_single_client_python/framework/scope_symbol.py b/oneflow/compatible_single_client_python/framework/scope_symbol.py index 1cf976910a42938b6358eefe46469b083bab594b..ddc56d07aabe4a59fe2ddad330359313b03ee495 100644 --- a/oneflow/compatible_single_client_python/framework/scope_symbol.py +++ b/oneflow/compatible_single_client_python/framework/scope_symbol.py @@ -15,8 +15,8 @@ limitations under the License. """ from __future__ import absolute_import -from oneflow.compatible_single_client_python.eager.symbol import Symbol -from oneflow.compatible_single_client_python.eager import ( +from oneflow.compatible.single_client.python.eager.symbol import Symbol +from oneflow.compatible.single_client.python.eager import ( symbol_storage as symbol_storage, ) from oneflow._oneflow_internal.oneflow.core.job import scope as scope_cfg diff --git a/oneflow/compatible_single_client_python/framework/scope_util.py b/oneflow/compatible_single_client_python/framework/scope_util.py index 61141b6a18f8124836facd90ca232f5190cbbd77..60ef1d7a7db8a48ae7a7b0a24ec1b08980fabb8b 100644 --- a/oneflow/compatible_single_client_python/framework/scope_util.py +++ b/oneflow/compatible_single_client_python/framework/scope_util.py @@ -14,13 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. """ import traceback -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( session_context as session_ctx, ) -from oneflow.compatible_single_client_python.framework import attr_util as attr_util +from oneflow.compatible.single_client.python.framework import attr_util as attr_util from oneflow._oneflow_internal.oneflow.core.job import job_conf as job_conf_cfg from contextlib import contextmanager -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, oneflow_deprecate, ) diff --git a/oneflow/compatible_single_client_python/framework/session_util.py b/oneflow/compatible_single_client_python/framework/session_util.py index 9e21cee90733ac12517fe5566426be10357d456d..6673d54efa95f7590fd176f7918a23d432f06d04 100644 --- a/oneflow/compatible_single_client_python/framework/session_util.py +++ b/oneflow/compatible_single_client_python/framework/session_util.py @@ -18,43 +18,43 @@ from __future__ import absolute_import import threading from oneflow.compatible.single_client.core.job.job_set_pb2 import ConfigProto from oneflow.compatible.single_client.core.job import job_set_pb2 as job_set_util -from oneflow.compatible_single_client_python.framework import c_api_util as c_api_util -from oneflow.compatible_single_client_python.framework import compiler as compiler -from oneflow.compatible_single_client_python.framework import config_util as config_util -from oneflow.compatible_single_client_python.framework import env_util as env_util -from oneflow.compatible_single_client_python.framework import typing_util as oft_util -from oneflow.compatible_single_client_python.framework import hob as hob -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import c_api_util as c_api_util +from oneflow.compatible.single_client.python.framework import compiler as compiler +from oneflow.compatible.single_client.python.framework import config_util as config_util +from oneflow.compatible.single_client.python.framework import env_util as env_util +from oneflow.compatible.single_client.python.framework import typing_util as oft_util +from oneflow.compatible.single_client.python.framework import hob as hob +from oneflow.compatible.single_client.python.framework import ( job_instance as job_instance_util, ) -from oneflow.compatible_single_client_python.framework import push_util as push_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import push_util as push_util +from oneflow.compatible.single_client.python.framework import ( session_context as session_ctx, ) -from oneflow.compatible_single_client_python.lib.core import enable_if as enable_if -from oneflow.compatible_single_client_python.eager import op_executor as op_executor -from oneflow.compatible_single_client_python.experimental import ( +from oneflow.compatible.single_client.python.lib.core import enable_if as enable_if +from oneflow.compatible.single_client.python.eager import op_executor as op_executor +from oneflow.compatible.single_client.python.experimental import ( interface_op_read_and_write, ) from oneflow.compatible.single_client.core.job.job_set_pb2 import ConfigProto -from oneflow.compatible_single_client_python.framework.function_desc import FunctionDesc -from oneflow.compatible_single_client_python.framework import module as module_util -from oneflow.compatible_single_client_python.framework.pull_util import ( +from oneflow.compatible.single_client.python.framework.function_desc import FunctionDesc +from oneflow.compatible.single_client.python.framework import module as module_util +from oneflow.compatible.single_client.python.framework.pull_util import ( LazyFutureRemoteBlobs, EagerFutureRemoteBlobs, ) -from oneflow.compatible_single_client_python.framework.session_context import ( +from oneflow.compatible.single_client.python.framework.session_context import ( SessionStatus, ) -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, oneflow_deprecate, ) -from oneflow.compatible_single_client_python.framework.function_desc import FunctionDesc -from oneflow.compatible_single_client_python.framework.check_point import ( +from oneflow.compatible.single_client.python.framework.function_desc import FunctionDesc +from oneflow.compatible.single_client.python.framework.check_point import ( SnapshotManager, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( check_point_v2 as check_point_v2, ) from contextlib import contextmanager diff --git a/oneflow/compatible_single_client_python/framework/sysconfig.py b/oneflow/compatible_single_client_python/framework/sysconfig.py index c93189119250bf13a30b8c63b02099724046661c..3039e70d0e317852bc21b9802769a9559c802219 100644 --- a/oneflow/compatible_single_client_python/framework/sysconfig.py +++ b/oneflow/compatible_single_client_python/framework/sysconfig.py @@ -20,7 +20,7 @@ import imp import importlib.util from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export from typing import List import oneflow._oneflow_internal diff --git a/oneflow/compatible_single_client_python/framework/tensor.py b/oneflow/compatible_single_client_python/framework/tensor.py index e18381355571398ddc75369c0714d44b087b1b2f..a3dbb8b6a9c317688557589d2f26ca8401ccd98e 100644 --- a/oneflow/compatible_single_client_python/framework/tensor.py +++ b/oneflow/compatible_single_client_python/framework/tensor.py @@ -16,8 +16,8 @@ limitations under the License. from oneflow.compatible.single_client.core.job import ( initializer_conf_pb2 as initializer_conf_util, ) -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.framework import ( remote_blob as remote_blob_util, ) import oneflow._oneflow_internal @@ -25,21 +25,21 @@ import numpy as np import inspect from typing import Union from oneflow._oneflow_internal.oneflow.core.job import placement as placement_cfg -from oneflow.compatible_single_client_python.framework import id_util as id_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import id_util as id_util +from oneflow.compatible.single_client.python.framework import ( check_point_v2 as check_point_v2, ) -from oneflow.compatible_single_client_python.framework.function_util import ( +from oneflow.compatible.single_client.python.framework.function_util import ( global_function_or_identity, ) -from oneflow.compatible_single_client_python.framework import runtime_mode as rt_mode -from oneflow.compatible_single_client_python.framework import ofblob as ofblob_util -from oneflow.compatible_single_client_python.lib.core import async_util as async_util -from oneflow.compatible_single_client_python.ops import ( +from oneflow.compatible.single_client.python.framework import runtime_mode as rt_mode +from oneflow.compatible.single_client.python.framework import ofblob as ofblob_util +from oneflow.compatible.single_client.python.lib.core import async_util as async_util +from oneflow.compatible.single_client.python.ops import ( initializer_util as initializer_util, ) -from oneflow.compatible_single_client_python.framework import dtype as dtype_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import dtype as dtype_util +from oneflow.compatible.single_client.python.framework import ( tensor_str as tensor_str_util, ) from oneflow.compatible import single_client as flow diff --git a/oneflow/compatible_single_client_python/framework/tensor_tuple_util.py b/oneflow/compatible_single_client_python/framework/tensor_tuple_util.py index 4c7deb582c24eba230860578936ad6cf772c1a32..d19d5f6207ab030723e0bc8e84e5df8d46d92682 100644 --- a/oneflow/compatible_single_client_python/framework/tensor_tuple_util.py +++ b/oneflow/compatible_single_client_python/framework/tensor_tuple_util.py @@ -17,7 +17,7 @@ limitations under the License. import collections from typing import Union, Sequence, Tuple, Optional -from oneflow.compatible_single_client_python.framework.tensor import Tensor as PyTensor +from oneflow.compatible.single_client.python.framework.tensor import Tensor as PyTensor from oneflow._oneflow_internal import TensorTuple, Tensor diff --git a/oneflow/compatible_single_client_python/framework/typing.py b/oneflow/compatible_single_client_python/framework/typing.py index 26dda4dbe40ee3f6a49d1f81f565d28606e7ab96..caa0fa5e46074f0df20d21f58d4a9eccc3302f8d 100644 --- a/oneflow/compatible_single_client_python/framework/typing.py +++ b/oneflow/compatible_single_client_python/framework/typing.py @@ -17,8 +17,8 @@ from __future__ import absolute_import from oneflow.compatible import single_client as flow from typing import Sequence, Optional -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.framework import ( input_blob_def as input_blob_def, ) import typing diff --git a/oneflow/compatible_single_client_python/framework/typing_util.py b/oneflow/compatible_single_client_python/framework/typing_util.py index 5f5f8fa61d77f243cddb69291d21d410afc7abd4..a65181971bebe4f0cedfa064b18dbd9b1e03c87c 100644 --- a/oneflow/compatible_single_client_python/framework/typing_util.py +++ b/oneflow/compatible_single_client_python/framework/typing_util.py @@ -17,15 +17,15 @@ from __future__ import absolute_import import typing import inspect -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( remote_blob as remote_blob_util, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( local_blob as local_blob_util, ) -from oneflow.compatible_single_client_python.framework import pull_util as pull_util -from oneflow.compatible_single_client_python.framework import typing as oft -from oneflow.compatible_single_client_python.experimental import ( +from oneflow.compatible.single_client.python.framework import pull_util as pull_util +from oneflow.compatible.single_client.python.framework import typing as oft +from oneflow.compatible.single_client.python.experimental import ( enable_typing_check as enable_typing_check, ) import oneflow._oneflow_internal diff --git a/oneflow/compatible_single_client_python/framework/unittest.py b/oneflow/compatible_single_client_python/framework/unittest.py index d478c04494e0d103c32196ae3a5a596ae54a4092..5327dbcd84838f988bc33267a1d57f9da09e4d8c 100644 --- a/oneflow/compatible_single_client_python/framework/unittest.py +++ b/oneflow/compatible_single_client_python/framework/unittest.py @@ -26,9 +26,9 @@ import atexit from tempfile import NamedTemporaryFile from google.protobuf import text_format as pbtxt from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.framework import env_util as env_util +from oneflow.compatible.single_client.python.framework import env_util as env_util from oneflow.compatible.single_client.core.job.env_pb2 import EnvProto -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export from typing import Any, Dict, Callable import subprocess diff --git a/oneflow/compatible_single_client_python/framework/watcher.py b/oneflow/compatible_single_client_python/framework/watcher.py index 52841516d718e8d09c882ad8fc8c02ebc548643a..b3ba33dcd2a0b2338271a8a72f4967127deb4be0 100644 --- a/oneflow/compatible_single_client_python/framework/watcher.py +++ b/oneflow/compatible_single_client_python/framework/watcher.py @@ -18,17 +18,17 @@ from __future__ import absolute_import import traceback from oneflow.compatible.single_client.core.record import record_pb2 as record_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( local_blob as local_blob_util, ) -from oneflow.compatible_single_client_python.framework import ofblob as ofblob -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ofblob as ofblob +from oneflow.compatible.single_client.python.framework import ( remote_blob as remote_blob_util, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( session_context as session_ctx, ) -from oneflow.compatible_single_client_python.framework import typing_util as oft_util +from oneflow.compatible.single_client.python.framework import typing_util as oft_util import oneflow._oneflow_internal from google.protobuf import text_format diff --git a/oneflow/compatible_single_client_python/lib/core/box.py b/oneflow/compatible_single_client_python/lib/core/box.py index 92c3cc986592720dbd339248d75a18256d11ac67..6b3ef9cf349d0a17c41fefa640e8a1a4719f2e0a 100644 --- a/oneflow/compatible_single_client_python/lib/core/box.py +++ b/oneflow/compatible_single_client_python/lib/core/box.py @@ -15,7 +15,7 @@ limitations under the License. """ from __future__ import absolute_import -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export class Box(object): diff --git a/oneflow/compatible_single_client_python/lib/core/enable_if.py b/oneflow/compatible_single_client_python/lib/core/enable_if.py index b86e92925af0c4eabe46f430b1592209f2447622..441299a8e5c24d9fb246d08a3c4f054428ffbc2c 100644 --- a/oneflow/compatible_single_client_python/lib/core/enable_if.py +++ b/oneflow/compatible_single_client_python/lib/core/enable_if.py @@ -15,7 +15,7 @@ limitations under the License. """ import inspect -from oneflow.compatible_single_client_python.lib.core import traceinfo as traceinfo +from oneflow.compatible.single_client.python.lib.core import traceinfo as traceinfo def condition(hob_expr): diff --git a/oneflow/compatible_single_client_python/nn/init.py b/oneflow/compatible_single_client_python/nn/init.py index 7f4ccc83b7379cdaa3e0cddcb963b3cfda219a7c..5ad3ae6520b81a58da33b9a5f186666ef607fbfc 100644 --- a/oneflow/compatible_single_client_python/nn/init.py +++ b/oneflow/compatible_single_client_python/nn/init.py @@ -13,8 +13,8 @@ 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. """ -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export -from oneflow.compatible_single_client_python.ops.initializer_util import CalcGain +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.ops.initializer_util import CalcGain @oneflow_export("nn.init.calculate_gain") diff --git a/oneflow/compatible_single_client_python/nn/module.py b/oneflow/compatible_single_client_python/nn/module.py index a8d580b5c2eb8e7a3850ccb32b9c38f99b7cdfbb..26c6b945be15ba38b8a75688b50ddae34c6f90e3 100644 --- a/oneflow/compatible_single_client_python/nn/module.py +++ b/oneflow/compatible_single_client_python/nn/module.py @@ -22,15 +22,15 @@ import itertools import numpy as np from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export -from oneflow.compatible_single_client_python.framework.check_point_v2 import ( +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.framework.check_point_v2 import ( FeedValueToVariable, ) -from oneflow.compatible_single_client_python.framework.function_util import ( +from oneflow.compatible.single_client.python.framework.function_util import ( global_function_or_identity, ) -from oneflow.compatible_single_client_python.framework.tensor import Tensor -from oneflow.compatible_single_client_python.nn.parameter import Parameter +from oneflow.compatible.single_client.python.framework.tensor import Tensor +from oneflow.compatible.single_client.python.nn.parameter import Parameter class _IncompatibleKeys( diff --git a/oneflow/compatible_single_client_python/nn/modules/abs.py b/oneflow/compatible_single_client_python/nn/modules/abs.py index 19c141e1d385fe15b5202151ff1f5e2cb822d4a3..bd550f5042157120d68e6f19f6fd25272a0df83b 100644 --- a/oneflow/compatible_single_client_python/nn/modules/abs.py +++ b/oneflow/compatible_single_client_python/nn/modules/abs.py @@ -15,12 +15,12 @@ limitations under the License. """ from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op class Abs(Module): diff --git a/oneflow/compatible_single_client_python/nn/modules/acos.py b/oneflow/compatible_single_client_python/nn/modules/acos.py index 0e8701cbd1a066cae63e91b08f876eebcd0a8478..ba7390d155f120a989666f0d0496822c01a60ce5 100644 --- a/oneflow/compatible_single_client_python/nn/modules/acos.py +++ b/oneflow/compatible_single_client_python/nn/modules/acos.py @@ -14,12 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. """ from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op class Acos(Module): diff --git a/oneflow/compatible_single_client_python/nn/modules/acosh.py b/oneflow/compatible_single_client_python/nn/modules/acosh.py index d86420e6b5849bc1b3b75a390a14279072011df2..ffec5db1862c164e9a2d5cfeef2d1f1b6eced834 100644 --- a/oneflow/compatible_single_client_python/nn/modules/acosh.py +++ b/oneflow/compatible_single_client_python/nn/modules/acosh.py @@ -15,12 +15,12 @@ limitations under the License. """ from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op -from oneflow.compatible_single_client_python.nn.module import Module +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.nn.module import Module class Acosh(Module): diff --git a/oneflow/compatible_single_client_python/nn/modules/activation.py b/oneflow/compatible_single_client_python/nn/modules/activation.py index 9375be4eb035a808baf3464097e8dfd8c9a8d33f..104657424a5f1ed1359835b5a2f5af8ebe9aa9e5 100644 --- a/oneflow/compatible_single_client_python/nn/modules/activation.py +++ b/oneflow/compatible_single_client_python/nn/modules/activation.py @@ -15,12 +15,12 @@ limitations under the License. """ from oneflow.compatible import single_client as flow import oneflow._oneflow_internal -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op from typing import Optional diff --git a/oneflow/compatible_single_client_python/nn/modules/adaptive_pool.py b/oneflow/compatible_single_client_python/nn/modules/adaptive_pool.py index 425e72a7913716389d17faafa14fced468a0b2bc..49666b92e5e941946cc5a3249499b6c30c9002c9 100644 --- a/oneflow/compatible_single_client_python/nn/modules/adaptive_pool.py +++ b/oneflow/compatible_single_client_python/nn/modules/adaptive_pool.py @@ -14,8 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. """ from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) diff --git a/oneflow/compatible_single_client_python/nn/modules/arange.py b/oneflow/compatible_single_client_python/nn/modules/arange.py index 21ccd4742ed960df1aa57c3b4d0652917e7afece..1b9f9e0aa6ec7e7e157b727d7ff192274d96009d 100644 --- a/oneflow/compatible_single_client_python/nn/modules/arange.py +++ b/oneflow/compatible_single_client_python/nn/modules/arange.py @@ -16,12 +16,12 @@ limitations under the License. from typing import Union from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op class Arange(Module): diff --git a/oneflow/compatible_single_client_python/nn/modules/argmax.py b/oneflow/compatible_single_client_python/nn/modules/argmax.py index d2ca40f5242e4b645ac223e86368c687194e0db9..8e944c397c152f0fce62244f6316e8797e98e843 100644 --- a/oneflow/compatible_single_client_python/nn/modules/argmax.py +++ b/oneflow/compatible_single_client_python/nn/modules/argmax.py @@ -14,13 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. """ from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op -from oneflow.compatible_single_client_python.ops.transpose_util import ( +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.ops.transpose_util import ( get_perm_when_transpose_axis_to_last_dim, get_inversed_perm, ) diff --git a/oneflow/compatible_single_client_python/nn/modules/argsort.py b/oneflow/compatible_single_client_python/nn/modules/argsort.py index e4c3cad4372f0309ba1788748ee08aef9677ed21..cd78efb6cb20716128b5d79d7512d2a03b0c54aa 100644 --- a/oneflow/compatible_single_client_python/nn/modules/argsort.py +++ b/oneflow/compatible_single_client_python/nn/modules/argsort.py @@ -14,13 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. """ from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op -from oneflow.compatible_single_client_python.ops.transpose_util import ( +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.ops.transpose_util import ( get_perm_when_transpose_axis_to_last_dim, get_inversed_perm, ) diff --git a/oneflow/compatible_single_client_python/nn/modules/argwhere.py b/oneflow/compatible_single_client_python/nn/modules/argwhere.py index 72167a45ff6df77b9d427d83cbc9b3ed56312ea4..647148b19b9f5f53907343f8ae43212849dc5f20 100644 --- a/oneflow/compatible_single_client_python/nn/modules/argwhere.py +++ b/oneflow/compatible_single_client_python/nn/modules/argwhere.py @@ -17,12 +17,12 @@ from typing import Optional from oneflow.compatible import single_client as flow import numpy as np -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op class Argwhere(Module): diff --git a/oneflow/compatible_single_client_python/nn/modules/atan2.py b/oneflow/compatible_single_client_python/nn/modules/atan2.py index 7870612fa99d01e9f8fcdfb05814e36a6ef4b706..d55d9bca3bd99b59806dfc39c7ca79e74c2a6c76 100644 --- a/oneflow/compatible_single_client_python/nn/modules/atan2.py +++ b/oneflow/compatible_single_client_python/nn/modules/atan2.py @@ -15,12 +15,12 @@ limitations under the License. """ from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op -from oneflow.compatible_single_client_python.nn.module import Module +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.nn.module import Module class Atan2(Module): diff --git a/oneflow/compatible_single_client_python/nn/modules/atanh.py b/oneflow/compatible_single_client_python/nn/modules/atanh.py index 141b39c50c3a4b7ef06570c47a9a6e43a92edb04..eb64f436e62770c0cc30f7e333c9c2d6ff58cd0b 100644 --- a/oneflow/compatible_single_client_python/nn/modules/atanh.py +++ b/oneflow/compatible_single_client_python/nn/modules/atanh.py @@ -14,12 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. """ from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op class Atanh(Module): diff --git a/oneflow/compatible_single_client_python/nn/modules/batchnorm.py b/oneflow/compatible_single_client_python/nn/modules/batchnorm.py index a860108b4e1702cb7f6b8290879c450956cb2a1c..bbd653bd0fe09d60800bec219e1e2844254deb00 100644 --- a/oneflow/compatible_single_client_python/nn/modules/batchnorm.py +++ b/oneflow/compatible_single_client_python/nn/modules/batchnorm.py @@ -16,11 +16,11 @@ limitations under the License. from typing import Union from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.nn.module import Module +from oneflow.compatible.single_client.python.nn.module import Module class _NormBase(Module): diff --git a/oneflow/compatible_single_client_python/nn/modules/bmm.py b/oneflow/compatible_single_client_python/nn/modules/bmm.py index b552e73c8d4995cacf9336931bccc962d8d196b3..99b971908ee12444db3fdd3e92fbcddecc6eb92d 100644 --- a/oneflow/compatible_single_client_python/nn/modules/bmm.py +++ b/oneflow/compatible_single_client_python/nn/modules/bmm.py @@ -14,12 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. """ from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op class BMM(Module): diff --git a/oneflow/compatible_single_client_python/nn/modules/broadcast_like.py b/oneflow/compatible_single_client_python/nn/modules/broadcast_like.py index e386112e8b09b8a56e5ef8e74638c7c8540e0da9..51ed584208b5da1b57e2778222eb1dc6724bf3a7 100644 --- a/oneflow/compatible_single_client_python/nn/modules/broadcast_like.py +++ b/oneflow/compatible_single_client_python/nn/modules/broadcast_like.py @@ -14,8 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. """ from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) diff --git a/oneflow/compatible_single_client_python/nn/modules/cast.py b/oneflow/compatible_single_client_python/nn/modules/cast.py index b6ea4bf634022920bfdaded83cfedec1779f8e93..c5b12c3d553f337a791568ece72dbc4939eedeb1 100644 --- a/oneflow/compatible_single_client_python/nn/modules/cast.py +++ b/oneflow/compatible_single_client_python/nn/modules/cast.py @@ -14,12 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. """ from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op class Cast(Module): diff --git a/oneflow/compatible_single_client_python/nn/modules/chunk.py b/oneflow/compatible_single_client_python/nn/modules/chunk.py index eed0e2b6dd5cdaf2cc74820b774ec8f323aa9a99..3ad466a6a940fb3f711515deee9d426b0c9ade13 100644 --- a/oneflow/compatible_single_client_python/nn/modules/chunk.py +++ b/oneflow/compatible_single_client_python/nn/modules/chunk.py @@ -16,14 +16,14 @@ limitations under the License. from typing import Optional from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.framework.tensor import Tensor -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.framework.tensor import Tensor +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.ops.array_ops import check_slice_tup_list +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.ops.array_ops import check_slice_tup_list class Chunk(Module): diff --git a/oneflow/compatible_single_client_python/nn/modules/concat.py b/oneflow/compatible_single_client_python/nn/modules/concat.py index 2e17e5cf348d417d96d02b22794e2bbafa009a9b..73cbbe50bcb274528182690bfc754987a8e967c0 100644 --- a/oneflow/compatible_single_client_python/nn/modules/concat.py +++ b/oneflow/compatible_single_client_python/nn/modules/concat.py @@ -14,13 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. """ from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.framework.tensor import Tensor -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.framework.tensor import Tensor +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op from typing import Optional, Sequence diff --git a/oneflow/compatible_single_client_python/nn/modules/constant.py b/oneflow/compatible_single_client_python/nn/modules/constant.py index 51e8126e483bc5356c3f36ab092cb129e54d26ea..40040dedc15cfbb46dfdb6dbefcc36f1a67e9fd7 100644 --- a/oneflow/compatible_single_client_python/nn/modules/constant.py +++ b/oneflow/compatible_single_client_python/nn/modules/constant.py @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. """ from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.nn.common_types import _size_any_t -from oneflow.compatible_single_client_python.nn.modules.utils import _single +from oneflow.compatible.single_client.python.nn.common_types import _size_any_t +from oneflow.compatible.single_client.python.nn.modules.utils import _single from typing import Optional, Union diff --git a/oneflow/compatible_single_client_python/nn/modules/constantpad2d.py b/oneflow/compatible_single_client_python/nn/modules/constantpad2d.py index afb99226799bf70752bb50d28776dc6ed71ecd94..a1ce3a101d30f2c58ef7aacbc5c03dee57c44d5a 100644 --- a/oneflow/compatible_single_client_python/nn/modules/constantpad2d.py +++ b/oneflow/compatible_single_client_python/nn/modules/constantpad2d.py @@ -18,11 +18,11 @@ from __future__ import absolute_import from typing import Union from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.nn.module import Module +from oneflow.compatible.single_client.python.nn.module import Module @oneflow_export("nn.ConstantPad2d") diff --git a/oneflow/compatible_single_client_python/nn/modules/container.py b/oneflow/compatible_single_client_python/nn/modules/container.py index 6e342abb4a16227b408813d613ef653b03d4b223..d0ac5506938b8e78f9723f853bda0ed237fe2570 100644 --- a/oneflow/compatible_single_client_python/nn/modules/container.py +++ b/oneflow/compatible_single_client_python/nn/modules/container.py @@ -20,11 +20,11 @@ from itertools import islice import operator from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.nn.module import Module +from oneflow.compatible.single_client.python.nn.module import Module from typing import ( Any, @@ -55,14 +55,14 @@ class Sequential(Module): >>> import oneflow.compatible.single_client.experimental.nn as nn >>> nn.Sequential(nn.Conv2d(1,20,5), nn.ReLU(), nn.Conv2d(20,64,5), nn.ReLU()) #doctest: +ELLIPSIS - <oneflow.compatible_single_client_python.nn.modules.container.Sequential object at 0x...> + <oneflow.compatible.single_client.python.nn.modules.container.Sequential object at 0x...> >>> nn.Sequential(OrderedDict([ ... ('conv1', nn.Conv2d(1,20,5)), ... ('relu1', nn.ReLU()), ... ('conv2', nn.Conv2d(20,64,5)), ... ('relu2', nn.ReLU()) ... ])) #doctest: +ELLIPSIS - <oneflow.compatible_single_client_python.nn.modules.container.Sequential object at 0x...> + <oneflow.compatible.single_client.python.nn.modules.container.Sequential object at 0x...> """ diff --git a/oneflow/compatible_single_client_python/nn/modules/conv.py b/oneflow/compatible_single_client_python/nn/modules/conv.py index e27e77ab75a9cde518c8b81dd220f0fcdc40b806..aeaf504c7b45b7dcbaef26525be81884366226d0 100644 --- a/oneflow/compatible_single_client_python/nn/modules/conv.py +++ b/oneflow/compatible_single_client_python/nn/modules/conv.py @@ -15,14 +15,14 @@ limitations under the License. """ import math from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.nn.modules.utils import _single, _pair -from oneflow.compatible_single_client_python.nn.common_types import _size_1_t, _size_2_t -from oneflow.compatible_single_client_python.nn import init +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.nn.modules.utils import _single, _pair +from oneflow.compatible.single_client.python.nn.common_types import _size_1_t, _size_2_t +from oneflow.compatible.single_client.python.nn import init def slice(x, begin, size): diff --git a/oneflow/compatible_single_client_python/nn/modules/dataset.py b/oneflow/compatible_single_client_python/nn/modules/dataset.py index f7ac2d38710c687c0dbc98ff425b6ba445a4c344..d4badef51486d5dcd52bdee9430a758ee921c3f7 100644 --- a/oneflow/compatible_single_client_python/nn/modules/dataset.py +++ b/oneflow/compatible_single_client_python/nn/modules/dataset.py @@ -15,18 +15,18 @@ limitations under the License. """ from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.nn.modules.utils import ( +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.nn.modules.utils import ( _single, _pair, _triple, _reverse_repeat_tuple, ) -from oneflow.compatible_single_client_python.nn.common_types import ( +from oneflow.compatible.single_client.python.nn.common_types import ( _size_1_t, _size_2_t, _size_3_t, diff --git a/oneflow/compatible_single_client_python/nn/modules/deconv.py b/oneflow/compatible_single_client_python/nn/modules/deconv.py index f12a4a7f9a523d05f83238c575f044ccd22a4cde..69dccb42cdd415e7d6e1da41c1b8f299075c9f9f 100644 --- a/oneflow/compatible_single_client_python/nn/modules/deconv.py +++ b/oneflow/compatible_single_client_python/nn/modules/deconv.py @@ -15,14 +15,14 @@ limitations under the License. """ import math from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.nn.modules.utils import _pair -from oneflow.compatible_single_client_python.nn.common_types import _size_2_t -from oneflow.compatible_single_client_python.nn import init +from oneflow.compatible.single_client.python.nn.modules.utils import _pair +from oneflow.compatible.single_client.python.nn.common_types import _size_2_t +from oneflow.compatible.single_client.python.nn import init def slice(x, begin, size): diff --git a/oneflow/compatible_single_client_python/nn/modules/dropout.py b/oneflow/compatible_single_client_python/nn/modules/dropout.py index 4de6cd8dc66fc63a843a7d3b89fa19c8b6015a73..d9d4337acfc02521fa3bf17b8dd9e36c46a0c3a1 100644 --- a/oneflow/compatible_single_client_python/nn/modules/dropout.py +++ b/oneflow/compatible_single_client_python/nn/modules/dropout.py @@ -16,12 +16,12 @@ limitations under the License. import sys import random from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.framework import id_util as id_util +from oneflow.compatible.single_client.python.framework import id_util as id_util class _DropoutNd(Module): diff --git a/oneflow/compatible_single_client_python/nn/modules/eq.py b/oneflow/compatible_single_client_python/nn/modules/eq.py index d2045b8512392bb90d73df6e1e34e9c747d12f3c..0381c464044f6e078c1504a53cadc4473c783cbc 100644 --- a/oneflow/compatible_single_client_python/nn/modules/eq.py +++ b/oneflow/compatible_single_client_python/nn/modules/eq.py @@ -14,12 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. """ from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op class Eq(Module): diff --git a/oneflow/compatible_single_client_python/nn/modules/exp.py b/oneflow/compatible_single_client_python/nn/modules/exp.py index b80a4bebffc818fcd87891f41aa57e858b470ba0..9226ff18185df2e7e103f7fce2b0a4053e2c64cb 100644 --- a/oneflow/compatible_single_client_python/nn/modules/exp.py +++ b/oneflow/compatible_single_client_python/nn/modules/exp.py @@ -14,12 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. """ from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op class Exp(Module): diff --git a/oneflow/compatible_single_client_python/nn/modules/expand.py b/oneflow/compatible_single_client_python/nn/modules/expand.py index c4ad53187dc49b092b269e53f62746d4af078b51..90579bb8f080fc6e2de8b86e6f1562cc7fdfe1aa 100644 --- a/oneflow/compatible_single_client_python/nn/modules/expand.py +++ b/oneflow/compatible_single_client_python/nn/modules/expand.py @@ -14,12 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. """ from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op from typing import Optional diff --git a/oneflow/compatible_single_client_python/nn/modules/flatten.py b/oneflow/compatible_single_client_python/nn/modules/flatten.py index 94d8c7e385df853f4eeb580c9152f0014d1e36e2..dc92b4a845f69e140b8ce27432c45255894360a7 100644 --- a/oneflow/compatible_single_client_python/nn/modules/flatten.py +++ b/oneflow/compatible_single_client_python/nn/modules/flatten.py @@ -14,12 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. """ from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op @oneflow_export("nn.Flatten") diff --git a/oneflow/compatible_single_client_python/nn/modules/floor.py b/oneflow/compatible_single_client_python/nn/modules/floor.py index a6c6670a2a29b089e31ec6e1e2bcb64015a2876a..d3b86910e24462ce51321628fa6e04ce959ff154 100644 --- a/oneflow/compatible_single_client_python/nn/modules/floor.py +++ b/oneflow/compatible_single_client_python/nn/modules/floor.py @@ -18,13 +18,13 @@ import collections from typing import Optional, Sequence, Union from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op -from oneflow.compatible_single_client_python.nn.modules.utils import _check_axis +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.nn.modules.utils import _check_axis class Floor(Module): diff --git a/oneflow/compatible_single_client_python/nn/modules/gather.py b/oneflow/compatible_single_client_python/nn/modules/gather.py index a7f020a12343a9f06895e97fa44f2616a952d229..1d59836ce754638b164d80ce4b734af4ec2ddd70 100644 --- a/oneflow/compatible_single_client_python/nn/modules/gather.py +++ b/oneflow/compatible_single_client_python/nn/modules/gather.py @@ -15,13 +15,13 @@ limitations under the License. """ from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.framework.tensor import Tensor -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.framework.tensor import Tensor +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op -from oneflow.compatible_single_client_python.nn.module import Module +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.nn.module import Module from typing import Optional, List, Tuple diff --git a/oneflow/compatible_single_client_python/nn/modules/greater.py b/oneflow/compatible_single_client_python/nn/modules/greater.py index b2896eb8b5b31d65f134f75c64a07a52be2ae8b3..5405b9446fd6e432569a83b1cf7065ae0bcba614 100644 --- a/oneflow/compatible_single_client_python/nn/modules/greater.py +++ b/oneflow/compatible_single_client_python/nn/modules/greater.py @@ -14,12 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. """ from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op class Greater(Module): diff --git a/oneflow/compatible_single_client_python/nn/modules/greater_equal.py b/oneflow/compatible_single_client_python/nn/modules/greater_equal.py index 780faf307e8b520cc05ed043a371f49b65bbbcd1..72a36d203d570e1f5088033e6f0a5180537c1b8f 100644 --- a/oneflow/compatible_single_client_python/nn/modules/greater_equal.py +++ b/oneflow/compatible_single_client_python/nn/modules/greater_equal.py @@ -14,12 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. """ from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op class GreaterEqual(Module): diff --git a/oneflow/compatible_single_client_python/nn/modules/instancenorm.py b/oneflow/compatible_single_client_python/nn/modules/instancenorm.py index 30ddf0a9ee1f60c4b937c48d8e07682688f48af8..ac42dd99f855403eeb15c79e1753daa05b6e0860 100644 --- a/oneflow/compatible_single_client_python/nn/modules/instancenorm.py +++ b/oneflow/compatible_single_client_python/nn/modules/instancenorm.py @@ -15,8 +15,8 @@ limitations under the License. """ from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.nn.modules.batchnorm import _NormBase -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.nn.modules.batchnorm import _NormBase +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) diff --git a/oneflow/compatible_single_client_python/nn/modules/less.py b/oneflow/compatible_single_client_python/nn/modules/less.py index 5e0ef753bccf0cb39444eda337e0b05e531a76fd..795b2751c7acbdea90673dbdaa974ab631d484c0 100644 --- a/oneflow/compatible_single_client_python/nn/modules/less.py +++ b/oneflow/compatible_single_client_python/nn/modules/less.py @@ -14,12 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. """ from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op class Less(Module): diff --git a/oneflow/compatible_single_client_python/nn/modules/less_equal.py b/oneflow/compatible_single_client_python/nn/modules/less_equal.py index 57287dbf33bd01c96d2ae327cc8722ab7d8a7f10..f080db75309064e3ec747b89f6c4f8104061ba58 100644 --- a/oneflow/compatible_single_client_python/nn/modules/less_equal.py +++ b/oneflow/compatible_single_client_python/nn/modules/less_equal.py @@ -14,12 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. """ from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op class LessEqual(Module): diff --git a/oneflow/compatible_single_client_python/nn/modules/linear.py b/oneflow/compatible_single_client_python/nn/modules/linear.py index 28994db2349a35ae212b1672d58e22367651d488..839fb8adc02428d7264c16895ee2c0aca4ccfe46 100644 --- a/oneflow/compatible_single_client_python/nn/modules/linear.py +++ b/oneflow/compatible_single_client_python/nn/modules/linear.py @@ -14,13 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. """ from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.framework.tensor import Tensor -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.nn.init import ( +from oneflow.compatible.single_client.python.framework.tensor import Tensor +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.nn.init import ( _calculate_fan_in_and_fan_out, ) from typing import Optional, List, Tuple diff --git a/oneflow/compatible_single_client_python/nn/modules/log1p.py b/oneflow/compatible_single_client_python/nn/modules/log1p.py index 76e0248686151c13a52d3e1cbd0f2570f363db4e..ef65641a36f17ec276d29b473f385410f7636bd4 100644 --- a/oneflow/compatible_single_client_python/nn/modules/log1p.py +++ b/oneflow/compatible_single_client_python/nn/modules/log1p.py @@ -16,12 +16,12 @@ limitations under the License. from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op class Log1p(Module): diff --git a/oneflow/compatible_single_client_python/nn/modules/loss.py b/oneflow/compatible_single_client_python/nn/modules/loss.py index 0ba45f3cc4f247c219ba97575646be0bb9851722..c6a53fbd902ae31dadcea60801bea7d385863529 100644 --- a/oneflow/compatible_single_client_python/nn/modules/loss.py +++ b/oneflow/compatible_single_client_python/nn/modules/loss.py @@ -16,13 +16,13 @@ limitations under the License. from typing import Optional from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.framework.tensor import Tensor -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.framework.tensor import Tensor +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.nn.modules.constant import _ConstantBase +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.nn.modules.constant import _ConstantBase @oneflow_export("nn.L1Loss") diff --git a/oneflow/compatible_single_client_python/nn/modules/masked_fill.py b/oneflow/compatible_single_client_python/nn/modules/masked_fill.py index 155d69ef0524301e16ad24ce196f852826c77722..0b59683282deba21bd0962bd3e6fa4524b80c46c 100644 --- a/oneflow/compatible_single_client_python/nn/modules/masked_fill.py +++ b/oneflow/compatible_single_client_python/nn/modules/masked_fill.py @@ -14,12 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. """ from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op class MaskedFill(Module): diff --git a/oneflow/compatible_single_client_python/nn/modules/masked_select.py b/oneflow/compatible_single_client_python/nn/modules/masked_select.py index 98c856f38a19dab44947130732f9403a91a7c294..64f4d2f46e976caf2b2827a5f33178cc9192b2a8 100644 --- a/oneflow/compatible_single_client_python/nn/modules/masked_select.py +++ b/oneflow/compatible_single_client_python/nn/modules/masked_select.py @@ -15,13 +15,13 @@ limitations under the License. """ from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op -from oneflow.compatible_single_client_python.ops.array_ops import ( +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.ops.array_ops import ( argwhere, gather, gather_nd, diff --git a/oneflow/compatible_single_client_python/nn/modules/math_ops.py b/oneflow/compatible_single_client_python/nn/modules/math_ops.py index a65a18ca395ce578a152a3028f7c7e3fed3d6591..bdeb4d73273e32fa0026a0a91773207b322260d8 100644 --- a/oneflow/compatible_single_client_python/nn/modules/math_ops.py +++ b/oneflow/compatible_single_client_python/nn/modules/math_ops.py @@ -18,14 +18,14 @@ import collections from typing import Optional, Sequence, Union from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op -from oneflow.compatible_single_client_python.nn.modules.utils import _check_axis -from oneflow.compatible_single_client_python.ops.transpose_util import ( +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.nn.modules.utils import _check_axis +from oneflow.compatible.single_client.python.ops.transpose_util import ( get_perm_when_transpose_axis_to_last_dim, get_inversed_perm, ) diff --git a/oneflow/compatible_single_client_python/nn/modules/matmul.py b/oneflow/compatible_single_client_python/nn/modules/matmul.py index c9815f894ba5501341682623e710b1d899b0070d..f997fc30be3462f0f3493ded6540f41d2f325ea6 100644 --- a/oneflow/compatible_single_client_python/nn/modules/matmul.py +++ b/oneflow/compatible_single_client_python/nn/modules/matmul.py @@ -14,13 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. """ from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op -from oneflow.compatible_single_client_python.framework import id_util as id_util +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.framework import id_util as id_util from typing import Optional, Sequence diff --git a/oneflow/compatible_single_client_python/nn/modules/meshgrid.py b/oneflow/compatible_single_client_python/nn/modules/meshgrid.py index 66c98fc376d1670794aa81f52f949b1499f05659..f010d492fc77995ac14c0655d201090bf63ddb18 100644 --- a/oneflow/compatible_single_client_python/nn/modules/meshgrid.py +++ b/oneflow/compatible_single_client_python/nn/modules/meshgrid.py @@ -14,8 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. """ from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) diff --git a/oneflow/compatible_single_client_python/nn/modules/ne.py b/oneflow/compatible_single_client_python/nn/modules/ne.py index a79c8be3cdec247938a880ae8f8a6d50dc924fa0..477f555a08db77105e245b65cbe8c24c29e11cd4 100644 --- a/oneflow/compatible_single_client_python/nn/modules/ne.py +++ b/oneflow/compatible_single_client_python/nn/modules/ne.py @@ -14,12 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. """ from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op class Ne(Module): diff --git a/oneflow/compatible_single_client_python/nn/modules/negative.py b/oneflow/compatible_single_client_python/nn/modules/negative.py index 55f0d07001e38292406a01f5e62877a561eb2333..f7bbdc3f2375486b099cb7702152eca0e81553c4 100644 --- a/oneflow/compatible_single_client_python/nn/modules/negative.py +++ b/oneflow/compatible_single_client_python/nn/modules/negative.py @@ -14,12 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. """ from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op class Negative(Module): diff --git a/oneflow/compatible_single_client_python/nn/modules/norm.py b/oneflow/compatible_single_client_python/nn/modules/norm.py index dacdf9fc43be7ce699736c154836a6372a7c752c..2cddb46afc10f192be8f9f557308c49ecd94dfbf 100644 --- a/oneflow/compatible_single_client_python/nn/modules/norm.py +++ b/oneflow/compatible_single_client_python/nn/modules/norm.py @@ -16,12 +16,12 @@ limitations under the License. from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op class Norm(Module): diff --git a/oneflow/compatible_single_client_python/nn/modules/normalization.py b/oneflow/compatible_single_client_python/nn/modules/normalization.py index 7ffa7cb8e9ab5330dd246092c4f7f1d33a532eaa..4aa8d69f88993626410de01b5474970c8249a396 100644 --- a/oneflow/compatible_single_client_python/nn/modules/normalization.py +++ b/oneflow/compatible_single_client_python/nn/modules/normalization.py @@ -15,13 +15,13 @@ limitations under the License. """ import oneflow from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.nn import init -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.nn import init +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.framework.tensor import Tensor +from oneflow.compatible.single_client.python.framework.tensor import Tensor from typing import Tuple, Union _shape_t = Union[int, Tuple[int], oneflow._oneflow_internal.Size] diff --git a/oneflow/compatible_single_client_python/nn/modules/padding.py b/oneflow/compatible_single_client_python/nn/modules/padding.py index ae2a7b4200e48f8b347fbdc3e3a6efb30d8fab1f..d359604c981a988c74d858513154e6641c2c5360 100644 --- a/oneflow/compatible_single_client_python/nn/modules/padding.py +++ b/oneflow/compatible_single_client_python/nn/modules/padding.py @@ -16,11 +16,11 @@ limitations under the License. from typing import Union from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.nn.module import Module +from oneflow.compatible.single_client.python.nn.module import Module @oneflow_export("nn.ReplicationPad2d") diff --git a/oneflow/compatible_single_client_python/nn/modules/permute.py b/oneflow/compatible_single_client_python/nn/modules/permute.py index 4373398eb2efd7e4b16a8837e5bfcc47e2b98d5b..f440dd5914d04736231d6f430eb0fb9591fda5db 100644 --- a/oneflow/compatible_single_client_python/nn/modules/permute.py +++ b/oneflow/compatible_single_client_python/nn/modules/permute.py @@ -14,12 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. """ from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op from typing import Optional, Sequence diff --git a/oneflow/compatible_single_client_python/nn/modules/pixelshuffle.py b/oneflow/compatible_single_client_python/nn/modules/pixelshuffle.py index 55b501cd69b5d37b03f88cad0e48ab35e1bbd2bf..99889b323192d151226cedc358038da9da5316f4 100644 --- a/oneflow/compatible_single_client_python/nn/modules/pixelshuffle.py +++ b/oneflow/compatible_single_client_python/nn/modules/pixelshuffle.py @@ -13,12 +13,12 @@ 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. """ -from oneflow.compatible_single_client_python.framework.tensor import Tensor -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.framework.tensor import Tensor +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.nn.module import Module +from oneflow.compatible.single_client.python.nn.module import Module @oneflow_export("nn.PixelShuffle") diff --git a/oneflow/compatible_single_client_python/nn/modules/pooling.py b/oneflow/compatible_single_client_python/nn/modules/pooling.py index e6ed5091adf385386662d92634e51e9c13607d63..6f9866d7c4a249726f670fa920bdd2be642df44c 100644 --- a/oneflow/compatible_single_client_python/nn/modules/pooling.py +++ b/oneflow/compatible_single_client_python/nn/modules/pooling.py @@ -16,22 +16,22 @@ limitations under the License. from typing import Optional from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.nn.modules.utils import ( +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.nn.modules.utils import ( _single, _pair, _triple, ) -from oneflow.compatible_single_client_python.nn.common_types import ( +from oneflow.compatible.single_client.python.nn.common_types import ( _size_1_t, _size_2_t, _size_3_t, ) -from oneflow.compatible_single_client_python.ops.nn_ops import ( +from oneflow.compatible.single_client.python.ops.nn_ops import ( calc_pool_padding, get_dhw_offset, ) diff --git a/oneflow/compatible_single_client_python/nn/modules/reduce_ops.py b/oneflow/compatible_single_client_python/nn/modules/reduce_ops.py index ee76a364f9dfe8d824fcfe81170fff515af6a600..829921019237768558cf4e9cd3726a186b7eea15 100644 --- a/oneflow/compatible_single_client_python/nn/modules/reduce_ops.py +++ b/oneflow/compatible_single_client_python/nn/modules/reduce_ops.py @@ -18,13 +18,13 @@ import collections from typing import Optional, Sequence, Union from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op -from oneflow.compatible_single_client_python.nn.modules.utils import _check_axis +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.nn.modules.utils import _check_axis def _build_reduce_op(op_type_name, keepdims): diff --git a/oneflow/compatible_single_client_python/nn/modules/repeat.py b/oneflow/compatible_single_client_python/nn/modules/repeat.py index eccee128c8e3899f663bc5f9277de6af331d6211..6d2946d7e10cbb4206985ba3d2afee61e8e12b32 100644 --- a/oneflow/compatible_single_client_python/nn/modules/repeat.py +++ b/oneflow/compatible_single_client_python/nn/modules/repeat.py @@ -14,12 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. """ from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op class Repeat(Module): diff --git a/oneflow/compatible_single_client_python/nn/modules/reshape.py b/oneflow/compatible_single_client_python/nn/modules/reshape.py index 6f4015aa4b3aec66e1bb26ea6fdce316af784906..7d7b41cf2659d1fc8eae8376d6961abef4c92b63 100644 --- a/oneflow/compatible_single_client_python/nn/modules/reshape.py +++ b/oneflow/compatible_single_client_python/nn/modules/reshape.py @@ -14,12 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. """ from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op from typing import Sequence diff --git a/oneflow/compatible_single_client_python/nn/modules/round.py b/oneflow/compatible_single_client_python/nn/modules/round.py index 9327e391d94324de5dd1be55ef2522fba21f4aa0..eb70cccd5902ed58bf7c5ec3784932d227c3f48c 100644 --- a/oneflow/compatible_single_client_python/nn/modules/round.py +++ b/oneflow/compatible_single_client_python/nn/modules/round.py @@ -15,12 +15,12 @@ limitations under the License. """ from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op class Round(Module): diff --git a/oneflow/compatible_single_client_python/nn/modules/sign.py b/oneflow/compatible_single_client_python/nn/modules/sign.py index d87cd6efe122e18a083c40599e9356e2d5a1a124..2242c967a78a949467e865373174d2bd9fdcd468 100644 --- a/oneflow/compatible_single_client_python/nn/modules/sign.py +++ b/oneflow/compatible_single_client_python/nn/modules/sign.py @@ -15,12 +15,12 @@ limitations under the License. """ from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op -from oneflow.compatible_single_client_python.nn.module import Module +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.nn.module import Module class Sign(Module): diff --git a/oneflow/compatible_single_client_python/nn/modules/sinh.py b/oneflow/compatible_single_client_python/nn/modules/sinh.py index 0cbc18422b5e9e07007c4d129e7eb6a8c4155ed6..1ab491402500d16f65e3499793220c87c819eb98 100644 --- a/oneflow/compatible_single_client_python/nn/modules/sinh.py +++ b/oneflow/compatible_single_client_python/nn/modules/sinh.py @@ -14,12 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. """ from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op class Sinh(Module): diff --git a/oneflow/compatible_single_client_python/nn/modules/slice.py b/oneflow/compatible_single_client_python/nn/modules/slice.py index 9322e213e8092af2f35879cf094106df441c0a17..c286a23c710f3e5da29e1b8bcf26b7e1f2e372d2 100644 --- a/oneflow/compatible_single_client_python/nn/modules/slice.py +++ b/oneflow/compatible_single_client_python/nn/modules/slice.py @@ -15,12 +15,12 @@ limitations under the License. """ import numpy as np from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.ops.array_ops import ( +from oneflow.compatible.single_client.python.ops.array_ops import ( check_slice_tup_list, GetSliceAttrs, ) diff --git a/oneflow/compatible_single_client_python/nn/modules/softplus.py b/oneflow/compatible_single_client_python/nn/modules/softplus.py index 18979ba8d979ad713fd7f5f1c3aec0413b31e929..dfd8383e3c09060626d62fa97c2714d812c9e93e 100644 --- a/oneflow/compatible_single_client_python/nn/modules/softplus.py +++ b/oneflow/compatible_single_client_python/nn/modules/softplus.py @@ -14,12 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. """ from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op class Softplus(Module): diff --git a/oneflow/compatible_single_client_python/nn/modules/sort.py b/oneflow/compatible_single_client_python/nn/modules/sort.py index a092328210707c55a551878a33e479d546bbef60..158887a63c3ef0c8f313f3d4fd7ad0248ac9b964 100644 --- a/oneflow/compatible_single_client_python/nn/modules/sort.py +++ b/oneflow/compatible_single_client_python/nn/modules/sort.py @@ -14,13 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. """ from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op -from oneflow.compatible_single_client_python.ops.transpose_util import ( +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.ops.transpose_util import ( get_perm_when_transpose_axis_to_last_dim, get_inversed_perm, ) diff --git a/oneflow/compatible_single_client_python/nn/modules/sparse.py b/oneflow/compatible_single_client_python/nn/modules/sparse.py index 35d46be55bd72e9315f507df964ccde6c7c75951..79787adc97f6ebddf76d0e9837c369af21ba3e8d 100644 --- a/oneflow/compatible_single_client_python/nn/modules/sparse.py +++ b/oneflow/compatible_single_client_python/nn/modules/sparse.py @@ -15,9 +15,9 @@ limitations under the License. """ from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.framework.tensor import Tensor -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export -from oneflow.compatible_single_client_python.nn.module import Module +from oneflow.compatible.single_client.python.framework.tensor import Tensor +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.nn.module import Module from typing import Optional, List, Tuple diff --git a/oneflow/compatible_single_client_python/nn/modules/squeeze.py b/oneflow/compatible_single_client_python/nn/modules/squeeze.py index b70501ffb7a4c1dd0a41d5cdb68c825fafbd147f..40801a05b23e3e7265a6471078edff0a493b26c9 100644 --- a/oneflow/compatible_single_client_python/nn/modules/squeeze.py +++ b/oneflow/compatible_single_client_python/nn/modules/squeeze.py @@ -14,13 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. """ from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op -from oneflow.compatible_single_client_python.framework import id_util as id_util +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.framework import id_util as id_util from typing import Optional, Sequence diff --git a/oneflow/compatible_single_client_python/nn/modules/stack.py b/oneflow/compatible_single_client_python/nn/modules/stack.py index 4a3b510872352a62c1e8cf5ea9d9ae2aa1cdefff..39fb7e3e2f627fb75279a9fbbed2bfbc179ca4c3 100644 --- a/oneflow/compatible_single_client_python/nn/modules/stack.py +++ b/oneflow/compatible_single_client_python/nn/modules/stack.py @@ -15,13 +15,13 @@ limitations under the License. """ from oneflow.compatible import single_client as flow from typing import List, Tuple -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.framework.tensor import Tensor +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.framework.tensor import Tensor class Stack(Module): diff --git a/oneflow/compatible_single_client_python/nn/modules/tan.py b/oneflow/compatible_single_client_python/nn/modules/tan.py index 5c74bbb63de098e2a65e290b9304a34f09570d0a..946b1f7a6f2cf6bcbe46336e5edc94b68e87a2cc 100644 --- a/oneflow/compatible_single_client_python/nn/modules/tan.py +++ b/oneflow/compatible_single_client_python/nn/modules/tan.py @@ -14,12 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. """ from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op class Tan(Module): diff --git a/oneflow/compatible_single_client_python/nn/modules/tensor_buffer.py b/oneflow/compatible_single_client_python/nn/modules/tensor_buffer.py index d2624864dd5da64f2d4fbee911fd086ecf7bab77..44caac5c4571e587a3eb77a8ff7f4b3ea37b6ed1 100644 --- a/oneflow/compatible_single_client_python/nn/modules/tensor_buffer.py +++ b/oneflow/compatible_single_client_python/nn/modules/tensor_buffer.py @@ -16,8 +16,8 @@ limitations under the License. from typing import Sequence, Optional from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) diff --git a/oneflow/compatible_single_client_python/nn/modules/tensor_ops.py b/oneflow/compatible_single_client_python/nn/modules/tensor_ops.py index 8add93391760f10dc70ba46a5cb107d356a35d4b..f577c04a6803a4d0128d56cc4c4086eb63ebb928 100644 --- a/oneflow/compatible_single_client_python/nn/modules/tensor_ops.py +++ b/oneflow/compatible_single_client_python/nn/modules/tensor_ops.py @@ -14,9 +14,9 @@ See the License for the specific language governing permissions and limitations under the License. """ from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.oneflow_export import experimental_api -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.oneflow_export import experimental_api +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op class TypeAs(Module): diff --git a/oneflow/compatible_single_client_python/nn/modules/tile.py b/oneflow/compatible_single_client_python/nn/modules/tile.py index ad32b121d8dcbd9dce502ad47f138e795bcb6c27..7dd33ddcc7ff00cb4827166ac3d3464d0092fc56 100644 --- a/oneflow/compatible_single_client_python/nn/modules/tile.py +++ b/oneflow/compatible_single_client_python/nn/modules/tile.py @@ -15,12 +15,12 @@ limitations under the License. """ from typing import Union from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.framework.tensor import ( +from oneflow.compatible.single_client.python.framework.tensor import ( Tensor, register_tensor_op, ) diff --git a/oneflow/compatible_single_client_python/nn/modules/to.py b/oneflow/compatible_single_client_python/nn/modules/to.py index 326670df49543fa10f9a857ec6bf73adb6a9aa6d..ed0d1078ace1005ccee758c56d2891b69f968eaf 100644 --- a/oneflow/compatible_single_client_python/nn/modules/to.py +++ b/oneflow/compatible_single_client_python/nn/modules/to.py @@ -14,9 +14,9 @@ See the License for the specific language governing permissions and limitations under the License. """ from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export from typing import Optional, Union diff --git a/oneflow/compatible_single_client_python/nn/modules/transpose.py b/oneflow/compatible_single_client_python/nn/modules/transpose.py index e7387a9f96db4ad0b153e4e0290112b0a95967a9..1c52304e3570934e35e2c8a5a826c2434be77de1 100644 --- a/oneflow/compatible_single_client_python/nn/modules/transpose.py +++ b/oneflow/compatible_single_client_python/nn/modules/transpose.py @@ -14,12 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. """ from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op from typing import Optional, Sequence diff --git a/oneflow/compatible_single_client_python/nn/modules/triu.py b/oneflow/compatible_single_client_python/nn/modules/triu.py index ebff3e931b0b959ce566a3574e348469c4f57f40..9c477f649f56bab4eb2208c407db0e6219e375fa 100644 --- a/oneflow/compatible_single_client_python/nn/modules/triu.py +++ b/oneflow/compatible_single_client_python/nn/modules/triu.py @@ -15,12 +15,12 @@ limitations under the License. """ from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op class Triu(Module): diff --git a/oneflow/compatible_single_client_python/nn/modules/unsqueeze.py b/oneflow/compatible_single_client_python/nn/modules/unsqueeze.py index 0bae797a98ccedfd2cfdd4ae8c7c57185a0b158c..67606d6788af2142d2a613d0e855dd3a9562bb2b 100644 --- a/oneflow/compatible_single_client_python/nn/modules/unsqueeze.py +++ b/oneflow/compatible_single_client_python/nn/modules/unsqueeze.py @@ -14,12 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. """ from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op class Unsqueeze(Module): diff --git a/oneflow/compatible_single_client_python/nn/modules/upsampling.py b/oneflow/compatible_single_client_python/nn/modules/upsampling.py index b13ab8b2dfd2ed86a1f80bf12db84e46a50180ff..2bc313856786d32f3fdeecb99a3d2dcf8b288997 100644 --- a/oneflow/compatible_single_client_python/nn/modules/upsampling.py +++ b/oneflow/compatible_single_client_python/nn/modules/upsampling.py @@ -14,12 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. """ from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op from typing import Optional, Union, Tuple diff --git a/oneflow/compatible_single_client_python/nn/modules/where.py b/oneflow/compatible_single_client_python/nn/modules/where.py index dcf5ed9e4f91e9ba178251355ac902f6eee4bc02..1db5655a0cbb56891a0de1683b5597d41c0efc83 100644 --- a/oneflow/compatible_single_client_python/nn/modules/where.py +++ b/oneflow/compatible_single_client_python/nn/modules/where.py @@ -14,12 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. """ from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.nn.module import Module -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.nn.module import Module +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.framework.tensor import register_tensor_op +from oneflow.compatible.single_client.python.framework.tensor import register_tensor_op class Where(Module): diff --git a/oneflow/compatible_single_client_python/nn/modules/zeropad2d.py b/oneflow/compatible_single_client_python/nn/modules/zeropad2d.py index 4e43dfc317daaadb223f63fdc5f97bc32b1e18e2..385b3c9a2203271ef75e72dc2aed271d65fee2c4 100644 --- a/oneflow/compatible_single_client_python/nn/modules/zeropad2d.py +++ b/oneflow/compatible_single_client_python/nn/modules/zeropad2d.py @@ -18,11 +18,11 @@ from __future__ import absolute_import from typing import Union from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.nn.module import Module +from oneflow.compatible.single_client.python.nn.module import Module @oneflow_export("nn.ZeroPad2d") diff --git a/oneflow/compatible_single_client_python/nn/optimizer/adam.py b/oneflow/compatible_single_client_python/nn/optimizer/adam.py index 8bb6132fd82b511e1813845d8daa619d0b68561f..a0caa9b8d58c3706fbb8a52fa964e5d21ba4ac68 100644 --- a/oneflow/compatible_single_client_python/nn/optimizer/adam.py +++ b/oneflow/compatible_single_client_python/nn/optimizer/adam.py @@ -19,12 +19,12 @@ import collections from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.nn.parameter import Parameter -from oneflow.compatible_single_client_python.nn.optimizer.optimizer import ( +from oneflow.compatible.single_client.python.nn.parameter import Parameter +from oneflow.compatible.single_client.python.nn.optimizer.optimizer import ( Optimizer, ParamGroup, ) diff --git a/oneflow/compatible_single_client_python/nn/optimizer/adamw.py b/oneflow/compatible_single_client_python/nn/optimizer/adamw.py index 2d95d835d359a8517a1b5b7d23b7efe4c5c1e71a..a4f8cddbc181f472ebc8eeb4a1f3cbfcd18a3c89 100644 --- a/oneflow/compatible_single_client_python/nn/optimizer/adamw.py +++ b/oneflow/compatible_single_client_python/nn/optimizer/adamw.py @@ -19,12 +19,12 @@ import collections from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.nn.parameter import Parameter -from oneflow.compatible_single_client_python.nn.optimizer.optimizer import ( +from oneflow.compatible.single_client.python.nn.parameter import Parameter +from oneflow.compatible.single_client.python.nn.optimizer.optimizer import ( ParamGroup, Optimizer, ) diff --git a/oneflow/compatible_single_client_python/nn/optimizer/cosine_annealing_lr.py b/oneflow/compatible_single_client_python/nn/optimizer/cosine_annealing_lr.py index 4f759146e4c2da3fbbe28b49dfe6e2ed42f96d78..aaa120e8945adc1f1392174588531c929b599232 100644 --- a/oneflow/compatible_single_client_python/nn/optimizer/cosine_annealing_lr.py +++ b/oneflow/compatible_single_client_python/nn/optimizer/cosine_annealing_lr.py @@ -16,7 +16,7 @@ limitations under the License. import math -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.oneflow_export import ( experimental_api, oneflow_export, ) diff --git a/oneflow/compatible_single_client_python/nn/optimizer/lambda_lr.py b/oneflow/compatible_single_client_python/nn/optimizer/lambda_lr.py index d9f51505c7457b11e6a2b80d0b1de091d59901be..691f9ba9ecb1aeca4b4ee9ba0f4040e0d9e2cf6d 100644 --- a/oneflow/compatible_single_client_python/nn/optimizer/lambda_lr.py +++ b/oneflow/compatible_single_client_python/nn/optimizer/lambda_lr.py @@ -16,7 +16,7 @@ limitations under the License. import types -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.oneflow_export import ( experimental_api, oneflow_export, ) diff --git a/oneflow/compatible_single_client_python/nn/optimizer/lr_scheduler.py b/oneflow/compatible_single_client_python/nn/optimizer/lr_scheduler.py index 1b69f0ffd1408de172750babc546630d10dfa828..f3e3fb13ce27c00fe627d3c0c76a6e1770514b8b 100644 --- a/oneflow/compatible_single_client_python/nn/optimizer/lr_scheduler.py +++ b/oneflow/compatible_single_client_python/nn/optimizer/lr_scheduler.py @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. """ -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) diff --git a/oneflow/compatible_single_client_python/nn/optimizer/optimizer.py b/oneflow/compatible_single_client_python/nn/optimizer/optimizer.py index 38a1f91d80e1d4db31eb2e03be986847756f14c4..37004df24f6c881f5cbbb57f24cb319bd4997b18 100644 --- a/oneflow/compatible_single_client_python/nn/optimizer/optimizer.py +++ b/oneflow/compatible_single_client_python/nn/optimizer/optimizer.py @@ -18,12 +18,12 @@ import warnings from typing import Dict, Callable, Union, Any, Iterator import collections -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.nn.parameter import Parameter -from oneflow.compatible_single_client_python.framework.tensor import Tensor +from oneflow.compatible.single_client.python.nn.parameter import Parameter +from oneflow.compatible.single_client.python.framework.tensor import Tensor class ParamGroup(object): diff --git a/oneflow/compatible_single_client_python/nn/optimizer/rmsprop.py b/oneflow/compatible_single_client_python/nn/optimizer/rmsprop.py index 00303222ce215f9a37c4358d6a481fc857f18fc5..baf6d55aa2e536ec0277568ef4c7586c43fc267c 100644 --- a/oneflow/compatible_single_client_python/nn/optimizer/rmsprop.py +++ b/oneflow/compatible_single_client_python/nn/optimizer/rmsprop.py @@ -19,12 +19,12 @@ import collections from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.nn.parameter import Parameter -from oneflow.compatible_single_client_python.nn.optimizer.optimizer import ( +from oneflow.compatible.single_client.python.nn.parameter import Parameter +from oneflow.compatible.single_client.python.nn.optimizer.optimizer import ( ParamGroup, Optimizer, ) diff --git a/oneflow/compatible_single_client_python/nn/optimizer/sgd.py b/oneflow/compatible_single_client_python/nn/optimizer/sgd.py index b66db77c227f3e0b59b8bd3a7f107b0eed991eb4..8401ae40f8164fdb59c2cc88ecde400e70800833 100644 --- a/oneflow/compatible_single_client_python/nn/optimizer/sgd.py +++ b/oneflow/compatible_single_client_python/nn/optimizer/sgd.py @@ -19,11 +19,11 @@ import collections from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, experimental_api, ) -from oneflow.compatible_single_client_python.nn.parameter import Parameter +from oneflow.compatible.single_client.python.nn.parameter import Parameter from .optimizer import Optimizer, ParamGroup diff --git a/oneflow/compatible_single_client_python/nn/optimizer/step_lr.py b/oneflow/compatible_single_client_python/nn/optimizer/step_lr.py index 3ebb647a6746223a3f1a4f563383835383828a20..42de67f66a6d1b4e48e1975efda65ef3cca9a0db 100644 --- a/oneflow/compatible_single_client_python/nn/optimizer/step_lr.py +++ b/oneflow/compatible_single_client_python/nn/optimizer/step_lr.py @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. """ -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.oneflow_export import ( experimental_api, oneflow_export, ) diff --git a/oneflow/compatible_single_client_python/nn/parameter.py b/oneflow/compatible_single_client_python/nn/parameter.py index c32fff57beba68648b3cc70e36676f696b5f25ce..5168018e425cca140f7f87466eb080d764beafa2 100644 --- a/oneflow/compatible_single_client_python/nn/parameter.py +++ b/oneflow/compatible_single_client_python/nn/parameter.py @@ -14,8 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. """ from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export -from oneflow.compatible_single_client_python.framework.tensor import Tensor +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.framework.tensor import Tensor @oneflow_export("nn.Parameter") diff --git a/oneflow/compatible_single_client_python/oneflow_export.py b/oneflow/compatible_single_client_python/oneflow_export.py index ce5427d0f0d663d65a3df06dea6c3228b76be36f..deb32270c39b8795e3725dabd67603ec214f4701 100644 --- a/oneflow/compatible_single_client_python/oneflow_export.py +++ b/oneflow/compatible_single_client_python/oneflow_export.py @@ -17,9 +17,9 @@ import inspect import re import collections -from oneflow.compatible_single_client_python.lib.core import enable_if as enable_if_util -from oneflow.compatible_single_client_python.lib.core import traceinfo as traceinfo -from oneflow.compatible_single_client_python.lib.core.high_order_bool import always_true +from oneflow.compatible.single_client.python.lib.core import enable_if as enable_if_util +from oneflow.compatible.single_client.python.lib.core import traceinfo as traceinfo +from oneflow.compatible.single_client.python.lib.core.high_order_bool import always_true import oneflow._oneflow_internal diff --git a/oneflow/compatible_single_client_python/ops/__init__.py b/oneflow/compatible_single_client_python/ops/__init__.py index a9917a263e9a1f2c66dce781b177458f3d55f91d..2b69a218ed1855e4fadd39b6de9f2ddb003e58ed 100644 --- a/oneflow/compatible_single_client_python/ops/__init__.py +++ b/oneflow/compatible_single_client_python/ops/__init__.py @@ -21,25 +21,25 @@ from oneflow.compatible.single_client.core.operator import op_conf_pb2 as op_con from oneflow.compatible.single_client.core.register import ( logical_blob_id_pb2 as logical_blob_id_util, ) -from oneflow.compatible_single_client_python.framework import c_api_util as c_api_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import c_api_util as c_api_util +from oneflow.compatible.single_client.python.framework import ( compile_context as compile_context, ) -from oneflow.compatible_single_client_python.framework import id_util as id_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import id_util as id_util +from oneflow.compatible.single_client.python.framework import ( input_blob_def as input_blob_util, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( remote_blob as remote_blob_util, ) -from oneflow.compatible_single_client_python.framework import hob as hob -from oneflow.compatible_single_client_python.lib.core import enable_if as enable_if -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import hob as hob +from oneflow.compatible.single_client.python.lib.core import enable_if as enable_if +from oneflow.compatible.single_client.python.framework import ( session_context as session_ctx, ) -from oneflow.compatible_single_client_python.framework import scope_util as scope_util -from oneflow.compatible_single_client_python.eager import boxing_util as boxing_util -from oneflow.compatible_single_client_python.eager import ( +from oneflow.compatible.single_client.python.framework import scope_util as scope_util +from oneflow.compatible.single_client.python.eager import boxing_util as boxing_util +from oneflow.compatible.single_client.python.eager import ( blob_register as blob_register_util, ) from oneflow._oneflow_internal.oneflow.core.job import placement as placement_cfg diff --git a/oneflow/compatible_single_client_python/ops/array_ops.py b/oneflow/compatible_single_client_python/ops/array_ops.py index e7f9805ae2d79f10d8c884bb317bf60796ddc3e6..df283e8d1ccc85b41c65696f7fc2417a1d8ecc98 100644 --- a/oneflow/compatible_single_client_python/ops/array_ops.py +++ b/oneflow/compatible_single_client_python/ops/array_ops.py @@ -16,7 +16,7 @@ limitations under the License. from __future__ import absolute_import from functools import reduce from typing import Iterable, List, Optional, Sequence, Union, Tuple -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, stable_api, ) @@ -28,11 +28,11 @@ from oneflow.compatible.single_client.core.operator import op_conf_pb2 as op_con from oneflow.compatible.single_client.core.register import ( logical_blob_id_pb2 as logical_blob_id_util, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( interpret_util as interpret_util, ) -from oneflow.compatible_single_client_python.framework import id_util as id_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import id_util as id_util +from oneflow.compatible.single_client.python.framework import ( remote_blob as remote_blob_util, ) import oneflow._oneflow_internal diff --git a/oneflow/compatible_single_client_python/ops/assign_op.py b/oneflow/compatible_single_client_python/ops/assign_op.py index e60bf33523a901115d106d65dd8bea095fb0852b..cdb7680cc9ddf99b6316c48cd39d75dfacef5f80 100644 --- a/oneflow/compatible_single_client_python/ops/assign_op.py +++ b/oneflow/compatible_single_client_python/ops/assign_op.py @@ -22,24 +22,24 @@ from oneflow.compatible.single_client.core.operator import op_conf_pb2 as op_con from oneflow.compatible.single_client.core.register import ( logical_blob_id_pb2 as logical_blob_id_util, ) -from oneflow.compatible_single_client_python.eager import boxing_util as boxing_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.eager import boxing_util as boxing_util +from oneflow.compatible.single_client.python.framework import ( interpret_util as interpret_util, ) -from oneflow.compatible_single_client_python.framework import hob as hob -from oneflow.compatible_single_client_python.framework import id_util as id_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import hob as hob +from oneflow.compatible.single_client.python.framework import id_util as id_util +from oneflow.compatible.single_client.python.framework import ( interpret_util as interpret_util, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( placement_context as placement_ctx, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( remote_blob as remote_blob_util, ) -from oneflow.compatible_single_client_python.lib.core import enable_if as enable_if -from oneflow.compatible_single_client_python.framework import hob as hob -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.lib.core import enable_if as enable_if +from oneflow.compatible.single_client.python.framework import hob as hob +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export from oneflow.compatible import single_client as flow diff --git a/oneflow/compatible_single_client_python/ops/builtin_ops.py b/oneflow/compatible_single_client_python/ops/builtin_ops.py index 5b0849e47faa054aeb0ff9788b5892d26754ad4f..51ddc7b7747c9f83ab88f65127b4f3bee97aadef 100644 --- a/oneflow/compatible_single_client_python/ops/builtin_ops.py +++ b/oneflow/compatible_single_client_python/ops/builtin_ops.py @@ -18,11 +18,11 @@ from __future__ import absolute_import from oneflow.compatible import single_client as flow import oneflow._oneflow_internal -from oneflow.compatible_single_client_python.framework import id_util as id_util -from oneflow.compatible_single_client_python.framework.attr_util import ( +from oneflow.compatible.single_client.python.framework import id_util as id_util +from oneflow.compatible.single_client.python.framework.attr_util import ( convert_to_user_attr_value, ) -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export @oneflow_export("builtin_op") diff --git a/oneflow/compatible_single_client_python/ops/categorical_ordinal_encode_op.py b/oneflow/compatible_single_client_python/ops/categorical_ordinal_encode_op.py index d0040684ebdf7b3d482698b03207e690a105e1ca..87b49c5c838381573594b97e6383a0d00a8a94a4 100644 --- a/oneflow/compatible_single_client_python/ops/categorical_ordinal_encode_op.py +++ b/oneflow/compatible_single_client_python/ops/categorical_ordinal_encode_op.py @@ -15,11 +15,11 @@ limitations under the License. """ from __future__ import absolute_import from typing import Optional -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.framework import id_util as id_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import id_util as id_util +from oneflow.compatible.single_client.python.framework import ( remote_blob as remote_blob_util, ) import oneflow._oneflow_internal diff --git a/oneflow/compatible_single_client_python/ops/combined_margin_loss.py b/oneflow/compatible_single_client_python/ops/combined_margin_loss.py index 58586fddf5fc5d74f68c757ac394f481f70bdebd..edafc73a465ff1b7fd2d3900f5d61480116f1798 100644 --- a/oneflow/compatible_single_client_python/ops/combined_margin_loss.py +++ b/oneflow/compatible_single_client_python/ops/combined_margin_loss.py @@ -24,18 +24,18 @@ from oneflow.compatible.single_client.core.operator import op_conf_pb2 as op_con from oneflow.compatible.single_client.core.register import ( logical_blob_id_pb2 as logical_blob_id_util, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( interpret_util as interpret_util, ) -from oneflow.compatible_single_client_python.framework import id_util as id_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import id_util as id_util +from oneflow.compatible.single_client.python.framework import ( remote_blob as remote_blob_util, ) -from oneflow.compatible_single_client_python.framework import module as module_util -from oneflow.compatible_single_client_python.ops import ( +from oneflow.compatible.single_client.python.framework import module as module_util +from oneflow.compatible.single_client.python.ops import ( math_unary_elementwise_ops as math_unary_elementwise_ops, ) -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export import oneflow._oneflow_internal diff --git a/oneflow/compatible_single_client_python/ops/constant_op.py b/oneflow/compatible_single_client_python/ops/constant_op.py index 81ded7d150ee9e8503f5df5a4f43fc59a3029102..9a52a05fafbb96a05a060b4e677ce4e1b7702ecb 100644 --- a/oneflow/compatible_single_client_python/ops/constant_op.py +++ b/oneflow/compatible_single_client_python/ops/constant_op.py @@ -23,14 +23,14 @@ from oneflow.compatible.single_client.core.operator import op_conf_pb2 as op_con from oneflow.compatible.single_client.core.register import ( logical_blob_id_pb2 as logical_blob_id_util, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( interpret_util as interpret_util, ) -from oneflow.compatible_single_client_python.framework import id_util as id_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import id_util as id_util +from oneflow.compatible.single_client.python.framework import ( remote_blob as remote_blob_util, ) -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, stable_api, ) diff --git a/oneflow/compatible_single_client_python/ops/count_not_finite.py b/oneflow/compatible_single_client_python/ops/count_not_finite.py index 81ff5beab64f34acddfa975ffe97073bc211ebda..24c952c26be16420aaf651a4b15320508249ee12 100644 --- a/oneflow/compatible_single_client_python/ops/count_not_finite.py +++ b/oneflow/compatible_single_client_python/ops/count_not_finite.py @@ -22,14 +22,14 @@ from oneflow.compatible.single_client.core.operator import op_conf_pb2 as op_con from oneflow.compatible.single_client.core.register import ( logical_blob_id_pb2 as logical_blob_id_util, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( distribute as distribute_util, ) -from oneflow.compatible_single_client_python.framework import id_util as id_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import id_util as id_util +from oneflow.compatible.single_client.python.framework import ( remote_blob as remote_blob_util, ) -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export import oneflow._oneflow_internal from typing import Optional, Union, Sequence diff --git a/oneflow/compatible_single_client_python/ops/data_ops.py b/oneflow/compatible_single_client_python/ops/data_ops.py index 013ca86a326cbcd736f5b4c8ec3756edf899825d..e4bd9cacd0a538e4dbb5737062f7208c7e01d43f 100644 --- a/oneflow/compatible_single_client_python/ops/data_ops.py +++ b/oneflow/compatible_single_client_python/ops/data_ops.py @@ -25,14 +25,14 @@ from oneflow.compatible.single_client.core.job import ( from oneflow.compatible.single_client.core.register import ( logical_blob_id_pb2 as logical_blob_id_util, ) -from oneflow.compatible_single_client_python.framework import id_util as id_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import id_util as id_util +from oneflow.compatible.single_client.python.framework import ( interpret_util as interpret_util, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( remote_blob as remote_blob_util, ) -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, oneflow_deprecate, ) diff --git a/oneflow/compatible_single_client_python/ops/diag_ops.py b/oneflow/compatible_single_client_python/ops/diag_ops.py index a076e0dc58b85dea93b3f4b06997d42b8f52fd14..03f4099eea6195c16de50bf7db0e305ed79212dc 100644 --- a/oneflow/compatible_single_client_python/ops/diag_ops.py +++ b/oneflow/compatible_single_client_python/ops/diag_ops.py @@ -15,9 +15,9 @@ limitations under the License. """ from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.framework import id_util as id_util -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import id_util as id_util +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.framework import ( remote_blob as remote_blob_util, ) from typing import Optional diff --git a/oneflow/compatible_single_client_python/ops/domain_ops.py b/oneflow/compatible_single_client_python/ops/domain_ops.py index 91b429f6b4939f7e1c73b72e0b1d9011c26fb642..f2ce5bffc1a011e4832b029b67753c4a12ced690 100644 --- a/oneflow/compatible_single_client_python/ops/domain_ops.py +++ b/oneflow/compatible_single_client_python/ops/domain_ops.py @@ -17,9 +17,9 @@ limitations under the License. import typing from oneflow.compatible import single_client as flow import oneflow._oneflow_internal -from oneflow.compatible_single_client_python.framework import id_util as id_util +from oneflow.compatible.single_client.python.framework import id_util as id_util -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export @oneflow_export("nn.fused_self_attention_query_mul_key_and_value") diff --git a/oneflow/compatible_single_client_python/ops/eager_nccl_ops.py b/oneflow/compatible_single_client_python/ops/eager_nccl_ops.py index f9d516aef0e163ee4f67a10f116489ee201a7987..f33e44b7d837835afe6f3909e0d8f47305ff16b6 100644 --- a/oneflow/compatible_single_client_python/ops/eager_nccl_ops.py +++ b/oneflow/compatible_single_client_python/ops/eager_nccl_ops.py @@ -18,11 +18,11 @@ from __future__ import absolute_import from typing import Optional from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.framework import id_util as id_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import id_util as id_util +from oneflow.compatible.single_client.python.framework import ( remote_blob as remote_blob_util, ) -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export import oneflow._oneflow_internal diff --git a/oneflow/compatible_single_client_python/ops/get_variable.py b/oneflow/compatible_single_client_python/ops/get_variable.py index 039db439e637529bf8f7183b1b3a0c0bf8804a7d..2beb04b50fcbb9506935246d6b31e523f14231d0 100644 --- a/oneflow/compatible_single_client_python/ops/get_variable.py +++ b/oneflow/compatible_single_client_python/ops/get_variable.py @@ -15,22 +15,22 @@ limitations under the License. """ from __future__ import absolute_import from typing import Optional, Sequence, Union -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( session_context as session_ctx, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( compile_context as compile_context, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( remote_blob as remote_blob_util, ) -from oneflow.compatible_single_client_python.framework import runtime_mode as rt_mode -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import runtime_mode as rt_mode +from oneflow.compatible.single_client.python.framework import ( distribute as distribute_util, ) -from oneflow.compatible_single_client_python.experimental import ( +from oneflow.compatible.single_client.python.experimental import ( name_scope as name_scope, ) from oneflow.compatible.single_client.core.operator import op_conf_pb2 as op_conf_util @@ -43,11 +43,11 @@ from oneflow.compatible.single_client.core.job import ( from oneflow.compatible.single_client.core.register import ( logical_blob_id_pb2 as logical_blob_id_util, ) -from oneflow.compatible_single_client_python.framework import hob as hob -from oneflow.compatible_single_client_python.eager import boxing_util as boxing_util -from oneflow.compatible_single_client_python.eager import gradient_util as gradient_util -from oneflow.compatible_single_client_python.eager import op_executor as op_executor -from oneflow.compatible_single_client_python.lib.core import enable_if as enable_if +from oneflow.compatible.single_client.python.framework import hob as hob +from oneflow.compatible.single_client.python.eager import boxing_util as boxing_util +from oneflow.compatible.single_client.python.eager import gradient_util as gradient_util +from oneflow.compatible.single_client.python.eager import op_executor as op_executor +from oneflow.compatible.single_client.python.lib.core import enable_if as enable_if from oneflow.compatible import single_client as flow from oneflow._oneflow_internal.oneflow.core.register import logical_blob_id as lbi_util import oneflow._oneflow_internal diff --git a/oneflow/compatible_single_client_python/ops/initializer_util.py b/oneflow/compatible_single_client_python/ops/initializer_util.py index 7061b76af9c4eb5f0d86a283c1b81de79728de92..89033d42e2c33e01234166c80d6e9e19d348af23 100644 --- a/oneflow/compatible_single_client_python/ops/initializer_util.py +++ b/oneflow/compatible_single_client_python/ops/initializer_util.py @@ -25,7 +25,7 @@ from oneflow.compatible.single_client.core.operator import op_conf_pb2 as op_con from oneflow.compatible.single_client.core.job import ( initializer_conf_pb2 as initializer_conf_util, ) -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export from typing import Optional, Sequence, Union diff --git a/oneflow/compatible_single_client_python/ops/layers.py b/oneflow/compatible_single_client_python/ops/layers.py index 0ae6c4e160ae2d481069bca2be2822dc063f3cc3..01c3cec1e643e73c76ff66b8370e8ace16ebc2c3 100644 --- a/oneflow/compatible_single_client_python/ops/layers.py +++ b/oneflow/compatible_single_client_python/ops/layers.py @@ -15,7 +15,7 @@ limitations under the License. """ from __future__ import absolute_import from typing import Callable, Optional, Union, Tuple, Sequence -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export from oneflow.compatible import single_client as flow from oneflow.compatible.single_client.core.operator import op_conf_pb2 as op_conf_util @@ -25,10 +25,10 @@ from oneflow.compatible.single_client.core.job import ( from oneflow.compatible.single_client.core.job import ( regularizer_conf_pb2 as regularizer_conf_util, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( distribute as distribute_util, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( remote_blob as remote_blob_util, ) import oneflow._oneflow_internal diff --git a/oneflow/compatible_single_client_python/ops/linalg.py b/oneflow/compatible_single_client_python/ops/linalg.py index 97719ef63362e962aadae59f368b07c2604fb15a..c15e71a1d58f4dcae3d6734cd0098d297c76cc0d 100644 --- a/oneflow/compatible_single_client_python/ops/linalg.py +++ b/oneflow/compatible_single_client_python/ops/linalg.py @@ -22,14 +22,14 @@ from oneflow.compatible.single_client.core.operator import op_conf_pb2 as op_con from oneflow.compatible.single_client.core.register import ( logical_blob_id_pb2 as logical_blob_id_util, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( interpret_util as interpret_util, ) -from oneflow.compatible_single_client_python.framework import id_util as id_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import id_util as id_util +from oneflow.compatible.single_client.python.framework import ( remote_blob as remote_blob_util, ) -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, stable_api, ) diff --git a/oneflow/compatible_single_client_python/ops/loss_ops.py b/oneflow/compatible_single_client_python/ops/loss_ops.py index d791100bd998c30c899da07ba17abe9ef3f3d7e3..d87e20334f0982d29b47fad4158fc9e90dd7a5db 100644 --- a/oneflow/compatible_single_client_python/ops/loss_ops.py +++ b/oneflow/compatible_single_client_python/ops/loss_ops.py @@ -16,9 +16,9 @@ limitations under the License. from __future__ import absolute_import from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.framework import id_util as id_util -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import id_util as id_util +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.framework import ( remote_blob as remote_blob_util, ) import oneflow._oneflow_internal diff --git a/oneflow/compatible_single_client_python/ops/losses/add_loss.py b/oneflow/compatible_single_client_python/ops/losses/add_loss.py index d3a4a789a31d12b1c04e2f35fbba65769587bec7..610df435bd428edfb79c891d0a3d6efd6c4ba150 100644 --- a/oneflow/compatible_single_client_python/ops/losses/add_loss.py +++ b/oneflow/compatible_single_client_python/ops/losses/add_loss.py @@ -15,12 +15,12 @@ limitations under the License. """ from __future__ import absolute_import -from oneflow.compatible_single_client_python.framework import c_api_util as c_api_util -from oneflow.compatible_single_client_python.framework import hob as hob -from oneflow.compatible_single_client_python.eager import gradient_util as gradient_util -from oneflow.compatible_single_client_python.lib.core import enable_if as enable_if -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import c_api_util as c_api_util +from oneflow.compatible.single_client.python.framework import hob as hob +from oneflow.compatible.single_client.python.eager import gradient_util as gradient_util +from oneflow.compatible.single_client.python.lib.core import enable_if as enable_if +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.framework import ( remote_blob as remote_blob_util, ) import oneflow._oneflow_internal diff --git a/oneflow/compatible_single_client_python/ops/math_binary_elementwise_ops.py b/oneflow/compatible_single_client_python/ops/math_binary_elementwise_ops.py index ee6898a0d0c68e2e077992c5c7442107b6425398..21fb0d3896a0abe4ca4f7145c31526b23f153848 100644 --- a/oneflow/compatible_single_client_python/ops/math_binary_elementwise_ops.py +++ b/oneflow/compatible_single_client_python/ops/math_binary_elementwise_ops.py @@ -19,11 +19,11 @@ import os from typing import Optional, Union from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.framework import id_util as id_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import id_util as id_util +from oneflow.compatible.single_client.python.framework import ( remote_blob as remote_blob_util, ) -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export import oneflow._oneflow_internal diff --git a/oneflow/compatible_single_client_python/ops/math_ops.py b/oneflow/compatible_single_client_python/ops/math_ops.py index 9f1bb6e24e0bb0222e7b2ce08469b585f6a7eba4..d86c19909a9000b88ccef9407858639b279f5d26 100644 --- a/oneflow/compatible_single_client_python/ops/math_ops.py +++ b/oneflow/compatible_single_client_python/ops/math_ops.py @@ -23,25 +23,25 @@ from oneflow.compatible.single_client.core.operator import op_conf_pb2 as op_con from oneflow.compatible.single_client.core.register import ( logical_blob_id_pb2 as logical_blob_id_util, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( interpret_util as interpret_util, ) -from oneflow.compatible_single_client_python.framework import id_util as id_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import id_util as id_util +from oneflow.compatible.single_client.python.framework import ( remote_blob as remote_blob_util, ) -from oneflow.compatible_single_client_python.framework import module as module_util -from oneflow.compatible_single_client_python.ops import ( +from oneflow.compatible.single_client.python.framework import module as module_util +from oneflow.compatible.single_client.python.ops import ( math_unary_elementwise_ops as math_unary_elementwise_ops, ) -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, stable_api, ) -from oneflow.compatible_single_client_python.ops.transpose_util import ( +from oneflow.compatible.single_client.python.ops.transpose_util import ( get_perm_when_transpose_axis_to_last_dim, ) -from oneflow.compatible_single_client_python.ops.transpose_util import get_inversed_perm +from oneflow.compatible.single_client.python.ops.transpose_util import get_inversed_perm import oneflow._oneflow_internal diff --git a/oneflow/compatible_single_client_python/ops/math_unary_elementwise_ops.py b/oneflow/compatible_single_client_python/ops/math_unary_elementwise_ops.py index 0682e1c126036db2be5abd0f29d571a120f923a2..c5a1b2db402693935d0c8ddb6fa7dcdb9aeacc70 100644 --- a/oneflow/compatible_single_client_python/ops/math_unary_elementwise_ops.py +++ b/oneflow/compatible_single_client_python/ops/math_unary_elementwise_ops.py @@ -24,17 +24,17 @@ from oneflow.compatible.single_client.core.operator import op_conf_pb2 as op_con from oneflow.compatible.single_client.core.register import ( logical_blob_id_pb2 as logical_blob_id_util, ) -from oneflow.compatible_single_client_python.framework import id_util as id_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import id_util as id_util +from oneflow.compatible.single_client.python.framework import ( interpret_util as interpret_util, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( remote_blob as remote_blob_util, ) -from oneflow.compatible_single_client_python.ops import ( +from oneflow.compatible.single_client.python.ops import ( user_op_builder as user_op_builder, ) -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export import oneflow._oneflow_internal diff --git a/oneflow/compatible_single_client_python/ops/nn_ops.py b/oneflow/compatible_single_client_python/ops/nn_ops.py index 111fbb9e3252dbd53b177fb1634f811d2692d627..5066f7b8dda23eb649651feb333f76de4d441291 100644 --- a/oneflow/compatible_single_client_python/ops/nn_ops.py +++ b/oneflow/compatible_single_client_python/ops/nn_ops.py @@ -25,18 +25,18 @@ from oneflow.compatible.single_client.core.operator import op_conf_pb2 as op_con from oneflow.compatible.single_client.core.register import ( logical_blob_id_pb2 as logical_blob_id_util, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( interpret_util as interpret_util, ) -from oneflow.compatible_single_client_python.framework import id_util as id_util -from oneflow.compatible_single_client_python.framework import module as module_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import id_util as id_util +from oneflow.compatible.single_client.python.framework import module as module_util +from oneflow.compatible.single_client.python.framework import ( remote_blob as remote_blob_util, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( distribute as distribute_util, ) -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, stable_api, ) diff --git a/oneflow/compatible_single_client_python/ops/one_hot.py b/oneflow/compatible_single_client_python/ops/one_hot.py index 3fa6a0b1c8888a5425db973d86f0b21e4b64926c..716aa5bf976d297c0ab9341d57621f2c3f7c1a05 100644 --- a/oneflow/compatible_single_client_python/ops/one_hot.py +++ b/oneflow/compatible_single_client_python/ops/one_hot.py @@ -22,14 +22,14 @@ from oneflow.compatible.single_client.core.operator import op_conf_pb2 as op_con from oneflow.compatible.single_client.core.register import ( logical_blob_id_pb2 as logical_blob_id_util, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( distribute as distribute_util, ) -from oneflow.compatible_single_client_python.framework import id_util as id_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import id_util as id_util +from oneflow.compatible.single_client.python.framework import ( remote_blob as remote_blob_util, ) -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export import oneflow._oneflow_internal from typing import Optional, Union diff --git a/oneflow/compatible_single_client_python/ops/optimizer.py b/oneflow/compatible_single_client_python/ops/optimizer.py index 38b729e3a2dbe60e273da28fb23ffc5cb3d3bc5e..874f1a32ef3a80b18cbf08f85ead6b483f2df68c 100644 --- a/oneflow/compatible_single_client_python/ops/optimizer.py +++ b/oneflow/compatible_single_client_python/ops/optimizer.py @@ -20,12 +20,12 @@ import traceback from typing import Optional, Union, Sequence, List, Text, Callable from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.framework import c_api_util as c_api_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import c_api_util as c_api_util +from oneflow.compatible.single_client.python.framework import ( session_context as session_ctx, ) -from oneflow.compatible_single_client_python.framework import runtime_mode as rt_mode -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.framework import runtime_mode as rt_mode +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, oneflow_deprecate, ) diff --git a/oneflow/compatible_single_client_python/ops/pad.py b/oneflow/compatible_single_client_python/ops/pad.py index 120a8f0b0ee3044ee096667081aa5b8631dd2cbd..20aa13d26699c3f6d809c704f75c835e3fbf0dc7 100644 --- a/oneflow/compatible_single_client_python/ops/pad.py +++ b/oneflow/compatible_single_client_python/ops/pad.py @@ -18,11 +18,11 @@ from __future__ import absolute_import from typing import Optional, Sequence, Union from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.framework import id_util as id_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import id_util as id_util +from oneflow.compatible.single_client.python.framework import ( remote_blob as remote_blob_util, ) -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, stable_api, ) diff --git a/oneflow/compatible_single_client_python/ops/partial_fc_sample.py b/oneflow/compatible_single_client_python/ops/partial_fc_sample.py index 269321c718380bebd9cca897c7f014237ddceb8f..2edc2add786134ba3193bfa9994f644f5762911a 100644 --- a/oneflow/compatible_single_client_python/ops/partial_fc_sample.py +++ b/oneflow/compatible_single_client_python/ops/partial_fc_sample.py @@ -22,14 +22,14 @@ from oneflow.compatible.single_client.core.operator import op_conf_pb2 as op_con from oneflow.compatible.single_client.core.register import ( logical_blob_id_pb2 as logical_blob_id_util, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( distribute as distribute_util, ) -from oneflow.compatible_single_client_python.framework import id_util as id_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import id_util as id_util +from oneflow.compatible.single_client.python.framework import ( remote_blob as remote_blob_util, ) -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export from typing import Optional, Union import oneflow._oneflow_internal diff --git a/oneflow/compatible_single_client_python/ops/prelu.py b/oneflow/compatible_single_client_python/ops/prelu.py index 9963d0a974788c8d0e27631675a0318a5cc05ce0..0e6012222e430f0e47dc3d1fd8d0f28dc555866e 100644 --- a/oneflow/compatible_single_client_python/ops/prelu.py +++ b/oneflow/compatible_single_client_python/ops/prelu.py @@ -15,7 +15,7 @@ limitations under the License. """ from __future__ import absolute_import from typing import Optional, Sequence -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export from oneflow.compatible import single_client as flow from oneflow.compatible.single_client.core.operator import op_conf_pb2 as op_conf_util @@ -25,10 +25,10 @@ from oneflow.compatible.single_client.core.job import ( from oneflow.compatible.single_client.core.job import ( regularizer_conf_pb2 as regularizer_conf_util, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( distribute as distribute_util, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( remote_blob as remote_blob_util, ) import oneflow._oneflow_internal diff --git a/oneflow/compatible_single_client_python/ops/quantize_ops.py b/oneflow/compatible_single_client_python/ops/quantize_ops.py index e12e3f90a314ab2a85f1ddc91ad3575b9c9500fd..58c4bdb15c961d64161fd5d11160f9c33f9cf180 100644 --- a/oneflow/compatible_single_client_python/ops/quantize_ops.py +++ b/oneflow/compatible_single_client_python/ops/quantize_ops.py @@ -15,11 +15,11 @@ limitations under the License. """ from __future__ import absolute_import from typing import Tuple, Optional -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.framework import id_util as id_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import id_util as id_util +from oneflow.compatible.single_client.python.framework import ( remote_blob as remote_blob_util, ) import oneflow._oneflow_internal diff --git a/oneflow/compatible_single_client_python/ops/random_ops.py b/oneflow/compatible_single_client_python/ops/random_ops.py index 0d16a2b3eba536e1f5dab7b665c5bceebfb25364..2cb1bf150c7afea78c7b7869fe717c9bc521fcf3 100644 --- a/oneflow/compatible_single_client_python/ops/random_ops.py +++ b/oneflow/compatible_single_client_python/ops/random_ops.py @@ -15,14 +15,14 @@ limitations under the License. """ from __future__ import absolute_import from typing import Optional -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.framework import id_util as id_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import id_util as id_util +from oneflow.compatible.single_client.python.framework import ( remote_blob as remote_blob_util, ) -from oneflow.compatible_single_client_python.framework import module as module_util +from oneflow.compatible.single_client.python.framework import module as module_util import oneflow._oneflow_internal diff --git a/oneflow/compatible_single_client_python/ops/random_util.py b/oneflow/compatible_single_client_python/ops/random_util.py index 96c2c68087511b1a37070a7d518d7c47c4326e1e..17421707399f4cf487c7587402d7a1b6efb5d19d 100644 --- a/oneflow/compatible_single_client_python/ops/random_util.py +++ b/oneflow/compatible_single_client_python/ops/random_util.py @@ -13,13 +13,13 @@ 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. """ -from oneflow.compatible_single_client_python.framework import hob as hob -from oneflow.compatible_single_client_python.lib.core import enable_if as enable_if +from oneflow.compatible.single_client.python.framework import hob as hob +from oneflow.compatible.single_client.python.lib.core import enable_if as enable_if import typing import random import sys -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export @oneflow_export("random.gen_seed") diff --git a/oneflow/compatible_single_client_python/ops/reduce_mean.py b/oneflow/compatible_single_client_python/ops/reduce_mean.py index d37b4bbbeedc62a01440ee126bd44043077d61d9..e2e44fbcd7b4fea025656e41ca4a753570028169 100644 --- a/oneflow/compatible_single_client_python/ops/reduce_mean.py +++ b/oneflow/compatible_single_client_python/ops/reduce_mean.py @@ -23,11 +23,11 @@ from oneflow.compatible.single_client.core.operator import op_conf_pb2 as op_con from oneflow.compatible.single_client.core.register import ( logical_blob_id_pb2 as logical_blob_id_util, ) -from oneflow.compatible_single_client_python.framework import id_util as id_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import id_util as id_util +from oneflow.compatible.single_client.python.framework import ( remote_blob as remote_blob_util, ) -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export import oneflow._oneflow_internal diff --git a/oneflow/compatible_single_client_python/ops/reduce_ops.py b/oneflow/compatible_single_client_python/ops/reduce_ops.py index 7956c481104527b0064d6a4d644d92b2c5a6ffc9..ebdd80c81f036e3b9a0da488406eb2c8d0709c18 100644 --- a/oneflow/compatible_single_client_python/ops/reduce_ops.py +++ b/oneflow/compatible_single_client_python/ops/reduce_ops.py @@ -21,14 +21,14 @@ from oneflow.compatible.single_client.core.operator import op_conf_pb2 as op_con from oneflow.compatible.single_client.core.register import ( logical_blob_id_pb2 as logical_blob_id_util, ) -from oneflow.compatible_single_client_python.framework import id_util as id_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import id_util as id_util +from oneflow.compatible.single_client.python.framework import ( interpret_util as interpret_util, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( remote_blob as remote_blob_util, ) -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export import oneflow._oneflow_internal diff --git a/oneflow/compatible_single_client_python/ops/regularizer_util.py b/oneflow/compatible_single_client_python/ops/regularizer_util.py index 5043db3e3322673baeb99741541632372474aff6..1d50aa693212aa856268f877f2cae91afe6aed51 100644 --- a/oneflow/compatible_single_client_python/ops/regularizer_util.py +++ b/oneflow/compatible_single_client_python/ops/regularizer_util.py @@ -19,7 +19,7 @@ from oneflow.compatible.single_client.core.operator import op_conf_pb2 as op_con from oneflow.compatible.single_client.core.job import ( regularizer_conf_pb2 as regularizer_conf_util, ) -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export @oneflow_export("regularizers.l1_l2") diff --git a/oneflow/compatible_single_client_python/ops/sort_ops.py b/oneflow/compatible_single_client_python/ops/sort_ops.py index 654bc8bc591dcaf94a8071a02c25f9a444aa63ab..a9dbf349e6ed13dfc284d7cd5f3b4d6f7581a591 100644 --- a/oneflow/compatible_single_client_python/ops/sort_ops.py +++ b/oneflow/compatible_single_client_python/ops/sort_ops.py @@ -18,18 +18,18 @@ from __future__ import absolute_import from typing import Optional from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.framework import id_util as id_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import id_util as id_util +from oneflow.compatible.single_client.python.framework import ( remote_blob as remote_blob_util, ) -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, stable_api, ) -from oneflow.compatible_single_client_python.ops.transpose_util import ( +from oneflow.compatible.single_client.python.ops.transpose_util import ( get_perm_when_transpose_axis_to_last_dim, ) -from oneflow.compatible_single_client_python.ops.transpose_util import get_inversed_perm +from oneflow.compatible.single_client.python.ops.transpose_util import get_inversed_perm import oneflow._oneflow_internal diff --git a/oneflow/compatible_single_client_python/ops/summary_ops.py b/oneflow/compatible_single_client_python/ops/summary_ops.py index 2c80183268bd7acc76ddd060204e7ada01d72a04..515a284d2ae54183b9477cad0bddfef2c7b28ec0 100644 --- a/oneflow/compatible_single_client_python/ops/summary_ops.py +++ b/oneflow/compatible_single_client_python/ops/summary_ops.py @@ -15,9 +15,9 @@ limitations under the License. """ from __future__ import absolute_import -from oneflow.compatible_single_client_python.framework import id_util as id_util -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export -from oneflow.compatible_single_client_python.ops import ( +from oneflow.compatible.single_client.python.framework import id_util as id_util +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.ops import ( user_op_builder as user_op_builder, ) diff --git a/oneflow/compatible_single_client_python/ops/tensor_buffer_ops.py b/oneflow/compatible_single_client_python/ops/tensor_buffer_ops.py index 5839c7686628bad0376b35ac8428c995c95ea531..791bd3f88deae9226ac658ff2fa9bdd9b9ba7afa 100644 --- a/oneflow/compatible_single_client_python/ops/tensor_buffer_ops.py +++ b/oneflow/compatible_single_client_python/ops/tensor_buffer_ops.py @@ -20,8 +20,8 @@ import operator from oneflow.compatible import single_client as flow import oneflow._oneflow_internal -from oneflow.compatible_single_client_python.framework import id_util as id_util -from oneflow.compatible_single_client_python.oneflow_export import ( +from oneflow.compatible.single_client.python.framework import id_util as id_util +from oneflow.compatible.single_client.python.oneflow_export import ( oneflow_export, stable_api, ) diff --git a/oneflow/compatible_single_client_python/ops/two_stage_reduce.py b/oneflow/compatible_single_client_python/ops/two_stage_reduce.py index 85940cf715ad4fc55a38c82594f99475968db41c..fe6efeee8a3939534a00be1813acf92a1208448f 100644 --- a/oneflow/compatible_single_client_python/ops/two_stage_reduce.py +++ b/oneflow/compatible_single_client_python/ops/two_stage_reduce.py @@ -18,19 +18,19 @@ from __future__ import absolute_import from typing import Optional, Sequence, Union from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( distribute as distribute_util, ) -from oneflow.compatible_single_client_python.framework import hob as hob -from oneflow.compatible_single_client_python.framework import id_util as id_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import hob as hob +from oneflow.compatible.single_client.python.framework import id_util as id_util +from oneflow.compatible.single_client.python.framework import ( remote_blob as remote_blob_util, ) -from oneflow.compatible_single_client_python.lib.core import enable_if as enable_if -from oneflow.compatible_single_client_python.ops import ( +from oneflow.compatible.single_client.python.lib.core import enable_if as enable_if +from oneflow.compatible.single_client.python.ops import ( user_op_builder as user_op_builder, ) -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export import oneflow._oneflow_internal diff --git a/oneflow/compatible_single_client_python/ops/user_data_ops.py b/oneflow/compatible_single_client_python/ops/user_data_ops.py index afcd548ccfed075f2d7afd24c37be07f5437df3b..59c822be02fe0a9ce1b087beb1fbfa5095eca13d 100644 --- a/oneflow/compatible_single_client_python/ops/user_data_ops.py +++ b/oneflow/compatible_single_client_python/ops/user_data_ops.py @@ -16,13 +16,13 @@ limitations under the License. from __future__ import absolute_import from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.framework import id_util as id_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import id_util as id_util +from oneflow.compatible.single_client.python.framework import ( remote_blob as remote_blob_util, ) -from oneflow.compatible_single_client_python.framework import module as module_util +from oneflow.compatible.single_client.python.framework import module as module_util import oneflow._oneflow_internal -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export from typing import Optional, Sequence, Union import random import sys diff --git a/oneflow/compatible_single_client_python/ops/user_op_builder.py b/oneflow/compatible_single_client_python/ops/user_op_builder.py index 9c4433a6f57a9302468b06f5604d4c6ffc12b34f..0470afe5f2d900c99bcbfc1f1fe10446470b9f51 100644 --- a/oneflow/compatible_single_client_python/ops/user_op_builder.py +++ b/oneflow/compatible_single_client_python/ops/user_op_builder.py @@ -13,22 +13,22 @@ 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. """ -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( interpret_util as interpret_util, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( remote_blob as remote_blob_util, ) -from oneflow.compatible_single_client_python.framework import c_api_util as c_api_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import c_api_util as c_api_util +from oneflow.compatible.single_client.python.framework import ( compile_context as compile_context, ) -from oneflow.compatible_single_client_python.framework import distribute as distribute -from oneflow.compatible_single_client_python.framework import hob as hob -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import distribute as distribute +from oneflow.compatible.single_client.python.framework import hob as hob +from oneflow.compatible.single_client.python.framework import ( remote_blob as remote_blob_util, ) -from oneflow.compatible_single_client_python.lib.core import enable_if as enable_if +from oneflow.compatible.single_client.python.lib.core import enable_if as enable_if from oneflow.compatible.single_client.core.operator import op_conf_pb2 as op_conf_util from oneflow.compatible.single_client.core.framework import ( user_op_attr_pb2 as attr_value_pb, @@ -42,20 +42,20 @@ from oneflow.compatible.single_client.core.register import ( from oneflow._oneflow_internal.oneflow.core.common import shape as shape_cfg from oneflow._oneflow_internal.oneflow.core.common import data_type as data_type_cfg from oneflow.compatible import single_client as flow -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export -from oneflow.compatible_single_client_python.framework import hob as hob -from oneflow.compatible_single_client_python.experimental import ( +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.framework import hob as hob +from oneflow.compatible.single_client.python.experimental import ( name_scope as name_scope, ) from oneflow.compatible.single_client.core.eager import ( eager_symbol_pb2 as eager_symbol_util, ) -from oneflow.compatible_single_client_python.eager import ( +from oneflow.compatible.single_client.python.eager import ( eager_blob_util as eager_blob_util, ) -from oneflow.compatible_single_client_python.lib.core import enable_if as enable_if +from oneflow.compatible.single_client.python.lib.core import enable_if as enable_if import random -from oneflow.compatible_single_client_python.eager import gradient_util as gradient_util +from oneflow.compatible.single_client.python.eager import gradient_util as gradient_util from oneflow.compatible import single_client as flow import oneflow._oneflow_internal import traceback diff --git a/oneflow/compatible_single_client_python/ops/util/custom_op_module.py b/oneflow/compatible_single_client_python/ops/util/custom_op_module.py index 0c43b1802d1334386146ac45a9e6c0ca55b0a17b..f8b4e15b716e3e074cffbbb3ba23a4bc4c826d44 100644 --- a/oneflow/compatible_single_client_python/ops/util/custom_op_module.py +++ b/oneflow/compatible_single_client_python/ops/util/custom_op_module.py @@ -24,8 +24,8 @@ import sys import sysconfig import numpy -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.framework import ( sysconfig as oneflow_sysconfig, ) from oneflow.compatible import single_client as flow diff --git a/oneflow/compatible_single_client_python/ops/watch.py b/oneflow/compatible_single_client_python/ops/watch.py index 8476b7c3a5cc083c62b733def5143e9c79ba32ea..06d84bb6109607ab177e7bd552b157de896351d0 100644 --- a/oneflow/compatible_single_client_python/ops/watch.py +++ b/oneflow/compatible_single_client_python/ops/watch.py @@ -19,30 +19,30 @@ import uuid from typing import Callable, Optional, Union from oneflow.compatible.single_client.core.operator import op_conf_pb2 as op_conf_util -from oneflow.compatible_single_client_python.framework import c_api_util as c_api_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import c_api_util as c_api_util +from oneflow.compatible.single_client.python.framework import ( session_context as session_ctx, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( compile_context as compile_context, ) -from oneflow.compatible_single_client_python.framework import id_util as id_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import id_util as id_util +from oneflow.compatible.single_client.python.framework import ( local_blob as local_blob_util, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( remote_blob as remote_blob_util, ) -from oneflow.compatible_single_client_python.framework import watcher as watcher_util -from oneflow.compatible_single_client_python.framework import typing as oft -from oneflow.compatible_single_client_python.framework import typing_util as oft_util -from oneflow.compatible_single_client_python.lib.core import enable_if as enable_if -from oneflow.compatible_single_client_python.framework import hob as hob +from oneflow.compatible.single_client.python.framework import watcher as watcher_util +from oneflow.compatible.single_client.python.framework import typing as oft +from oneflow.compatible.single_client.python.framework import typing_util as oft_util +from oneflow.compatible.single_client.python.lib.core import enable_if as enable_if +from oneflow.compatible.single_client.python.framework import hob as hob from oneflow.compatible.single_client.core.job.lbi_diff_watcher_info_pb2 import ( LbiAndDiffWatcherUuidPair, ) -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export -from oneflow.compatible_single_client_python import eager as eager_util +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python import eager as eager_util from oneflow.compatible import single_client as flow import oneflow._oneflow_internal from oneflow._oneflow_internal import ConsistentBlob, MirroredBlob diff --git a/oneflow/compatible_single_client_python/serving/inference_session.py b/oneflow/compatible_single_client_python/serving/inference_session.py index d902fabfab6c7d4ec6103d30ed52991215f0448b..e7dc4789e16f8570a184536044cc4a98480b5d58 100644 --- a/oneflow/compatible_single_client_python/serving/inference_session.py +++ b/oneflow/compatible_single_client_python/serving/inference_session.py @@ -38,28 +38,28 @@ from oneflow.compatible.single_client.core.operator import ( from oneflow.compatible.single_client.core.serving import ( saved_model_pb2 as saved_model_pb, ) -from oneflow.compatible_single_client_python.framework import c_api_util as c_api_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import c_api_util as c_api_util +from oneflow.compatible.single_client.python.framework import ( compile_context as compile_ctx, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( session_util as session_util, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( placement_util as placement_util, ) -from oneflow.compatible_single_client_python.framework import scope_util as scope_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import scope_util as scope_util +from oneflow.compatible.single_client.python.framework import ( runtime_mode as runtime_mode, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( job_instance as job_instance_util, ) -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import ( input_blob_def as input_blob_util, ) -from oneflow.compatible_single_client_python.framework import dtype as dtype_util -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.framework import dtype as dtype_util +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export def _is_int(val): diff --git a/oneflow/compatible_single_client_python/serving/saved_model_builder.py b/oneflow/compatible_single_client_python/serving/saved_model_builder.py index aeb82f0627b0beeb3c784d9b967744227a873cd8..1f1a2c5814db92e6935d05fee583531235442d8c 100644 --- a/oneflow/compatible_single_client_python/serving/saved_model_builder.py +++ b/oneflow/compatible_single_client_python/serving/saved_model_builder.py @@ -20,8 +20,8 @@ from google.protobuf import text_format from oneflow.compatible import single_client as flow import oneflow._oneflow_internal -from oneflow.compatible_single_client_python.framework import c_api_util as c_api_util -from oneflow.compatible_single_client_python.framework import ( +from oneflow.compatible.single_client.python.framework import c_api_util as c_api_util +from oneflow.compatible.single_client.python.framework import ( session_context as session_ctx, ) from oneflow.compatible.single_client.core.serving import ( @@ -37,7 +37,7 @@ from oneflow.compatible.single_client.core.operator import ( from oneflow.compatible.single_client.core.job import ( sbp_parallel_pb2 as sbp_parallel_pb, ) -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export @oneflow_export("saved_model.ModelBuilder") diff --git a/oneflow/compatible_single_client_python/summary/summary_graph.py b/oneflow/compatible_single_client_python/summary/summary_graph.py index 93b83c1307017976c3d3fdd0b933ccfb282a8f63..b1944dc55ba52dea6ddeeeeaad09d03215a3fade 100644 --- a/oneflow/compatible_single_client_python/summary/summary_graph.py +++ b/oneflow/compatible_single_client_python/summary/summary_graph.py @@ -15,7 +15,7 @@ limitations under the License. """ import os from oneflow.compatible.single_client.core.summary import projector_pb2 as projector_pb2 -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export import oneflow._oneflow_internal import time import logging diff --git a/oneflow/compatible_single_client_python/summary/summary_hparams.py b/oneflow/compatible_single_client_python/summary/summary_hparams.py index 1d63556450c543b2d202c38e0f90d7f28678d244..0f4f3117ffb2fab332d0a918f3432ca59340c52e 100644 --- a/oneflow/compatible_single_client_python/summary/summary_hparams.py +++ b/oneflow/compatible_single_client_python/summary/summary_hparams.py @@ -30,7 +30,7 @@ from oneflow.compatible.single_client.core.summary import summary_pb2 as summary from oneflow.compatible.single_client.core.summary import event_pb2 as event_pb2 from oneflow.compatible.single_client.core.summary import tensor_pb2 as tensor_pb2 from oneflow.compatible.single_client.core.summary import projector_pb2 as projector_pb2 -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export from oneflow.compatible import single_client as flow diff --git a/oneflow/compatible_single_client_python/summary/summary_projector.py b/oneflow/compatible_single_client_python/summary/summary_projector.py index 0cbcfbf726aaf083d9a34a979e7353ea3d0cf3fb..1a491f9ff5715ee868d5825c44526618d9c677d0 100644 --- a/oneflow/compatible_single_client_python/summary/summary_projector.py +++ b/oneflow/compatible_single_client_python/summary/summary_projector.py @@ -15,7 +15,7 @@ limitations under the License. """ import os from oneflow.compatible.single_client.core.summary import projector_pb2 as projector_pb2 -from oneflow.compatible_single_client_python.oneflow_export import oneflow_export +from oneflow.compatible.single_client.python.oneflow_export import oneflow_export import time from oneflow.compatible import single_client as flow diff --git a/tools/conver_single_client_name_space.py b/tools/conver_single_client_name_space.py deleted file mode 100644 index 9755c913e865228e037e3ed34d75ed2788a98113..0000000000000000000000000000000000000000 --- a/tools/conver_single_client_name_space.py +++ /dev/null @@ -1,30 +0,0 @@ -import sys -import os -import multiprocessing - -project_source_dir = sys.argv[1] -single_client_python_dir = project_source_dir + "/compatible" - - -single_client_python_files = [] -for root, dirs, files in os.walk(project_source_dir): - for file in files: - file_path = os.path.join(root, file) - if file_path.endswith(".py"): - single_client_python_files.append(file_path) - -assert len(single_client_python_files) > 0 - - -def convert_name_sapce(python_file): - os.system( - "sed 's/compatible_single_client_python/compatible\.single_client\.python/g' -i " - + python_file - ) - - -if __name__ == "__main__": - with multiprocessing.Pool(processes=multiprocessing.cpu_count()) as pool: - pool.map(convert_name_sapce, single_client_python_files) - pool.close() - pool.join()