mirror of
https://github.com/zebrajr/tensorflow.git
synced 2025-12-07 12:20:24 +01:00
Publish train_and_evaluate and associated classes.
PiperOrigin-RevId: 171066379
This commit is contained in:
parent
3b4477000d
commit
39565c0cbc
|
|
@ -29,29 +29,47 @@ from tensorflow.python.estimator.canned.parsing_utils import classifier_parse_ex
|
||||||
from tensorflow.python.estimator.canned.parsing_utils import regressor_parse_example_spec
|
from tensorflow.python.estimator.canned.parsing_utils import regressor_parse_example_spec
|
||||||
from tensorflow.python.estimator.estimator import Estimator
|
from tensorflow.python.estimator.estimator import Estimator
|
||||||
from tensorflow.python.estimator.export import export_lib as export
|
from tensorflow.python.estimator.export import export_lib as export
|
||||||
|
from tensorflow.python.estimator.exporter import Exporter
|
||||||
|
from tensorflow.python.estimator.exporter import LatestExporter
|
||||||
from tensorflow.python.estimator.inputs import inputs
|
from tensorflow.python.estimator.inputs import inputs
|
||||||
from tensorflow.python.estimator.model_fn import EstimatorSpec
|
from tensorflow.python.estimator.model_fn import EstimatorSpec
|
||||||
from tensorflow.python.estimator.model_fn import ModeKeys
|
from tensorflow.python.estimator.model_fn import ModeKeys
|
||||||
from tensorflow.python.estimator.run_config import RunConfig
|
from tensorflow.python.estimator.run_config import RunConfig
|
||||||
|
from tensorflow.python.estimator.training import EvalSpec
|
||||||
|
from tensorflow.python.estimator.training import train_and_evaluate
|
||||||
|
from tensorflow.python.estimator.training import TrainSpec
|
||||||
|
|
||||||
|
|
||||||
from tensorflow.python.util.all_util import remove_undocumented
|
from tensorflow.python.util.all_util import remove_undocumented
|
||||||
# pylint: enable=unused-import,line-too-long,wildcard-import
|
# pylint: enable=unused-import,line-too-long,wildcard-import
|
||||||
|
|
||||||
_allowed_symbols = [
|
_allowed_symbols = [
|
||||||
|
# Canned Estimators
|
||||||
'DNNClassifier',
|
'DNNClassifier',
|
||||||
'DNNRegressor',
|
'DNNRegressor',
|
||||||
'DNNLinearCombinedClassifier',
|
'DNNLinearCombinedClassifier',
|
||||||
'DNNLinearCombinedRegressor',
|
'DNNLinearCombinedRegressor',
|
||||||
'LinearClassifier',
|
'LinearClassifier',
|
||||||
'LinearRegressor',
|
'LinearRegressor',
|
||||||
|
|
||||||
|
# I/O
|
||||||
'classifier_parse_example_spec',
|
'classifier_parse_example_spec',
|
||||||
'regressor_parse_example_spec',
|
'regressor_parse_example_spec',
|
||||||
'inputs',
|
'inputs',
|
||||||
'export',
|
'export',
|
||||||
|
|
||||||
|
# Estimator
|
||||||
'Estimator',
|
'Estimator',
|
||||||
'EstimatorSpec',
|
'EstimatorSpec',
|
||||||
'ModeKeys',
|
'ModeKeys',
|
||||||
'RunConfig',
|
'RunConfig',
|
||||||
|
|
||||||
|
# Training utilities
|
||||||
|
'train_and_evaluate',
|
||||||
|
'EvalSpec',
|
||||||
|
'TrainSpec',
|
||||||
|
'Exporter',
|
||||||
|
'LatestExporter',
|
||||||
]
|
]
|
||||||
|
|
||||||
remove_undocumented(__name__, allowed_exception_list=_allowed_symbols)
|
remove_undocumented(__name__, allowed_exception_list=_allowed_symbols)
|
||||||
|
|
|
||||||
|
|
@ -479,10 +479,6 @@ class _StopAtSecsHook(session_run_hook.SessionRunHook):
|
||||||
run_context.request_stop()
|
run_context.request_stop()
|
||||||
|
|
||||||
|
|
||||||
class UnimplementedError(Exception):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class _TrainingExecutor(object):
|
class _TrainingExecutor(object):
|
||||||
"""The executor to run `Estimator` training and evaluation.
|
"""The executor to run `Estimator` training and evaluation.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,43 @@
|
||||||
|
path: "tensorflow.estimator.EvalSpec"
|
||||||
|
tf_class {
|
||||||
|
is_instance: "<class \'tensorflow.python.estimator.training.EvalSpec\'>"
|
||||||
|
is_instance: "<class \'tensorflow.python.estimator.training.EvalSpec\'>"
|
||||||
|
is_instance: "<type \'tuple\'>"
|
||||||
|
member {
|
||||||
|
name: "exporters"
|
||||||
|
mtype: "<type \'property\'>"
|
||||||
|
}
|
||||||
|
member {
|
||||||
|
name: "hooks"
|
||||||
|
mtype: "<type \'property\'>"
|
||||||
|
}
|
||||||
|
member {
|
||||||
|
name: "input_fn"
|
||||||
|
mtype: "<type \'property\'>"
|
||||||
|
}
|
||||||
|
member {
|
||||||
|
name: "name"
|
||||||
|
mtype: "<type \'property\'>"
|
||||||
|
}
|
||||||
|
member {
|
||||||
|
name: "start_delay_secs"
|
||||||
|
mtype: "<type \'property\'>"
|
||||||
|
}
|
||||||
|
member {
|
||||||
|
name: "steps"
|
||||||
|
mtype: "<type \'property\'>"
|
||||||
|
}
|
||||||
|
member {
|
||||||
|
name: "throttle_secs"
|
||||||
|
mtype: "<type \'property\'>"
|
||||||
|
}
|
||||||
|
member_method {
|
||||||
|
name: "__init__"
|
||||||
|
}
|
||||||
|
member_method {
|
||||||
|
name: "count"
|
||||||
|
}
|
||||||
|
member_method {
|
||||||
|
name: "index"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
path: "tensorflow.estimator.Exporter"
|
||||||
|
tf_class {
|
||||||
|
is_instance: "<class \'tensorflow.python.estimator.exporter.Exporter\'>"
|
||||||
|
is_instance: "<type \'object\'>"
|
||||||
|
member {
|
||||||
|
name: "name"
|
||||||
|
mtype: "<class \'abc.abstractproperty\'>"
|
||||||
|
}
|
||||||
|
member_method {
|
||||||
|
name: "__init__"
|
||||||
|
}
|
||||||
|
member_method {
|
||||||
|
name: "export"
|
||||||
|
argspec: "args=[\'self\', \'estimator\', \'export_path\', \'checkpoint_path\', \'eval_result\'], varargs=None, keywords=None, defaults=None"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
path: "tensorflow.estimator.LatestExporter"
|
||||||
|
tf_class {
|
||||||
|
is_instance: "<class \'tensorflow.python.estimator.exporter.LatestExporter\'>"
|
||||||
|
is_instance: "<class \'tensorflow.python.estimator.exporter.Exporter\'>"
|
||||||
|
is_instance: "<type \'object\'>"
|
||||||
|
member {
|
||||||
|
name: "name"
|
||||||
|
mtype: "<type \'property\'>"
|
||||||
|
}
|
||||||
|
member_method {
|
||||||
|
name: "__init__"
|
||||||
|
argspec: "args=[\'self\', \'name\', \'serving_input_fn\', \'assets_extra\', \'as_text\', \'exports_to_keep\'], varargs=None, keywords=None, defaults=[\'None\', \'False\', \'5\'], "
|
||||||
|
}
|
||||||
|
member_method {
|
||||||
|
name: "export"
|
||||||
|
argspec: "args=[\'self\', \'estimator\', \'export_path\', \'checkpoint_path\', \'eval_result\'], varargs=None, keywords=None, defaults=None"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
path: "tensorflow.estimator.TrainSpec"
|
||||||
|
tf_class {
|
||||||
|
is_instance: "<class \'tensorflow.python.estimator.training.TrainSpec\'>"
|
||||||
|
is_instance: "<class \'tensorflow.python.estimator.training.TrainSpec\'>"
|
||||||
|
is_instance: "<type \'tuple\'>"
|
||||||
|
member {
|
||||||
|
name: "hooks"
|
||||||
|
mtype: "<type \'property\'>"
|
||||||
|
}
|
||||||
|
member {
|
||||||
|
name: "input_fn"
|
||||||
|
mtype: "<type \'property\'>"
|
||||||
|
}
|
||||||
|
member {
|
||||||
|
name: "max_steps"
|
||||||
|
mtype: "<type \'property\'>"
|
||||||
|
}
|
||||||
|
member_method {
|
||||||
|
name: "__init__"
|
||||||
|
}
|
||||||
|
member_method {
|
||||||
|
name: "count"
|
||||||
|
}
|
||||||
|
member_method {
|
||||||
|
name: "index"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -24,6 +24,18 @@ tf_module {
|
||||||
name: "EstimatorSpec"
|
name: "EstimatorSpec"
|
||||||
mtype: "<type \'type\'>"
|
mtype: "<type \'type\'>"
|
||||||
}
|
}
|
||||||
|
member {
|
||||||
|
name: "EvalSpec"
|
||||||
|
mtype: "<type \'type\'>"
|
||||||
|
}
|
||||||
|
member {
|
||||||
|
name: "Exporter"
|
||||||
|
mtype: "<type \'type\'>"
|
||||||
|
}
|
||||||
|
member {
|
||||||
|
name: "LatestExporter"
|
||||||
|
mtype: "<type \'type\'>"
|
||||||
|
}
|
||||||
member {
|
member {
|
||||||
name: "LinearClassifier"
|
name: "LinearClassifier"
|
||||||
mtype: "<type \'type\'>"
|
mtype: "<type \'type\'>"
|
||||||
|
|
@ -40,6 +52,10 @@ tf_module {
|
||||||
name: "RunConfig"
|
name: "RunConfig"
|
||||||
mtype: "<type \'type\'>"
|
mtype: "<type \'type\'>"
|
||||||
}
|
}
|
||||||
|
member {
|
||||||
|
name: "TrainSpec"
|
||||||
|
mtype: "<type \'type\'>"
|
||||||
|
}
|
||||||
member {
|
member {
|
||||||
name: "export"
|
name: "export"
|
||||||
mtype: "<type \'module\'>"
|
mtype: "<type \'module\'>"
|
||||||
|
|
@ -56,4 +72,8 @@ tf_module {
|
||||||
name: "regressor_parse_example_spec"
|
name: "regressor_parse_example_spec"
|
||||||
argspec: "args=[\'feature_columns\', \'label_key\', \'label_dtype\', \'label_default\', \'label_dimension\', \'weight_column\'], varargs=None, keywords=None, defaults=[\"<dtype: \'float32\'>\", \'None\', \'1\', \'None\'], "
|
argspec: "args=[\'feature_columns\', \'label_key\', \'label_dtype\', \'label_default\', \'label_dimension\', \'weight_column\'], varargs=None, keywords=None, defaults=[\"<dtype: \'float32\'>\", \'None\', \'1\', \'None\'], "
|
||||||
}
|
}
|
||||||
|
member_method {
|
||||||
|
name: "train_and_evaluate"
|
||||||
|
argspec: "args=[\'estimator\', \'train_spec\', \'eval_spec\'], varargs=None, keywords=None, defaults=None"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user