diff --git a/tensorflow_ranking/examples/keras/BUILD b/tensorflow_ranking/examples/keras/BUILD index 5ef77bb..b2033fa 100644 --- a/tensorflow_ranking/examples/keras/BUILD +++ b/tensorflow_ranking/examples/keras/BUILD @@ -184,7 +184,7 @@ py_library( # tensorflow_models/official/core:config_definitions dep, # tensorflow_models/official/core:exp_factory dep, # tensorflow_models/official/modeling/optimization dep, - "//tensorflow_ranking/python/keras/premade:tfrbert_task", + "//tensorflow_ranking", ], ) diff --git a/tensorflow_ranking/examples/keras/tfrbert_task_experiments.py b/tensorflow_ranking/examples/keras/tfrbert_task_experiments.py index d3a1bbf..aac3f9c 100644 --- a/tensorflow_ranking/examples/keras/tfrbert_task_experiments.py +++ b/tensorflow_ranking/examples/keras/tfrbert_task_experiments.py @@ -18,18 +18,17 @@ from official.core import config_definitions as cfg from official.core import exp_factory from official.modeling import optimization -from tensorflow_ranking.python.keras.premade import tfrbert_task +import tensorflow_ranking as tfr @exp_factory.register_config_factory('tfr_bert') def tfrbert_exp() -> cfg.ExperimentConfig: """Defines a TFR-BERT experiment.""" config = cfg.ExperimentConfig( - task=tfrbert_task.TFRBertConfig( - train_data=tfrbert_task.TFRBertDataConfig(), - validation_data=tfrbert_task.TFRBertDataConfig( - is_training=False, - drop_remainder=False)), + task=tfr.keras.premade.TFRBertConfig( + train_data=tfr.keras.premade.TFRBertDataConfig(), + validation_data=tfr.keras.premade.TFRBertDataConfig( + is_training=False, drop_remainder=False)), trainer=cfg.TrainerConfig( optimizer_config=optimization.OptimizationConfig({ 'optimizer': { diff --git a/tensorflow_ranking/g3doc/api_docs/python/tfr.md b/tensorflow_ranking/g3doc/api_docs/python/tfr.md index 781e0d1..3056e79 100644 --- a/tensorflow_ranking/g3doc/api_docs/python/tfr.md +++ b/tensorflow_ranking/g3doc/api_docs/python/tfr.md @@ -56,7 +56,7 @@ library. __version__ -`'0.4.1.dev'` +`'0.4.2.dev'` diff --git a/tensorflow_ranking/g3doc/api_docs/python/tfr/_api_cache.json b/tensorflow_ranking/g3doc/api_docs/python/tfr/_api_cache.json index e0828ab..5ff40b3 100644 --- a/tensorflow_ranking/g3doc/api_docs/python/tfr/_api_cache.json +++ b/tensorflow_ranking/g3doc/api_docs/python/tfr/_api_cache.json @@ -1246,6 +1246,208 @@ "tfr.keras.pipeline.SimplePipeline.build_callbacks": "tfr.keras.pipeline.ModelFitPipeline.build_callbacks", "tfr.keras.pipeline.SimplePipeline.export_saved_model": "tfr.keras.pipeline.ModelFitPipeline.export_saved_model", "tfr.keras.pipeline.SimplePipeline.train_and_validate": "tfr.keras.pipeline.ModelFitPipeline.train_and_validate", + "tfr.keras.premade.TFRBertConfig.__ge__": "tfr.keras.canned.DNNRankingNetwork.__ge__", + "tfr.keras.premade.TFRBertConfig.__gt__": "tfr.keras.canned.DNNRankingNetwork.__gt__", + "tfr.keras.premade.TFRBertConfig.__le__": "tfr.keras.canned.DNNRankingNetwork.__le__", + "tfr.keras.premade.TFRBertConfig.__lt__": "tfr.keras.canned.DNNRankingNetwork.__lt__", + "tfr.keras.premade.TFRBertConfig.__ne__": "tfr.keras.canned.DNNRankingNetwork.__ne__", + "tfr.keras.premade.TFRBertConfig.__new__": "tfr.keras.losses.ApproxMRRLoss.__new__", + "tfr.keras.premade.TFRBertDataConfig.IMMUTABLE_TYPES": "tfr.keras.premade.TFRBertConfig.IMMUTABLE_TYPES", + "tfr.keras.premade.TFRBertDataConfig.RESERVED_ATTR": "tfr.keras.premade.TFRBertConfig.RESERVED_ATTR", + "tfr.keras.premade.TFRBertDataConfig.SEQUENCE_TYPES": "tfr.keras.premade.TFRBertConfig.SEQUENCE_TYPES", + "tfr.keras.premade.TFRBertDataConfig.__contains__": "tfr.keras.premade.TFRBertConfig.__contains__", + "tfr.keras.premade.TFRBertDataConfig.__ge__": "tfr.keras.canned.DNNRankingNetwork.__ge__", + "tfr.keras.premade.TFRBertDataConfig.__gt__": "tfr.keras.canned.DNNRankingNetwork.__gt__", + "tfr.keras.premade.TFRBertDataConfig.__le__": "tfr.keras.canned.DNNRankingNetwork.__le__", + "tfr.keras.premade.TFRBertDataConfig.__lt__": "tfr.keras.canned.DNNRankingNetwork.__lt__", + "tfr.keras.premade.TFRBertDataConfig.__ne__": "tfr.keras.canned.DNNRankingNetwork.__ne__", + "tfr.keras.premade.TFRBertDataConfig.__new__": "tfr.keras.losses.ApproxMRRLoss.__new__", + "tfr.keras.premade.TFRBertDataConfig.as_dict": "tfr.keras.premade.TFRBertConfig.as_dict", + "tfr.keras.premade.TFRBertDataConfig.get": "tfr.keras.premade.TFRBertConfig.get", + "tfr.keras.premade.TFRBertDataConfig.lock": "tfr.keras.premade.TFRBertConfig.lock", + "tfr.keras.premade.TFRBertDataConfig.override": "tfr.keras.premade.TFRBertConfig.override", + "tfr.keras.premade.TFRBertDataConfig.replace": "tfr.keras.premade.TFRBertConfig.replace", + "tfr.keras.premade.TFRBertDataConfig.validate": "tfr.keras.premade.TFRBertConfig.validate", + "tfr.keras.premade.TFRBertDataLoader.__eq__": "tfr.keras.canned.DNNRankingNetwork.__eq__", + "tfr.keras.premade.TFRBertDataLoader.__ge__": "tfr.keras.canned.DNNRankingNetwork.__ge__", + "tfr.keras.premade.TFRBertDataLoader.__gt__": "tfr.keras.canned.DNNRankingNetwork.__gt__", + "tfr.keras.premade.TFRBertDataLoader.__le__": "tfr.keras.canned.DNNRankingNetwork.__le__", + "tfr.keras.premade.TFRBertDataLoader.__lt__": "tfr.keras.canned.DNNRankingNetwork.__lt__", + "tfr.keras.premade.TFRBertDataLoader.__ne__": "tfr.keras.canned.DNNRankingNetwork.__ne__", + "tfr.keras.premade.TFRBertDataLoader.__new__": "tfr.keras.losses.ApproxMRRLoss.__new__", + "tfr.keras.premade.TFRBertDataLoader.load": "tfr.keras.task.RankingDataLoader.load", + "tfr.keras.premade.TFRBertModelBuilder.__eq__": "tfr.keras.canned.DNNRankingNetwork.__eq__", + "tfr.keras.premade.TFRBertModelBuilder.__ge__": "tfr.keras.canned.DNNRankingNetwork.__ge__", + "tfr.keras.premade.TFRBertModelBuilder.__gt__": "tfr.keras.canned.DNNRankingNetwork.__gt__", + "tfr.keras.premade.TFRBertModelBuilder.__init__": "tfr.keras.model.ModelBuilder.__init__", + "tfr.keras.premade.TFRBertModelBuilder.__le__": "tfr.keras.canned.DNNRankingNetwork.__le__", + "tfr.keras.premade.TFRBertModelBuilder.__lt__": "tfr.keras.canned.DNNRankingNetwork.__lt__", + "tfr.keras.premade.TFRBertModelBuilder.__ne__": "tfr.keras.canned.DNNRankingNetwork.__ne__", + "tfr.keras.premade.TFRBertModelBuilder.__new__": "tfr.keras.losses.ApproxMRRLoss.__new__", + "tfr.keras.premade.TFRBertModelBuilder.create_inputs": "tfr.keras.model.ModelBuilder.create_inputs", + "tfr.keras.premade.TFRBertModelBuilder.preprocess": "tfr.keras.model.ModelBuilder.preprocess", + "tfr.keras.premade.TFRBertModelBuilder.score": "tfr.keras.model.ModelBuilder.score", + "tfr.keras.premade.TFRBertModelConfig.IMMUTABLE_TYPES": "tfr.keras.premade.TFRBertConfig.IMMUTABLE_TYPES", + "tfr.keras.premade.TFRBertModelConfig.RESERVED_ATTR": "tfr.keras.premade.TFRBertConfig.RESERVED_ATTR", + "tfr.keras.premade.TFRBertModelConfig.SEQUENCE_TYPES": "tfr.keras.premade.TFRBertConfig.SEQUENCE_TYPES", + "tfr.keras.premade.TFRBertModelConfig.__contains__": "tfr.keras.premade.TFRBertConfig.__contains__", + "tfr.keras.premade.TFRBertModelConfig.__ge__": "tfr.keras.canned.DNNRankingNetwork.__ge__", + "tfr.keras.premade.TFRBertModelConfig.__gt__": "tfr.keras.canned.DNNRankingNetwork.__gt__", + "tfr.keras.premade.TFRBertModelConfig.__le__": "tfr.keras.canned.DNNRankingNetwork.__le__", + "tfr.keras.premade.TFRBertModelConfig.__lt__": "tfr.keras.canned.DNNRankingNetwork.__lt__", + "tfr.keras.premade.TFRBertModelConfig.__ne__": "tfr.keras.canned.DNNRankingNetwork.__ne__", + "tfr.keras.premade.TFRBertModelConfig.__new__": "tfr.keras.losses.ApproxMRRLoss.__new__", + "tfr.keras.premade.TFRBertModelConfig.as_dict": "tfr.keras.premade.TFRBertConfig.as_dict", + "tfr.keras.premade.TFRBertModelConfig.get": "tfr.keras.premade.TFRBertConfig.get", + "tfr.keras.premade.TFRBertModelConfig.lock": "tfr.keras.premade.TFRBertConfig.lock", + "tfr.keras.premade.TFRBertModelConfig.override": "tfr.keras.premade.TFRBertConfig.override", + "tfr.keras.premade.TFRBertModelConfig.replace": "tfr.keras.premade.TFRBertConfig.replace", + "tfr.keras.premade.TFRBertModelConfig.validate": "tfr.keras.premade.TFRBertConfig.validate", + "tfr.keras.premade.TFRBertScorer.__call__": "tfr.keras.model.UnivariateScorer.__call__", + "tfr.keras.premade.TFRBertScorer.__eq__": "tfr.keras.canned.DNNRankingNetwork.__eq__", + "tfr.keras.premade.TFRBertScorer.__ge__": "tfr.keras.canned.DNNRankingNetwork.__ge__", + "tfr.keras.premade.TFRBertScorer.__gt__": "tfr.keras.canned.DNNRankingNetwork.__gt__", + "tfr.keras.premade.TFRBertScorer.__le__": "tfr.keras.canned.DNNRankingNetwork.__le__", + "tfr.keras.premade.TFRBertScorer.__lt__": "tfr.keras.canned.DNNRankingNetwork.__lt__", + "tfr.keras.premade.TFRBertScorer.__ne__": "tfr.keras.canned.DNNRankingNetwork.__ne__", + "tfr.keras.premade.TFRBertScorer.__new__": "tfr.keras.losses.ApproxMRRLoss.__new__", + "tfr.keras.premade.TFRBertTask.__eq__": "tfr.keras.canned.DNNRankingNetwork.__eq__", + "tfr.keras.premade.TFRBertTask.__ge__": "tfr.keras.canned.DNNRankingNetwork.__ge__", + "tfr.keras.premade.TFRBertTask.__gt__": "tfr.keras.canned.DNNRankingNetwork.__gt__", + "tfr.keras.premade.TFRBertTask.__le__": "tfr.keras.canned.DNNRankingNetwork.__le__", + "tfr.keras.premade.TFRBertTask.__lt__": "tfr.keras.canned.DNNRankingNetwork.__lt__", + "tfr.keras.premade.TFRBertTask.__ne__": "tfr.keras.canned.DNNRankingNetwork.__ne__", + "tfr.keras.premade.TFRBertTask.__new__": "tfr.keras.losses.ApproxMRRLoss.__new__", + "tfr.keras.premade.TFRBertTask.build_losses": "tfr.keras.task.RankingTask.build_losses", + "tfr.keras.premade.TFRBertTask.build_metrics": "tfr.keras.task.RankingTask.build_metrics", + "tfr.keras.premade.TFRBertTask.name_scope": "tfr.keras.canned.DNNRankingNetwork.name_scope", + "tfr.keras.premade.TFRBertTask.process_metrics": "tfr.keras.task.RankingTask.process_metrics", + "tfr.keras.premade.TFRBertTask.submodules": "tfr.keras.canned.DNNRankingNetwork.submodules", + "tfr.keras.premade.TFRBertTask.train_step": "tfr.keras.task.RankingTask.train_step", + "tfr.keras.premade.TensorLike": "tfr.keras.model.TensorLike", + "tfr.keras.premade.tfrbert_task.TFRBertConfig": "tfr.keras.premade.TFRBertConfig", + "tfr.keras.premade.tfrbert_task.TFRBertConfig.IMMUTABLE_TYPES": "tfr.keras.premade.TFRBertConfig.IMMUTABLE_TYPES", + "tfr.keras.premade.tfrbert_task.TFRBertConfig.RESERVED_ATTR": "tfr.keras.premade.TFRBertConfig.RESERVED_ATTR", + "tfr.keras.premade.tfrbert_task.TFRBertConfig.SEQUENCE_TYPES": "tfr.keras.premade.TFRBertConfig.SEQUENCE_TYPES", + "tfr.keras.premade.tfrbert_task.TFRBertConfig.__contains__": "tfr.keras.premade.TFRBertConfig.__contains__", + "tfr.keras.premade.tfrbert_task.TFRBertConfig.__eq__": "tfr.keras.premade.TFRBertConfig.__eq__", + "tfr.keras.premade.tfrbert_task.TFRBertConfig.__ge__": "tfr.keras.canned.DNNRankingNetwork.__ge__", + "tfr.keras.premade.tfrbert_task.TFRBertConfig.__gt__": "tfr.keras.canned.DNNRankingNetwork.__gt__", + "tfr.keras.premade.tfrbert_task.TFRBertConfig.__init__": "tfr.keras.premade.TFRBertConfig.__init__", + "tfr.keras.premade.tfrbert_task.TFRBertConfig.__le__": "tfr.keras.canned.DNNRankingNetwork.__le__", + "tfr.keras.premade.tfrbert_task.TFRBertConfig.__lt__": "tfr.keras.canned.DNNRankingNetwork.__lt__", + "tfr.keras.premade.tfrbert_task.TFRBertConfig.__ne__": "tfr.keras.canned.DNNRankingNetwork.__ne__", + "tfr.keras.premade.tfrbert_task.TFRBertConfig.__new__": "tfr.keras.losses.ApproxMRRLoss.__new__", + "tfr.keras.premade.tfrbert_task.TFRBertConfig.as_dict": "tfr.keras.premade.TFRBertConfig.as_dict", + "tfr.keras.premade.tfrbert_task.TFRBertConfig.get": "tfr.keras.premade.TFRBertConfig.get", + "tfr.keras.premade.tfrbert_task.TFRBertConfig.lock": "tfr.keras.premade.TFRBertConfig.lock", + "tfr.keras.premade.tfrbert_task.TFRBertConfig.model": "tfr.keras.premade.TFRBertConfig.model", + "tfr.keras.premade.tfrbert_task.TFRBertConfig.override": "tfr.keras.premade.TFRBertConfig.override", + "tfr.keras.premade.tfrbert_task.TFRBertConfig.replace": "tfr.keras.premade.TFRBertConfig.replace", + "tfr.keras.premade.tfrbert_task.TFRBertConfig.validate": "tfr.keras.premade.TFRBertConfig.validate", + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig": "tfr.keras.premade.TFRBertDataConfig", + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.IMMUTABLE_TYPES": "tfr.keras.premade.TFRBertConfig.IMMUTABLE_TYPES", + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.RESERVED_ATTR": "tfr.keras.premade.TFRBertConfig.RESERVED_ATTR", + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.SEQUENCE_TYPES": "tfr.keras.premade.TFRBertConfig.SEQUENCE_TYPES", + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.__contains__": "tfr.keras.premade.TFRBertConfig.__contains__", + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.__eq__": "tfr.keras.premade.TFRBertDataConfig.__eq__", + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.__ge__": "tfr.keras.canned.DNNRankingNetwork.__ge__", + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.__gt__": "tfr.keras.canned.DNNRankingNetwork.__gt__", + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.__init__": "tfr.keras.premade.TFRBertDataConfig.__init__", + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.__le__": "tfr.keras.canned.DNNRankingNetwork.__le__", + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.__lt__": "tfr.keras.canned.DNNRankingNetwork.__lt__", + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.__ne__": "tfr.keras.canned.DNNRankingNetwork.__ne__", + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.__new__": "tfr.keras.losses.ApproxMRRLoss.__new__", + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.as_dict": "tfr.keras.premade.TFRBertConfig.as_dict", + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.get": "tfr.keras.premade.TFRBertConfig.get", + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.lock": "tfr.keras.premade.TFRBertConfig.lock", + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.override": "tfr.keras.premade.TFRBertConfig.override", + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.replace": "tfr.keras.premade.TFRBertConfig.replace", + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.validate": "tfr.keras.premade.TFRBertConfig.validate", + "tfr.keras.premade.tfrbert_task.TFRBertDataLoader": "tfr.keras.premade.TFRBertDataLoader", + "tfr.keras.premade.tfrbert_task.TFRBertDataLoader.__eq__": "tfr.keras.canned.DNNRankingNetwork.__eq__", + "tfr.keras.premade.tfrbert_task.TFRBertDataLoader.__ge__": "tfr.keras.canned.DNNRankingNetwork.__ge__", + "tfr.keras.premade.tfrbert_task.TFRBertDataLoader.__gt__": "tfr.keras.canned.DNNRankingNetwork.__gt__", + "tfr.keras.premade.tfrbert_task.TFRBertDataLoader.__init__": "tfr.keras.premade.TFRBertDataLoader.__init__", + "tfr.keras.premade.tfrbert_task.TFRBertDataLoader.__le__": "tfr.keras.canned.DNNRankingNetwork.__le__", + "tfr.keras.premade.tfrbert_task.TFRBertDataLoader.__lt__": "tfr.keras.canned.DNNRankingNetwork.__lt__", + "tfr.keras.premade.tfrbert_task.TFRBertDataLoader.__ne__": "tfr.keras.canned.DNNRankingNetwork.__ne__", + "tfr.keras.premade.tfrbert_task.TFRBertDataLoader.__new__": "tfr.keras.losses.ApproxMRRLoss.__new__", + "tfr.keras.premade.tfrbert_task.TFRBertDataLoader.load": "tfr.keras.task.RankingDataLoader.load", + "tfr.keras.premade.tfrbert_task.TFRBertModelBuilder": "tfr.keras.premade.TFRBertModelBuilder", + "tfr.keras.premade.tfrbert_task.TFRBertModelBuilder.__eq__": "tfr.keras.canned.DNNRankingNetwork.__eq__", + "tfr.keras.premade.tfrbert_task.TFRBertModelBuilder.__ge__": "tfr.keras.canned.DNNRankingNetwork.__ge__", + "tfr.keras.premade.tfrbert_task.TFRBertModelBuilder.__gt__": "tfr.keras.canned.DNNRankingNetwork.__gt__", + "tfr.keras.premade.tfrbert_task.TFRBertModelBuilder.__init__": "tfr.keras.model.ModelBuilder.__init__", + "tfr.keras.premade.tfrbert_task.TFRBertModelBuilder.__le__": "tfr.keras.canned.DNNRankingNetwork.__le__", + "tfr.keras.premade.tfrbert_task.TFRBertModelBuilder.__lt__": "tfr.keras.canned.DNNRankingNetwork.__lt__", + "tfr.keras.premade.tfrbert_task.TFRBertModelBuilder.__ne__": "tfr.keras.canned.DNNRankingNetwork.__ne__", + "tfr.keras.premade.tfrbert_task.TFRBertModelBuilder.__new__": "tfr.keras.losses.ApproxMRRLoss.__new__", + "tfr.keras.premade.tfrbert_task.TFRBertModelBuilder.build": "tfr.keras.premade.TFRBertModelBuilder.build", + "tfr.keras.premade.tfrbert_task.TFRBertModelBuilder.create_inputs": "tfr.keras.model.ModelBuilder.create_inputs", + "tfr.keras.premade.tfrbert_task.TFRBertModelBuilder.preprocess": "tfr.keras.model.ModelBuilder.preprocess", + "tfr.keras.premade.tfrbert_task.TFRBertModelBuilder.score": "tfr.keras.model.ModelBuilder.score", + "tfr.keras.premade.tfrbert_task.TFRBertModelConfig": "tfr.keras.premade.TFRBertModelConfig", + "tfr.keras.premade.tfrbert_task.TFRBertModelConfig.IMMUTABLE_TYPES": "tfr.keras.premade.TFRBertConfig.IMMUTABLE_TYPES", + "tfr.keras.premade.tfrbert_task.TFRBertModelConfig.RESERVED_ATTR": "tfr.keras.premade.TFRBertConfig.RESERVED_ATTR", + "tfr.keras.premade.tfrbert_task.TFRBertModelConfig.SEQUENCE_TYPES": "tfr.keras.premade.TFRBertConfig.SEQUENCE_TYPES", + "tfr.keras.premade.tfrbert_task.TFRBertModelConfig.__contains__": "tfr.keras.premade.TFRBertConfig.__contains__", + "tfr.keras.premade.tfrbert_task.TFRBertModelConfig.__eq__": "tfr.keras.premade.TFRBertModelConfig.__eq__", + "tfr.keras.premade.tfrbert_task.TFRBertModelConfig.__ge__": "tfr.keras.canned.DNNRankingNetwork.__ge__", + "tfr.keras.premade.tfrbert_task.TFRBertModelConfig.__gt__": "tfr.keras.canned.DNNRankingNetwork.__gt__", + "tfr.keras.premade.tfrbert_task.TFRBertModelConfig.__init__": "tfr.keras.premade.TFRBertModelConfig.__init__", + "tfr.keras.premade.tfrbert_task.TFRBertModelConfig.__le__": "tfr.keras.canned.DNNRankingNetwork.__le__", + "tfr.keras.premade.tfrbert_task.TFRBertModelConfig.__lt__": "tfr.keras.canned.DNNRankingNetwork.__lt__", + "tfr.keras.premade.tfrbert_task.TFRBertModelConfig.__ne__": "tfr.keras.canned.DNNRankingNetwork.__ne__", + "tfr.keras.premade.tfrbert_task.TFRBertModelConfig.__new__": "tfr.keras.losses.ApproxMRRLoss.__new__", + "tfr.keras.premade.tfrbert_task.TFRBertModelConfig.as_dict": "tfr.keras.premade.TFRBertConfig.as_dict", + "tfr.keras.premade.tfrbert_task.TFRBertModelConfig.encoder": "tfr.keras.premade.TFRBertModelConfig.encoder", + "tfr.keras.premade.tfrbert_task.TFRBertModelConfig.get": "tfr.keras.premade.TFRBertConfig.get", + "tfr.keras.premade.tfrbert_task.TFRBertModelConfig.lock": "tfr.keras.premade.TFRBertConfig.lock", + "tfr.keras.premade.tfrbert_task.TFRBertModelConfig.override": "tfr.keras.premade.TFRBertConfig.override", + "tfr.keras.premade.tfrbert_task.TFRBertModelConfig.replace": "tfr.keras.premade.TFRBertConfig.replace", + "tfr.keras.premade.tfrbert_task.TFRBertModelConfig.validate": "tfr.keras.premade.TFRBertConfig.validate", + "tfr.keras.premade.tfrbert_task.TFRBertScorer": "tfr.keras.premade.TFRBertScorer", + "tfr.keras.premade.tfrbert_task.TFRBertScorer.__call__": "tfr.keras.model.UnivariateScorer.__call__", + "tfr.keras.premade.tfrbert_task.TFRBertScorer.__eq__": "tfr.keras.canned.DNNRankingNetwork.__eq__", + "tfr.keras.premade.tfrbert_task.TFRBertScorer.__ge__": "tfr.keras.canned.DNNRankingNetwork.__ge__", + "tfr.keras.premade.tfrbert_task.TFRBertScorer.__gt__": "tfr.keras.canned.DNNRankingNetwork.__gt__", + "tfr.keras.premade.tfrbert_task.TFRBertScorer.__init__": "tfr.keras.premade.TFRBertScorer.__init__", + "tfr.keras.premade.tfrbert_task.TFRBertScorer.__le__": "tfr.keras.canned.DNNRankingNetwork.__le__", + "tfr.keras.premade.tfrbert_task.TFRBertScorer.__lt__": "tfr.keras.canned.DNNRankingNetwork.__lt__", + "tfr.keras.premade.tfrbert_task.TFRBertScorer.__ne__": "tfr.keras.canned.DNNRankingNetwork.__ne__", + "tfr.keras.premade.tfrbert_task.TFRBertScorer.__new__": "tfr.keras.losses.ApproxMRRLoss.__new__", + "tfr.keras.premade.tfrbert_task.TFRBertTask": "tfr.keras.premade.TFRBertTask", + "tfr.keras.premade.tfrbert_task.TFRBertTask.__eq__": "tfr.keras.canned.DNNRankingNetwork.__eq__", + "tfr.keras.premade.tfrbert_task.TFRBertTask.__ge__": "tfr.keras.canned.DNNRankingNetwork.__ge__", + "tfr.keras.premade.tfrbert_task.TFRBertTask.__gt__": "tfr.keras.canned.DNNRankingNetwork.__gt__", + "tfr.keras.premade.tfrbert_task.TFRBertTask.__init__": "tfr.keras.premade.TFRBertTask.__init__", + "tfr.keras.premade.tfrbert_task.TFRBertTask.__le__": "tfr.keras.canned.DNNRankingNetwork.__le__", + "tfr.keras.premade.tfrbert_task.TFRBertTask.__lt__": "tfr.keras.canned.DNNRankingNetwork.__lt__", + "tfr.keras.premade.tfrbert_task.TFRBertTask.__ne__": "tfr.keras.canned.DNNRankingNetwork.__ne__", + "tfr.keras.premade.tfrbert_task.TFRBertTask.__new__": "tfr.keras.losses.ApproxMRRLoss.__new__", + "tfr.keras.premade.tfrbert_task.TFRBertTask.aggregate_logs": "tfr.keras.premade.TFRBertTask.aggregate_logs", + "tfr.keras.premade.tfrbert_task.TFRBertTask.build_inputs": "tfr.keras.premade.TFRBertTask.build_inputs", + "tfr.keras.premade.tfrbert_task.TFRBertTask.build_losses": "tfr.keras.task.RankingTask.build_losses", + "tfr.keras.premade.tfrbert_task.TFRBertTask.build_metrics": "tfr.keras.task.RankingTask.build_metrics", + "tfr.keras.premade.tfrbert_task.TFRBertTask.build_model": "tfr.keras.premade.TFRBertTask.build_model", + "tfr.keras.premade.tfrbert_task.TFRBertTask.inference_step": "tfr.keras.premade.TFRBertTask.inference_step", + "tfr.keras.premade.tfrbert_task.TFRBertTask.initialize": "tfr.keras.premade.TFRBertTask.initialize", + "tfr.keras.premade.tfrbert_task.TFRBertTask.logging_dir": "tfr.keras.premade.TFRBertTask.logging_dir", + "tfr.keras.premade.tfrbert_task.TFRBertTask.name": "tfr.keras.premade.TFRBertTask.name", + "tfr.keras.premade.tfrbert_task.TFRBertTask.name_scope": "tfr.keras.canned.DNNRankingNetwork.name_scope", + "tfr.keras.premade.tfrbert_task.TFRBertTask.non_trainable_variables": "tfr.keras.premade.TFRBertTask.non_trainable_variables", + "tfr.keras.premade.tfrbert_task.TFRBertTask.process_compiled_metrics": "tfr.keras.premade.TFRBertTask.process_compiled_metrics", + "tfr.keras.premade.tfrbert_task.TFRBertTask.process_metrics": "tfr.keras.task.RankingTask.process_metrics", + "tfr.keras.premade.tfrbert_task.TFRBertTask.reduce_aggregated_logs": "tfr.keras.premade.TFRBertTask.reduce_aggregated_logs", + "tfr.keras.premade.tfrbert_task.TFRBertTask.submodules": "tfr.keras.canned.DNNRankingNetwork.submodules", + "tfr.keras.premade.tfrbert_task.TFRBertTask.task_config": "tfr.keras.premade.TFRBertTask.task_config", + "tfr.keras.premade.tfrbert_task.TFRBertTask.train_step": "tfr.keras.task.RankingTask.train_step", + "tfr.keras.premade.tfrbert_task.TFRBertTask.trainable_variables": "tfr.keras.premade.TFRBertTask.trainable_variables", + "tfr.keras.premade.tfrbert_task.TFRBertTask.validation_step": "tfr.keras.premade.TFRBertTask.validation_step", + "tfr.keras.premade.tfrbert_task.TFRBertTask.variables": "tfr.keras.premade.TFRBertTask.variables", + "tfr.keras.premade.tfrbert_task.TensorDict": "tfr.keras.premade.TensorDict", + "tfr.keras.premade.tfrbert_task.TensorLike": "tfr.keras.model.TensorLike", "tfr.keras.saved_model.Signatures.__eq__": "tfr.keras.canned.DNNRankingNetwork.__eq__", "tfr.keras.saved_model.Signatures.__ge__": "tfr.keras.canned.DNNRankingNetwork.__ge__", "tfr.keras.saved_model.Signatures.__gt__": "tfr.keras.canned.DNNRankingNetwork.__gt__", @@ -1253,8 +1455,12 @@ "tfr.keras.saved_model.Signatures.__lt__": "tfr.keras.canned.DNNRankingNetwork.__lt__", "tfr.keras.saved_model.Signatures.__ne__": "tfr.keras.canned.DNNRankingNetwork.__ne__", "tfr.keras.saved_model.Signatures.__new__": "tfr.keras.losses.ApproxMRRLoss.__new__", + "tfr.keras.saved_model.Signatures.name": "tfr.keras.premade.TFRBertTask.name", "tfr.keras.saved_model.Signatures.name_scope": "tfr.keras.canned.DNNRankingNetwork.name_scope", + "tfr.keras.saved_model.Signatures.non_trainable_variables": "tfr.keras.premade.TFRBertTask.non_trainable_variables", "tfr.keras.saved_model.Signatures.submodules": "tfr.keras.canned.DNNRankingNetwork.submodules", + "tfr.keras.saved_model.Signatures.trainable_variables": "tfr.keras.premade.TFRBertTask.trainable_variables", + "tfr.keras.saved_model.Signatures.variables": "tfr.keras.premade.TFRBertTask.variables", "tfr.keras.strategy_utils.NullContextManager.__eq__": "tfr.keras.canned.DNNRankingNetwork.__eq__", "tfr.keras.strategy_utils.NullContextManager.__ge__": "tfr.keras.canned.DNNRankingNetwork.__ge__", "tfr.keras.strategy_utils.NullContextManager.__gt__": "tfr.keras.canned.DNNRankingNetwork.__gt__", @@ -1263,12 +1469,22 @@ "tfr.keras.strategy_utils.NullContextManager.__lt__": "tfr.keras.canned.DNNRankingNetwork.__lt__", "tfr.keras.strategy_utils.NullContextManager.__ne__": "tfr.keras.canned.DNNRankingNetwork.__ne__", "tfr.keras.strategy_utils.NullContextManager.__new__": "tfr.keras.losses.ApproxMRRLoss.__new__", + "tfr.keras.task.RankingDataConfig.IMMUTABLE_TYPES": "tfr.keras.premade.TFRBertConfig.IMMUTABLE_TYPES", + "tfr.keras.task.RankingDataConfig.RESERVED_ATTR": "tfr.keras.premade.TFRBertConfig.RESERVED_ATTR", + "tfr.keras.task.RankingDataConfig.SEQUENCE_TYPES": "tfr.keras.premade.TFRBertConfig.SEQUENCE_TYPES", + "tfr.keras.task.RankingDataConfig.__contains__": "tfr.keras.premade.TFRBertConfig.__contains__", "tfr.keras.task.RankingDataConfig.__ge__": "tfr.keras.canned.DNNRankingNetwork.__ge__", "tfr.keras.task.RankingDataConfig.__gt__": "tfr.keras.canned.DNNRankingNetwork.__gt__", "tfr.keras.task.RankingDataConfig.__le__": "tfr.keras.canned.DNNRankingNetwork.__le__", "tfr.keras.task.RankingDataConfig.__lt__": "tfr.keras.canned.DNNRankingNetwork.__lt__", "tfr.keras.task.RankingDataConfig.__ne__": "tfr.keras.canned.DNNRankingNetwork.__ne__", "tfr.keras.task.RankingDataConfig.__new__": "tfr.keras.losses.ApproxMRRLoss.__new__", + "tfr.keras.task.RankingDataConfig.as_dict": "tfr.keras.premade.TFRBertConfig.as_dict", + "tfr.keras.task.RankingDataConfig.get": "tfr.keras.premade.TFRBertConfig.get", + "tfr.keras.task.RankingDataConfig.lock": "tfr.keras.premade.TFRBertConfig.lock", + "tfr.keras.task.RankingDataConfig.override": "tfr.keras.premade.TFRBertConfig.override", + "tfr.keras.task.RankingDataConfig.replace": "tfr.keras.premade.TFRBertConfig.replace", + "tfr.keras.task.RankingDataConfig.validate": "tfr.keras.premade.TFRBertConfig.validate", "tfr.keras.task.RankingDataLoader.__eq__": "tfr.keras.canned.DNNRankingNetwork.__eq__", "tfr.keras.task.RankingDataLoader.__ge__": "tfr.keras.canned.DNNRankingNetwork.__ge__", "tfr.keras.task.RankingDataLoader.__gt__": "tfr.keras.canned.DNNRankingNetwork.__gt__", @@ -1283,28 +1499,32 @@ "tfr.keras.task.RankingTask.__lt__": "tfr.keras.canned.DNNRankingNetwork.__lt__", "tfr.keras.task.RankingTask.__ne__": "tfr.keras.canned.DNNRankingNetwork.__ne__", "tfr.keras.task.RankingTask.__new__": "tfr.keras.losses.ApproxMRRLoss.__new__", - "tfr.keras.task.RankingTask.name": "tfr.keras.saved_model.Signatures.name", + "tfr.keras.task.RankingTask.inference_step": "tfr.keras.premade.TFRBertTask.inference_step", + "tfr.keras.task.RankingTask.logging_dir": "tfr.keras.premade.TFRBertTask.logging_dir", + "tfr.keras.task.RankingTask.name": "tfr.keras.premade.TFRBertTask.name", "tfr.keras.task.RankingTask.name_scope": "tfr.keras.canned.DNNRankingNetwork.name_scope", - "tfr.keras.task.RankingTask.non_trainable_variables": "tfr.keras.saved_model.Signatures.non_trainable_variables", + "tfr.keras.task.RankingTask.non_trainable_variables": "tfr.keras.premade.TFRBertTask.non_trainable_variables", + "tfr.keras.task.RankingTask.process_compiled_metrics": "tfr.keras.premade.TFRBertTask.process_compiled_metrics", "tfr.keras.task.RankingTask.submodules": "tfr.keras.canned.DNNRankingNetwork.submodules", - "tfr.keras.task.RankingTask.trainable_variables": "tfr.keras.saved_model.Signatures.trainable_variables", - "tfr.keras.task.RankingTask.variables": "tfr.keras.saved_model.Signatures.variables", - "tfr.keras.task.RankingTaskConfig.IMMUTABLE_TYPES": "tfr.keras.task.RankingDataConfig.IMMUTABLE_TYPES", - "tfr.keras.task.RankingTaskConfig.RESERVED_ATTR": "tfr.keras.task.RankingDataConfig.RESERVED_ATTR", - "tfr.keras.task.RankingTaskConfig.SEQUENCE_TYPES": "tfr.keras.task.RankingDataConfig.SEQUENCE_TYPES", - "tfr.keras.task.RankingTaskConfig.__contains__": "tfr.keras.task.RankingDataConfig.__contains__", + "tfr.keras.task.RankingTask.task_config": "tfr.keras.premade.TFRBertTask.task_config", + "tfr.keras.task.RankingTask.trainable_variables": "tfr.keras.premade.TFRBertTask.trainable_variables", + "tfr.keras.task.RankingTask.variables": "tfr.keras.premade.TFRBertTask.variables", + "tfr.keras.task.RankingTaskConfig.IMMUTABLE_TYPES": "tfr.keras.premade.TFRBertConfig.IMMUTABLE_TYPES", + "tfr.keras.task.RankingTaskConfig.RESERVED_ATTR": "tfr.keras.premade.TFRBertConfig.RESERVED_ATTR", + "tfr.keras.task.RankingTaskConfig.SEQUENCE_TYPES": "tfr.keras.premade.TFRBertConfig.SEQUENCE_TYPES", + "tfr.keras.task.RankingTaskConfig.__contains__": "tfr.keras.premade.TFRBertConfig.__contains__", "tfr.keras.task.RankingTaskConfig.__ge__": "tfr.keras.canned.DNNRankingNetwork.__ge__", "tfr.keras.task.RankingTaskConfig.__gt__": "tfr.keras.canned.DNNRankingNetwork.__gt__", "tfr.keras.task.RankingTaskConfig.__le__": "tfr.keras.canned.DNNRankingNetwork.__le__", "tfr.keras.task.RankingTaskConfig.__lt__": "tfr.keras.canned.DNNRankingNetwork.__lt__", "tfr.keras.task.RankingTaskConfig.__ne__": "tfr.keras.canned.DNNRankingNetwork.__ne__", "tfr.keras.task.RankingTaskConfig.__new__": "tfr.keras.losses.ApproxMRRLoss.__new__", - "tfr.keras.task.RankingTaskConfig.as_dict": "tfr.keras.task.RankingDataConfig.as_dict", - "tfr.keras.task.RankingTaskConfig.get": "tfr.keras.task.RankingDataConfig.get", - "tfr.keras.task.RankingTaskConfig.lock": "tfr.keras.task.RankingDataConfig.lock", - "tfr.keras.task.RankingTaskConfig.override": "tfr.keras.task.RankingDataConfig.override", - "tfr.keras.task.RankingTaskConfig.replace": "tfr.keras.task.RankingDataConfig.replace", - "tfr.keras.task.RankingTaskConfig.validate": "tfr.keras.task.RankingDataConfig.validate", + "tfr.keras.task.RankingTaskConfig.as_dict": "tfr.keras.premade.TFRBertConfig.as_dict", + "tfr.keras.task.RankingTaskConfig.get": "tfr.keras.premade.TFRBertConfig.get", + "tfr.keras.task.RankingTaskConfig.lock": "tfr.keras.premade.TFRBertConfig.lock", + "tfr.keras.task.RankingTaskConfig.override": "tfr.keras.premade.TFRBertConfig.override", + "tfr.keras.task.RankingTaskConfig.replace": "tfr.keras.premade.TFRBertConfig.replace", + "tfr.keras.task.RankingTaskConfig.validate": "tfr.keras.premade.TFRBertConfig.validate", "tfr.losses.RankingLossKey.__eq__": "tfr.keras.canned.DNNRankingNetwork.__eq__", "tfr.losses.RankingLossKey.__ge__": "tfr.keras.canned.DNNRankingNetwork.__ge__", "tfr.losses.RankingLossKey.__gt__": "tfr.keras.canned.DNNRankingNetwork.__gt__", @@ -3039,6 +3259,366 @@ "tfr.keras.pipeline.SimplePipeline.build_weighted_metrics": true, "tfr.keras.pipeline.SimplePipeline.export_saved_model": true, "tfr.keras.pipeline.SimplePipeline.train_and_validate": true, + "tfr.keras.premade": false, + "tfr.keras.premade.DOCUMENT_ID": true, + "tfr.keras.premade.QUERY_ID": true, + "tfr.keras.premade.TFRBertConfig": false, + "tfr.keras.premade.TFRBertConfig.IMMUTABLE_TYPES": true, + "tfr.keras.premade.TFRBertConfig.RESERVED_ATTR": true, + "tfr.keras.premade.TFRBertConfig.SEQUENCE_TYPES": true, + "tfr.keras.premade.TFRBertConfig.__contains__": true, + "tfr.keras.premade.TFRBertConfig.__eq__": true, + "tfr.keras.premade.TFRBertConfig.__ge__": true, + "tfr.keras.premade.TFRBertConfig.__gt__": true, + "tfr.keras.premade.TFRBertConfig.__init__": true, + "tfr.keras.premade.TFRBertConfig.__le__": true, + "tfr.keras.premade.TFRBertConfig.__lt__": true, + "tfr.keras.premade.TFRBertConfig.__ne__": true, + "tfr.keras.premade.TFRBertConfig.__new__": true, + "tfr.keras.premade.TFRBertConfig.aggregated_metrics": true, + "tfr.keras.premade.TFRBertConfig.as_dict": true, + "tfr.keras.premade.TFRBertConfig.default_params": true, + "tfr.keras.premade.TFRBertConfig.from_args": true, + "tfr.keras.premade.TFRBertConfig.from_json": true, + "tfr.keras.premade.TFRBertConfig.from_yaml": true, + "tfr.keras.premade.TFRBertConfig.get": true, + "tfr.keras.premade.TFRBertConfig.init_checkpoint": true, + "tfr.keras.premade.TFRBertConfig.lock": true, + "tfr.keras.premade.TFRBertConfig.loss": true, + "tfr.keras.premade.TFRBertConfig.loss_reduction": true, + "tfr.keras.premade.TFRBertConfig.model": true, + "tfr.keras.premade.TFRBertConfig.output_preds": true, + "tfr.keras.premade.TFRBertConfig.override": true, + "tfr.keras.premade.TFRBertConfig.replace": true, + "tfr.keras.premade.TFRBertConfig.restrictions": true, + "tfr.keras.premade.TFRBertConfig.train_data": true, + "tfr.keras.premade.TFRBertConfig.validate": true, + "tfr.keras.premade.TFRBertConfig.validation_data": true, + "tfr.keras.premade.TFRBertDataConfig": false, + "tfr.keras.premade.TFRBertDataConfig.IMMUTABLE_TYPES": true, + "tfr.keras.premade.TFRBertDataConfig.RESERVED_ATTR": true, + "tfr.keras.premade.TFRBertDataConfig.SEQUENCE_TYPES": true, + "tfr.keras.premade.TFRBertDataConfig.__contains__": true, + "tfr.keras.premade.TFRBertDataConfig.__eq__": true, + "tfr.keras.premade.TFRBertDataConfig.__ge__": true, + "tfr.keras.premade.TFRBertDataConfig.__gt__": true, + "tfr.keras.premade.TFRBertDataConfig.__init__": true, + "tfr.keras.premade.TFRBertDataConfig.__le__": true, + "tfr.keras.premade.TFRBertDataConfig.__lt__": true, + "tfr.keras.premade.TFRBertDataConfig.__ne__": true, + "tfr.keras.premade.TFRBertDataConfig.__new__": true, + "tfr.keras.premade.TFRBertDataConfig.as_dict": true, + "tfr.keras.premade.TFRBertDataConfig.block_length": true, + "tfr.keras.premade.TFRBertDataConfig.cache": true, + "tfr.keras.premade.TFRBertDataConfig.convert_labels_to_binary": true, + "tfr.keras.premade.TFRBertDataConfig.cycle_length": true, + "tfr.keras.premade.TFRBertDataConfig.data_format": true, + "tfr.keras.premade.TFRBertDataConfig.dataset_fn": true, + "tfr.keras.premade.TFRBertDataConfig.default_params": true, + "tfr.keras.premade.TFRBertDataConfig.deterministic": true, + "tfr.keras.premade.TFRBertDataConfig.drop_remainder": true, + "tfr.keras.premade.TFRBertDataConfig.enable_tf_data_service": true, + "tfr.keras.premade.TFRBertDataConfig.from_args": true, + "tfr.keras.premade.TFRBertDataConfig.from_json": true, + "tfr.keras.premade.TFRBertDataConfig.from_yaml": true, + "tfr.keras.premade.TFRBertDataConfig.get": true, + "tfr.keras.premade.TFRBertDataConfig.global_batch_size": true, + "tfr.keras.premade.TFRBertDataConfig.input_path": true, + "tfr.keras.premade.TFRBertDataConfig.is_training": true, + "tfr.keras.premade.TFRBertDataConfig.list_size": true, + "tfr.keras.premade.TFRBertDataConfig.lock": true, + "tfr.keras.premade.TFRBertDataConfig.mask_feature_name": true, + "tfr.keras.premade.TFRBertDataConfig.override": true, + "tfr.keras.premade.TFRBertDataConfig.read_document_id": true, + "tfr.keras.premade.TFRBertDataConfig.read_query_id": true, + "tfr.keras.premade.TFRBertDataConfig.replace": true, + "tfr.keras.premade.TFRBertDataConfig.restrictions": true, + "tfr.keras.premade.TFRBertDataConfig.seed": true, + "tfr.keras.premade.TFRBertDataConfig.seq_length": true, + "tfr.keras.premade.TFRBertDataConfig.sharding": true, + "tfr.keras.premade.TFRBertDataConfig.shuffle_buffer_size": true, + "tfr.keras.premade.TFRBertDataConfig.shuffle_examples": true, + "tfr.keras.premade.TFRBertDataConfig.tf_data_service_address": true, + "tfr.keras.premade.TFRBertDataConfig.tf_data_service_job_name": true, + "tfr.keras.premade.TFRBertDataConfig.tfds_as_supervised": true, + "tfr.keras.premade.TFRBertDataConfig.tfds_data_dir": true, + "tfr.keras.premade.TFRBertDataConfig.tfds_name": true, + "tfr.keras.premade.TFRBertDataConfig.tfds_skip_decoding_feature": true, + "tfr.keras.premade.TFRBertDataConfig.tfds_split": true, + "tfr.keras.premade.TFRBertDataConfig.validate": true, + "tfr.keras.premade.TFRBertDataLoader": false, + "tfr.keras.premade.TFRBertDataLoader.__eq__": true, + "tfr.keras.premade.TFRBertDataLoader.__ge__": true, + "tfr.keras.premade.TFRBertDataLoader.__gt__": true, + "tfr.keras.premade.TFRBertDataLoader.__init__": true, + "tfr.keras.premade.TFRBertDataLoader.__le__": true, + "tfr.keras.premade.TFRBertDataLoader.__lt__": true, + "tfr.keras.premade.TFRBertDataLoader.__ne__": true, + "tfr.keras.premade.TFRBertDataLoader.__new__": true, + "tfr.keras.premade.TFRBertDataLoader.load": true, + "tfr.keras.premade.TFRBertModelBuilder": false, + "tfr.keras.premade.TFRBertModelBuilder.__eq__": true, + "tfr.keras.premade.TFRBertModelBuilder.__ge__": true, + "tfr.keras.premade.TFRBertModelBuilder.__gt__": true, + "tfr.keras.premade.TFRBertModelBuilder.__init__": true, + "tfr.keras.premade.TFRBertModelBuilder.__le__": true, + "tfr.keras.premade.TFRBertModelBuilder.__lt__": true, + "tfr.keras.premade.TFRBertModelBuilder.__ne__": true, + "tfr.keras.premade.TFRBertModelBuilder.__new__": true, + "tfr.keras.premade.TFRBertModelBuilder.build": true, + "tfr.keras.premade.TFRBertModelBuilder.create_inputs": true, + "tfr.keras.premade.TFRBertModelBuilder.preprocess": true, + "tfr.keras.premade.TFRBertModelBuilder.score": true, + "tfr.keras.premade.TFRBertModelConfig": false, + "tfr.keras.premade.TFRBertModelConfig.IMMUTABLE_TYPES": true, + "tfr.keras.premade.TFRBertModelConfig.RESERVED_ATTR": true, + "tfr.keras.premade.TFRBertModelConfig.SEQUENCE_TYPES": true, + "tfr.keras.premade.TFRBertModelConfig.__contains__": true, + "tfr.keras.premade.TFRBertModelConfig.__eq__": true, + "tfr.keras.premade.TFRBertModelConfig.__ge__": true, + "tfr.keras.premade.TFRBertModelConfig.__gt__": true, + "tfr.keras.premade.TFRBertModelConfig.__init__": true, + "tfr.keras.premade.TFRBertModelConfig.__le__": true, + "tfr.keras.premade.TFRBertModelConfig.__lt__": true, + "tfr.keras.premade.TFRBertModelConfig.__ne__": true, + "tfr.keras.premade.TFRBertModelConfig.__new__": true, + "tfr.keras.premade.TFRBertModelConfig.as_dict": true, + "tfr.keras.premade.TFRBertModelConfig.default_params": true, + "tfr.keras.premade.TFRBertModelConfig.dropout_rate": true, + "tfr.keras.premade.TFRBertModelConfig.encoder": true, + "tfr.keras.premade.TFRBertModelConfig.from_args": true, + "tfr.keras.premade.TFRBertModelConfig.from_json": true, + "tfr.keras.premade.TFRBertModelConfig.from_yaml": true, + "tfr.keras.premade.TFRBertModelConfig.get": true, + "tfr.keras.premade.TFRBertModelConfig.lock": true, + "tfr.keras.premade.TFRBertModelConfig.override": true, + "tfr.keras.premade.TFRBertModelConfig.replace": true, + "tfr.keras.premade.TFRBertModelConfig.restrictions": true, + "tfr.keras.premade.TFRBertModelConfig.validate": true, + "tfr.keras.premade.TFRBertScorer": false, + "tfr.keras.premade.TFRBertScorer.__call__": true, + "tfr.keras.premade.TFRBertScorer.__eq__": true, + "tfr.keras.premade.TFRBertScorer.__ge__": true, + "tfr.keras.premade.TFRBertScorer.__gt__": true, + "tfr.keras.premade.TFRBertScorer.__init__": true, + "tfr.keras.premade.TFRBertScorer.__le__": true, + "tfr.keras.premade.TFRBertScorer.__lt__": true, + "tfr.keras.premade.TFRBertScorer.__ne__": true, + "tfr.keras.premade.TFRBertScorer.__new__": true, + "tfr.keras.premade.TFRBertTask": false, + "tfr.keras.premade.TFRBertTask.__eq__": true, + "tfr.keras.premade.TFRBertTask.__ge__": true, + "tfr.keras.premade.TFRBertTask.__gt__": true, + "tfr.keras.premade.TFRBertTask.__init__": true, + "tfr.keras.premade.TFRBertTask.__le__": true, + "tfr.keras.premade.TFRBertTask.__lt__": true, + "tfr.keras.premade.TFRBertTask.__ne__": true, + "tfr.keras.premade.TFRBertTask.__new__": true, + "tfr.keras.premade.TFRBertTask.aggregate_logs": true, + "tfr.keras.premade.TFRBertTask.build_inputs": true, + "tfr.keras.premade.TFRBertTask.build_losses": true, + "tfr.keras.premade.TFRBertTask.build_metrics": true, + "tfr.keras.premade.TFRBertTask.build_model": true, + "tfr.keras.premade.TFRBertTask.create_optimizer": true, + "tfr.keras.premade.TFRBertTask.inference_step": true, + "tfr.keras.premade.TFRBertTask.initialize": true, + "tfr.keras.premade.TFRBertTask.logging_dir": true, + "tfr.keras.premade.TFRBertTask.loss": true, + "tfr.keras.premade.TFRBertTask.name": true, + "tfr.keras.premade.TFRBertTask.name_scope": true, + "tfr.keras.premade.TFRBertTask.non_trainable_variables": true, + "tfr.keras.premade.TFRBertTask.process_compiled_metrics": true, + "tfr.keras.premade.TFRBertTask.process_metrics": true, + "tfr.keras.premade.TFRBertTask.reduce_aggregated_logs": true, + "tfr.keras.premade.TFRBertTask.submodules": true, + "tfr.keras.premade.TFRBertTask.task_config": true, + "tfr.keras.premade.TFRBertTask.train_step": true, + "tfr.keras.premade.TFRBertTask.trainable_variables": true, + "tfr.keras.premade.TFRBertTask.validation_step": true, + "tfr.keras.premade.TFRBertTask.variables": true, + "tfr.keras.premade.TFRBertTask.with_name_scope": true, + "tfr.keras.premade.TensorDict": false, + "tfr.keras.premade.TensorLike": false, + "tfr.keras.premade.tfrbert_task": false, + "tfr.keras.premade.tfrbert_task.DOCUMENT_ID": true, + "tfr.keras.premade.tfrbert_task.QUERY_ID": true, + "tfr.keras.premade.tfrbert_task.TFRBertConfig": false, + "tfr.keras.premade.tfrbert_task.TFRBertConfig.IMMUTABLE_TYPES": true, + "tfr.keras.premade.tfrbert_task.TFRBertConfig.RESERVED_ATTR": true, + "tfr.keras.premade.tfrbert_task.TFRBertConfig.SEQUENCE_TYPES": true, + "tfr.keras.premade.tfrbert_task.TFRBertConfig.__contains__": true, + "tfr.keras.premade.tfrbert_task.TFRBertConfig.__eq__": true, + "tfr.keras.premade.tfrbert_task.TFRBertConfig.__ge__": true, + "tfr.keras.premade.tfrbert_task.TFRBertConfig.__gt__": true, + "tfr.keras.premade.tfrbert_task.TFRBertConfig.__init__": true, + "tfr.keras.premade.tfrbert_task.TFRBertConfig.__le__": true, + "tfr.keras.premade.tfrbert_task.TFRBertConfig.__lt__": true, + "tfr.keras.premade.tfrbert_task.TFRBertConfig.__ne__": true, + "tfr.keras.premade.tfrbert_task.TFRBertConfig.__new__": true, + "tfr.keras.premade.tfrbert_task.TFRBertConfig.aggregated_metrics": true, + "tfr.keras.premade.tfrbert_task.TFRBertConfig.as_dict": true, + "tfr.keras.premade.tfrbert_task.TFRBertConfig.default_params": true, + "tfr.keras.premade.tfrbert_task.TFRBertConfig.from_args": true, + "tfr.keras.premade.tfrbert_task.TFRBertConfig.from_json": true, + "tfr.keras.premade.tfrbert_task.TFRBertConfig.from_yaml": true, + "tfr.keras.premade.tfrbert_task.TFRBertConfig.get": true, + "tfr.keras.premade.tfrbert_task.TFRBertConfig.init_checkpoint": true, + "tfr.keras.premade.tfrbert_task.TFRBertConfig.lock": true, + "tfr.keras.premade.tfrbert_task.TFRBertConfig.loss": true, + "tfr.keras.premade.tfrbert_task.TFRBertConfig.loss_reduction": true, + "tfr.keras.premade.tfrbert_task.TFRBertConfig.model": true, + "tfr.keras.premade.tfrbert_task.TFRBertConfig.output_preds": true, + "tfr.keras.premade.tfrbert_task.TFRBertConfig.override": true, + "tfr.keras.premade.tfrbert_task.TFRBertConfig.replace": true, + "tfr.keras.premade.tfrbert_task.TFRBertConfig.restrictions": true, + "tfr.keras.premade.tfrbert_task.TFRBertConfig.train_data": true, + "tfr.keras.premade.tfrbert_task.TFRBertConfig.validate": true, + "tfr.keras.premade.tfrbert_task.TFRBertConfig.validation_data": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig": false, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.IMMUTABLE_TYPES": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.RESERVED_ATTR": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.SEQUENCE_TYPES": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.__contains__": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.__eq__": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.__ge__": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.__gt__": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.__init__": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.__le__": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.__lt__": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.__ne__": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.__new__": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.as_dict": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.block_length": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.cache": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.convert_labels_to_binary": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.cycle_length": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.data_format": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.dataset_fn": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.default_params": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.deterministic": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.drop_remainder": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.enable_tf_data_service": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.from_args": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.from_json": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.from_yaml": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.get": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.global_batch_size": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.input_path": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.is_training": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.list_size": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.lock": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.mask_feature_name": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.override": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.read_document_id": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.read_query_id": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.replace": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.restrictions": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.seed": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.seq_length": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.sharding": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.shuffle_buffer_size": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.shuffle_examples": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.tf_data_service_address": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.tf_data_service_job_name": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.tfds_as_supervised": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.tfds_data_dir": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.tfds_name": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.tfds_skip_decoding_feature": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.tfds_split": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataConfig.validate": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataLoader": false, + "tfr.keras.premade.tfrbert_task.TFRBertDataLoader.__eq__": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataLoader.__ge__": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataLoader.__gt__": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataLoader.__init__": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataLoader.__le__": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataLoader.__lt__": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataLoader.__ne__": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataLoader.__new__": true, + "tfr.keras.premade.tfrbert_task.TFRBertDataLoader.load": true, + "tfr.keras.premade.tfrbert_task.TFRBertModelBuilder": false, + "tfr.keras.premade.tfrbert_task.TFRBertModelBuilder.__eq__": true, + "tfr.keras.premade.tfrbert_task.TFRBertModelBuilder.__ge__": true, + "tfr.keras.premade.tfrbert_task.TFRBertModelBuilder.__gt__": true, + "tfr.keras.premade.tfrbert_task.TFRBertModelBuilder.__init__": true, + "tfr.keras.premade.tfrbert_task.TFRBertModelBuilder.__le__": true, + "tfr.keras.premade.tfrbert_task.TFRBertModelBuilder.__lt__": true, + "tfr.keras.premade.tfrbert_task.TFRBertModelBuilder.__ne__": true, + "tfr.keras.premade.tfrbert_task.TFRBertModelBuilder.__new__": true, + "tfr.keras.premade.tfrbert_task.TFRBertModelBuilder.build": true, + "tfr.keras.premade.tfrbert_task.TFRBertModelBuilder.create_inputs": true, + "tfr.keras.premade.tfrbert_task.TFRBertModelBuilder.preprocess": true, + "tfr.keras.premade.tfrbert_task.TFRBertModelBuilder.score": true, + "tfr.keras.premade.tfrbert_task.TFRBertModelConfig": false, + "tfr.keras.premade.tfrbert_task.TFRBertModelConfig.IMMUTABLE_TYPES": true, + "tfr.keras.premade.tfrbert_task.TFRBertModelConfig.RESERVED_ATTR": true, + "tfr.keras.premade.tfrbert_task.TFRBertModelConfig.SEQUENCE_TYPES": true, + "tfr.keras.premade.tfrbert_task.TFRBertModelConfig.__contains__": true, + "tfr.keras.premade.tfrbert_task.TFRBertModelConfig.__eq__": true, + "tfr.keras.premade.tfrbert_task.TFRBertModelConfig.__ge__": true, + "tfr.keras.premade.tfrbert_task.TFRBertModelConfig.__gt__": true, + "tfr.keras.premade.tfrbert_task.TFRBertModelConfig.__init__": true, + "tfr.keras.premade.tfrbert_task.TFRBertModelConfig.__le__": true, + "tfr.keras.premade.tfrbert_task.TFRBertModelConfig.__lt__": true, + "tfr.keras.premade.tfrbert_task.TFRBertModelConfig.__ne__": true, + "tfr.keras.premade.tfrbert_task.TFRBertModelConfig.__new__": true, + "tfr.keras.premade.tfrbert_task.TFRBertModelConfig.as_dict": true, + "tfr.keras.premade.tfrbert_task.TFRBertModelConfig.default_params": true, + "tfr.keras.premade.tfrbert_task.TFRBertModelConfig.dropout_rate": true, + "tfr.keras.premade.tfrbert_task.TFRBertModelConfig.encoder": true, + "tfr.keras.premade.tfrbert_task.TFRBertModelConfig.from_args": true, + "tfr.keras.premade.tfrbert_task.TFRBertModelConfig.from_json": true, + "tfr.keras.premade.tfrbert_task.TFRBertModelConfig.from_yaml": true, + "tfr.keras.premade.tfrbert_task.TFRBertModelConfig.get": true, + "tfr.keras.premade.tfrbert_task.TFRBertModelConfig.lock": true, + "tfr.keras.premade.tfrbert_task.TFRBertModelConfig.override": true, + "tfr.keras.premade.tfrbert_task.TFRBertModelConfig.replace": true, + "tfr.keras.premade.tfrbert_task.TFRBertModelConfig.restrictions": true, + "tfr.keras.premade.tfrbert_task.TFRBertModelConfig.validate": true, + "tfr.keras.premade.tfrbert_task.TFRBertScorer": false, + "tfr.keras.premade.tfrbert_task.TFRBertScorer.__call__": true, + "tfr.keras.premade.tfrbert_task.TFRBertScorer.__eq__": true, + "tfr.keras.premade.tfrbert_task.TFRBertScorer.__ge__": true, + "tfr.keras.premade.tfrbert_task.TFRBertScorer.__gt__": true, + "tfr.keras.premade.tfrbert_task.TFRBertScorer.__init__": true, + "tfr.keras.premade.tfrbert_task.TFRBertScorer.__le__": true, + "tfr.keras.premade.tfrbert_task.TFRBertScorer.__lt__": true, + "tfr.keras.premade.tfrbert_task.TFRBertScorer.__ne__": true, + "tfr.keras.premade.tfrbert_task.TFRBertScorer.__new__": true, + "tfr.keras.premade.tfrbert_task.TFRBertTask": false, + "tfr.keras.premade.tfrbert_task.TFRBertTask.__eq__": true, + "tfr.keras.premade.tfrbert_task.TFRBertTask.__ge__": true, + "tfr.keras.premade.tfrbert_task.TFRBertTask.__gt__": true, + "tfr.keras.premade.tfrbert_task.TFRBertTask.__init__": true, + "tfr.keras.premade.tfrbert_task.TFRBertTask.__le__": true, + "tfr.keras.premade.tfrbert_task.TFRBertTask.__lt__": true, + "tfr.keras.premade.tfrbert_task.TFRBertTask.__ne__": true, + "tfr.keras.premade.tfrbert_task.TFRBertTask.__new__": true, + "tfr.keras.premade.tfrbert_task.TFRBertTask.aggregate_logs": true, + "tfr.keras.premade.tfrbert_task.TFRBertTask.build_inputs": true, + "tfr.keras.premade.tfrbert_task.TFRBertTask.build_losses": true, + "tfr.keras.premade.tfrbert_task.TFRBertTask.build_metrics": true, + "tfr.keras.premade.tfrbert_task.TFRBertTask.build_model": true, + "tfr.keras.premade.tfrbert_task.TFRBertTask.create_optimizer": true, + "tfr.keras.premade.tfrbert_task.TFRBertTask.inference_step": true, + "tfr.keras.premade.tfrbert_task.TFRBertTask.initialize": true, + "tfr.keras.premade.tfrbert_task.TFRBertTask.logging_dir": true, + "tfr.keras.premade.tfrbert_task.TFRBertTask.loss": true, + "tfr.keras.premade.tfrbert_task.TFRBertTask.name": true, + "tfr.keras.premade.tfrbert_task.TFRBertTask.name_scope": true, + "tfr.keras.premade.tfrbert_task.TFRBertTask.non_trainable_variables": true, + "tfr.keras.premade.tfrbert_task.TFRBertTask.process_compiled_metrics": true, + "tfr.keras.premade.tfrbert_task.TFRBertTask.process_metrics": true, + "tfr.keras.premade.tfrbert_task.TFRBertTask.reduce_aggregated_logs": true, + "tfr.keras.premade.tfrbert_task.TFRBertTask.submodules": true, + "tfr.keras.premade.tfrbert_task.TFRBertTask.task_config": true, + "tfr.keras.premade.tfrbert_task.TFRBertTask.train_step": true, + "tfr.keras.premade.tfrbert_task.TFRBertTask.trainable_variables": true, + "tfr.keras.premade.tfrbert_task.TFRBertTask.validation_step": true, + "tfr.keras.premade.tfrbert_task.TFRBertTask.variables": true, + "tfr.keras.premade.tfrbert_task.TFRBertTask.with_name_scope": true, + "tfr.keras.premade.tfrbert_task.TensorDict": false, + "tfr.keras.premade.tfrbert_task.TensorLike": false, "tfr.keras.saved_model": false, "tfr.keras.saved_model.Signatures": false, "tfr.keras.saved_model.Signatures.__call__": true, diff --git a/tensorflow_ranking/g3doc/api_docs/python/tfr/_redirects.yaml b/tensorflow_ranking/g3doc/api_docs/python/tfr/_redirects.yaml index 7e52a6f..c0ca5fc 100644 --- a/tensorflow_ranking/g3doc/api_docs/python/tfr/_redirects.yaml +++ b/tensorflow_ranking/g3doc/api_docs/python/tfr/_redirects.yaml @@ -3,3 +3,23 @@ redirects: to: /ranking/api_docs/python/tfr/keras/canned/DNNRankingNetwork - from: /ranking/api_docs/python/tfr/keras/canned/gam/GAMRankingNetwork to: /ranking/api_docs/python/tfr/keras/canned/GAMRankingNetwork +- from: /ranking/api_docs/python/tfr/keras/premade/TensorLike + to: /ranking/api_docs/python/tfr/keras/model/TensorLike +- from: /ranking/api_docs/python/tfr/keras/premade/tfrbert_task/TFRBertConfig + to: /ranking/api_docs/python/tfr/keras/premade/TFRBertConfig +- from: /ranking/api_docs/python/tfr/keras/premade/tfrbert_task/TFRBertDataConfig + to: /ranking/api_docs/python/tfr/keras/premade/TFRBertDataConfig +- from: /ranking/api_docs/python/tfr/keras/premade/tfrbert_task/TFRBertDataLoader + to: /ranking/api_docs/python/tfr/keras/premade/TFRBertDataLoader +- from: /ranking/api_docs/python/tfr/keras/premade/tfrbert_task/TFRBertModelBuilder + to: /ranking/api_docs/python/tfr/keras/premade/TFRBertModelBuilder +- from: /ranking/api_docs/python/tfr/keras/premade/tfrbert_task/TFRBertModelConfig + to: /ranking/api_docs/python/tfr/keras/premade/TFRBertModelConfig +- from: /ranking/api_docs/python/tfr/keras/premade/tfrbert_task/TFRBertScorer + to: /ranking/api_docs/python/tfr/keras/premade/TFRBertScorer +- from: /ranking/api_docs/python/tfr/keras/premade/tfrbert_task/TFRBertTask + to: /ranking/api_docs/python/tfr/keras/premade/TFRBertTask +- from: /ranking/api_docs/python/tfr/keras/premade/tfrbert_task/TensorDict + to: /ranking/api_docs/python/tfr/keras/premade/TensorDict +- from: /ranking/api_docs/python/tfr/keras/premade/tfrbert_task/TensorLike + to: /ranking/api_docs/python/tfr/keras/model/TensorLike diff --git a/tensorflow_ranking/g3doc/api_docs/python/tfr/_toc.yaml b/tensorflow_ranking/g3doc/api_docs/python/tfr/_toc.yaml index afedbdd..8fd9ac0 100644 --- a/tensorflow_ranking/g3doc/api_docs/python/tfr/_toc.yaml +++ b/tensorflow_ranking/g3doc/api_docs/python/tfr/_toc.yaml @@ -279,6 +279,30 @@ toc: path: /ranking/api_docs/python/tfr/keras/pipeline/SimpleDatasetBuilder - title: SimplePipeline path: /ranking/api_docs/python/tfr/keras/pipeline/SimplePipeline + - title: premade + section: + - title: Overview + path: /ranking/api_docs/python/tfr/keras/premade + - title: TFRBertConfig + path: /ranking/api_docs/python/tfr/keras/premade/TFRBertConfig + - title: TFRBertDataConfig + path: /ranking/api_docs/python/tfr/keras/premade/TFRBertDataConfig + - title: TFRBertDataLoader + path: /ranking/api_docs/python/tfr/keras/premade/TFRBertDataLoader + - title: TFRBertModelBuilder + path: /ranking/api_docs/python/tfr/keras/premade/TFRBertModelBuilder + - title: TFRBertModelConfig + path: /ranking/api_docs/python/tfr/keras/premade/TFRBertModelConfig + - title: TFRBertScorer + path: /ranking/api_docs/python/tfr/keras/premade/TFRBertScorer + - title: TFRBertTask + path: /ranking/api_docs/python/tfr/keras/premade/TFRBertTask + - title: TensorDict + path: /ranking/api_docs/python/tfr/keras/premade/TensorDict + - title: tfrbert_task + section: + - title: Overview + path: /ranking/api_docs/python/tfr/keras/premade/tfrbert_task - title: saved_model section: - title: Overview diff --git a/tensorflow_ranking/g3doc/api_docs/python/tfr/all_symbols.md b/tensorflow_ranking/g3doc/api_docs/python/tfr/all_symbols.md index 0ed05dd..6592c4a 100644 --- a/tensorflow_ranking/g3doc/api_docs/python/tfr/all_symbols.md +++ b/tensorflow_ranking/g3doc/api_docs/python/tfr/all_symbols.md @@ -126,6 +126,26 @@ * tfr.keras.pipeline.PipelineHparams * tfr.keras.pipeline.SimpleDatasetBuilder * tfr.keras.pipeline.SimplePipeline +* tfr.keras.premade +* tfr.keras.premade.TFRBertConfig +* tfr.keras.premade.TFRBertDataConfig +* tfr.keras.premade.TFRBertDataLoader +* tfr.keras.premade.TFRBertModelBuilder +* tfr.keras.premade.TFRBertModelConfig +* tfr.keras.premade.TFRBertScorer +* tfr.keras.premade.TFRBertTask +* tfr.keras.premade.TensorDict +* tfr.keras.premade.TensorLike +* tfr.keras.premade.tfrbert_task +* tfr.keras.premade.tfrbert_task.TFRBertConfig +* tfr.keras.premade.tfrbert_task.TFRBertDataConfig +* tfr.keras.premade.tfrbert_task.TFRBertDataLoader +* tfr.keras.premade.tfrbert_task.TFRBertModelBuilder +* tfr.keras.premade.tfrbert_task.TFRBertModelConfig +* tfr.keras.premade.tfrbert_task.TFRBertScorer +* tfr.keras.premade.tfrbert_task.TFRBertTask +* tfr.keras.premade.tfrbert_task.TensorDict +* tfr.keras.premade.tfrbert_task.TensorLike * tfr.keras.saved_model * tfr.keras.saved_model.Signatures * tfr.keras.strategy_utils diff --git a/tensorflow_ranking/g3doc/api_docs/python/tfr/keras.md b/tensorflow_ranking/g3doc/api_docs/python/tfr/keras.md index b2a5e55..9f32efa 100644 --- a/tensorflow_ranking/g3doc/api_docs/python/tfr/keras.md +++ b/tensorflow_ranking/g3doc/api_docs/python/tfr/keras.md @@ -45,6 +45,9 @@ tfr.keras. [`pipeline`](../tfr/keras/pipeline.md) module: Ranking pipeline to train tf.keras.Model in tfr.keras. +[`premade`](../tfr/keras/premade.md) module: TensorFlow Ranking Premade Orbit +Task Module. + [`saved_model`](../tfr/keras/saved_model.md) module: SavedModel utilities for TF-Ranking. diff --git a/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/model/TensorDict.md b/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/model/TensorDict.md index cc906e5..1b649ba 100644 --- a/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/model/TensorDict.md +++ b/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/model/TensorDict.md @@ -8,7 +8,6 @@ description: The central part of internal API. # tfr.keras.model.TensorDict - This symbol is a **type alias**. The central part of internal API. diff --git a/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/pipeline/DatasetHparams/dataset_reader.md b/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/pipeline/DatasetHparams/dataset_reader.md index 5f1fe9f..ff795d2 100644 --- a/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/pipeline/DatasetHparams/dataset_reader.md +++ b/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/pipeline/DatasetHparams/dataset_reader.md @@ -566,7 +566,6 @@ batch. - @@ -1504,7 +1503,6 @@ the same key to combine in a single batch, which will be passed to
Returns
- @@ -2499,7 +2497,6 @@ accumulates one or more state tensors, whose initial values are `initial_state`. ``` -
Returns
@@ -2526,7 +2523,6 @@ structure of `initial_state`.
Args
- @@ -2874,7 +2870,6 @@ By default, snapshot parallelizes reads by the number of cores available on the system, but will not attempt to shuffle the data. -
Returns
@@ -2917,7 +2912,6 @@ a snapshot.
Args
- @@ -2997,7 +2991,6 @@ A transformation that stops dataset iteration based on a `predicate`. ``` -
Returns
@@ -3015,7 +3008,6 @@ shapes and types defined by `self.output_shapes` and
Args
- @@ -3086,7 +3078,6 @@ Note: This transformation only supports datasets which fit into memory and have elements of either `tf.int32`, `tf.int64` or `tf.string` type. -
Returns
diff --git a/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/premade.md b/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/premade.md new file mode 100644 index 0000000..563b9ed --- /dev/null +++ b/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/premade.md @@ -0,0 +1,82 @@ +description: TensorFlow Ranking Premade Orbit Task Module. + +
+ + + + +
+ +# Module: tfr.keras.premade + + + +
Returns
+ + + +TensorFlow Ranking Premade Orbit Task Module. + +## Modules + +[`tfrbert_task`](../../tfr/keras/premade/tfrbert_task.md) module: TF-Ranking +BERT task. + +## Classes + +[`class TFRBertConfig`](../../tfr/keras/premade/TFRBertConfig.md): The +tf-ranking BERT task config. + +[`class TFRBertDataConfig`](../../tfr/keras/premade/TFRBertDataConfig.md): Data +config for TFR-BERT task. + +[`class TFRBertDataLoader`](../../tfr/keras/premade/TFRBertDataLoader.md): A +class to load dataset for TFR-BERT task. + +[`class TFRBertModelBuilder`](../../tfr/keras/premade/TFRBertModelBuilder.md): +Model builder for TFR-BERT models. + +[`class TFRBertModelConfig`](../../tfr/keras/premade/TFRBertModelConfig.md): A +TFR-BERT model configuration. + +[`class TFRBertScorer`](../../tfr/keras/premade/TFRBertScorer.md): Univariate +BERT-based scorer. + +[`class TFRBertTask`](../../tfr/keras/premade/TFRBertTask.md): Task object for +tf-ranking BERT. + +## Type Aliases + +[`TensorDict`](../../tfr/keras/premade/TensorDict.md): The central part of +internal API. + +[`TensorLike`](../../tfr/keras/model/TensorLike.md): Union of all types that can +be converted to a `tf.Tensor` by `tf.convert_to_tensor`. + + + + + + + + + + + + + + +
+DOCUMENT_ID + +`'document_id'` +
+QUERY_ID + +`'query_id'` +
diff --git a/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/premade/TFRBertConfig.md b/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/premade/TFRBertConfig.md new file mode 100644 index 0000000..08b43bf --- /dev/null +++ b/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/premade/TFRBertConfig.md @@ -0,0 +1,433 @@ +description: The tf-ranking BERT task config. + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +# tfr.keras.premade.TFRBertConfig + + + + + + + +The tf-ranking BERT task config. + +Inherits From: +[`RankingTaskConfig`](../../../tfr/keras/task/RankingTaskConfig.md) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+`default_params` + +Dataclass field +
+`restrictions` + +Dataclass field +
+`init_checkpoint` + +Dataclass field +
+`model` + +Dataclass field +
+`train_data` + +Dataclass field +
+`validation_data` + +Dataclass field +
+`loss` + +Dataclass field +
+`loss_reduction` + +Dataclass field +
+`aggregated_metrics` + +Dataclass field +
+`output_preds` + +Dataclass field +
+ +## Methods + +

as_dict

+ + + +Returns a dict representation of params_dict.ParamsDict. + +For the nested params_dict.ParamsDict, a nested dict will be returned. + +

from_args

+ + + +Builds a config from the given list of arguments. + +

from_json

+ + + +Wrapper for `from_yaml`. + +

from_yaml

+ + + +

get

+ + + +Accesses through built-in dictionary get method. + +

lock

+ + + +Makes the ParamsDict immutable. + +

override

+ + + +Override the ParamsDict with a set of given params. + + + + + + + + + + + + + + +
Args
+`override_params` + +a dict or a ParamsDict specifying the parameters to be +overridden. +
+`is_strict` + +a boolean specifying whether override is strict or not. If +True, keys in `override_params` must be present in the ParamsDict. If +False, keys in `override_params` can be different from what is currently +defined in the ParamsDict. In this case, the ParamsDict will be extended +to include the new keys. +
+ +

replace

+ + + +Overrides/returns a unlocked copy with the current config unchanged. + +

validate

+ + + +Validate the parameters consistency based on the restrictions. + +This method validates the internal consistency using the pre-defined list of +restrictions. A restriction is defined as a string which specfiies a binary +operation. The supported binary operations are {'==', '!=', '<', '<=', '>', +'>='}. Note that the meaning of these operators are consistent with the +underlying Python immplementation. Users should make sure the define +restrictions on their type make sense. + +For example, for a ParamsDict like the following `a: a1: 1 a2: 2 b: bb: bb1: 10 +bb2: 20 ccc: a1: 1 a3: 3` one can define two restrictions like this ['a.a1 == +b.ccc.a1', 'a.a2 <= b.bb.bb2'] + +#### What it enforces are: + +- a.a1 = 1 == b.ccc.a1 = 1 +- a.a2 = 2 <= b.bb.bb2 = 20 + + + + + + + + + + + + + + +
Raises
+`KeyError` + +if any of the following happens +(1) any of parameters in any of restrictions is not defined in +ParamsDict, +(2) any inconsistency violating the restriction is found. +
+`ValueError` + +if the restriction defined in the string is not supported. +
+ +

__contains__

+ + + +Implements the membership test operator. + +

__eq__

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+IMMUTABLE_TYPES + +`(, + , + , + , + )` +
+RESERVED_ATTR + +`['_locked', '_restrictions']` +
+SEQUENCE_TYPES + +`(, )` +
+aggregated_metrics + +`False` +
+default_params + +`None` +
+init_checkpoint + +`''` +
+loss + +`'softmax_loss'` +
+loss_reduction + +`'none'` +
+model + +Instance of tfr.keras.premade.TFRBertModelConfig +
+output_preds + +`False` +
+restrictions + +`None` +
+train_data + +`None` +
+validation_data + +`None` +
diff --git a/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/premade/TFRBertDataConfig.md b/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/premade/TFRBertDataConfig.md new file mode 100644 index 0000000..3fd86a7 --- /dev/null +++ b/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/premade/TFRBertDataConfig.md @@ -0,0 +1,753 @@ +description: Data config for TFR-BERT task. + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +# tfr.keras.premade.TFRBertDataConfig + + + + + + + +Data config for TFR-BERT task. + +Inherits From: +[`RankingDataConfig`](../../../tfr/keras/task/RankingDataConfig.md) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+`default_params` + +Dataclass field +
+`restrictions` + +Dataclass field +
+`input_path` + +Dataclass field +
+`tfds_name` + +Dataclass field +
+`tfds_split` + +Dataclass field +
+`global_batch_size` + +Dataclass field +
+`is_training` + +Dataclass field +
+`drop_remainder` + +Dataclass field +
+`shuffle_buffer_size` + +Dataclass field +
+`cache` + +Dataclass field +
+`cycle_length` + +Dataclass field +
+`block_length` + +Dataclass field +
+`deterministic` + +Dataclass field +
+`sharding` + +Dataclass field +
+`enable_tf_data_service` + +Dataclass field +
+`tf_data_service_address` + +Dataclass field +
+`tf_data_service_job_name` + +Dataclass field +
+`tfds_data_dir` + +Dataclass field +
+`tfds_as_supervised` + +Dataclass field +
+`tfds_skip_decoding_feature` + +Dataclass field +
+`seed` + +Dataclass field +
+`data_format` + +Dataclass field +
+`dataset_fn` + +Dataclass field +
+`list_size` + +Dataclass field +
+`shuffle_examples` + +Dataclass field +
+`convert_labels_to_binary` + +Dataclass field +
+`mask_feature_name` + +Dataclass field +
+`seq_length` + +Dataclass field +
+`read_query_id` + +Dataclass field +
+`read_document_id` + +Dataclass field +
+ +## Methods + +

as_dict

+ + + +Returns a dict representation of params_dict.ParamsDict. + +For the nested params_dict.ParamsDict, a nested dict will be returned. + +

from_args

+ + + +Builds a config from the given list of arguments. + +

from_json

+ + + +Wrapper for `from_yaml`. + +

from_yaml

+ + + +

get

+ + + +Accesses through built-in dictionary get method. + +

lock

+ + + +Makes the ParamsDict immutable. + +

override

+ + + +Override the ParamsDict with a set of given params. + + + + + + + + + + + + + + +
Args
+`override_params` + +a dict or a ParamsDict specifying the parameters to be +overridden. +
+`is_strict` + +a boolean specifying whether override is strict or not. If +True, keys in `override_params` must be present in the ParamsDict. If +False, keys in `override_params` can be different from what is currently +defined in the ParamsDict. In this case, the ParamsDict will be extended +to include the new keys. +
+ +

replace

+ + + +Overrides/returns a unlocked copy with the current config unchanged. + +

validate

+ + + +Validate the parameters consistency based on the restrictions. + +This method validates the internal consistency using the pre-defined list of +restrictions. A restriction is defined as a string which specfiies a binary +operation. The supported binary operations are {'==', '!=', '<', '<=', '>', +'>='}. Note that the meaning of these operators are consistent with the +underlying Python immplementation. Users should make sure the define +restrictions on their type make sense. + +For example, for a ParamsDict like the following `a: a1: 1 a2: 2 b: bb: bb1: 10 +bb2: 20 ccc: a1: 1 a3: 3` one can define two restrictions like this ['a.a1 == +b.ccc.a1', 'a.a2 <= b.bb.bb2'] + +#### What it enforces are: + +- a.a1 = 1 == b.ccc.a1 = 1 +- a.a2 = 2 <= b.bb.bb2 = 20 + + + + + + + + + + + + + + +
Raises
+`KeyError` + +if any of the following happens +(1) any of parameters in any of restrictions is not defined in +ParamsDict, +(2) any inconsistency violating the restriction is found. +
+`ValueError` + +if the restriction defined in the string is not supported. +
+ +

__contains__

+ + + +Implements the membership test operator. + +

__eq__

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+IMMUTABLE_TYPES + +`(, + , + , + , + )` +
+RESERVED_ATTR + +`['_locked', '_restrictions']` +
+SEQUENCE_TYPES + +`(, )` +
+block_length + +`1` +
+cache + +`False` +
+convert_labels_to_binary + +`False` +
+cycle_length + +`None` +
+data_format + +`'example_list_with_context'` +
+dataset_fn + +`'tfrecord'` +
+default_params + +`None` +
+deterministic + +`None` +
+drop_remainder + +`True` +
+enable_tf_data_service + +`False` +
+global_batch_size + +`0` +
+input_path + +`''` +
+is_training + +`True` +
+list_size + +`None` +
+mask_feature_name + +`'example_list_mask'` +
+read_document_id + +`False` +
+read_query_id + +`False` +
+restrictions + +`None` +
+seed + +`None` +
+seq_length + +`128` +
+sharding + +`True` +
+shuffle_buffer_size + +`100` +
+shuffle_examples + +`False` +
+tf_data_service_address + +`None` +
+tf_data_service_job_name + +`None` +
+tfds_as_supervised + +`False` +
+tfds_data_dir + +`''` +
+tfds_name + +`''` +
+tfds_skip_decoding_feature + +`''` +
+tfds_split + +`''` +
diff --git a/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/premade/TFRBertDataLoader.md b/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/premade/TFRBertDataLoader.md new file mode 100644 index 0000000..a44c45f --- /dev/null +++ b/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/premade/TFRBertDataLoader.md @@ -0,0 +1,59 @@ +description: A class to load dataset for TFR-BERT task. + +
+ + + + +
+ +# tfr.keras.premade.TFRBertDataLoader + + + + + + + +A class to load dataset for TFR-BERT task. + +Inherits From: +[`RankingDataLoader`](../../../tfr/keras/task/RankingDataLoader.md) + + + + + + + +## Methods + +

load

+ +View +source + + + +Returns a tf.dataset.Dataset. diff --git a/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/premade/TFRBertModelBuilder.md b/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/premade/TFRBertModelBuilder.md new file mode 100644 index 0000000..b269ac6 --- /dev/null +++ b/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/premade/TFRBertModelBuilder.md @@ -0,0 +1,173 @@ +description: Model builder for TFR-BERT models. + +
+ + + + + + + +
+ +# tfr.keras.premade.TFRBertModelBuilder + + + + + + + +Model builder for TFR-BERT models. + +Inherits From: [`ModelBuilder`](../../../tfr/keras/model/ModelBuilder.md), +[`ModelBuilderWithMask`](../../../tfr/keras/model/ModelBuilderWithMask.md), +[`AbstractModelBuilder`](../../../tfr/keras/model/AbstractModelBuilder.md) + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+`input_creator` + +A callable or a class like `InputCreator` to implement +`create_inputs`. +
+`preprocessor` + +A callable or a class like `Preprocessor` to implement +`preprocess`. +
+`scorer` + +A callable or a class like `Scorer` to implement `score`. +
+`mask_feature_name` + +name of 2D mask boolean feature. +
+`name` + +(optional) name of the Model. +
+ +## Methods + +

build

+ +View +source + + + +Builds a Keras Model for Ranking Pipeline. + +#### Example usage: + +```python +model_builder = SimpleModelBuilder( + {}, + {"example_feature_1": tf.io.FixedLenFeature( + shape=(1,), dtype=tf.float32, default_value=0.0)}, + "list_mask", "model_builder") +model = model_builder.build() +``` + + + + + + + + + + +
Returns
+A `tf.keras.Model`. +
+ +

create_inputs

+ +View +source + + + +See `ModelBuilderWithMask`. + +

preprocess

+ +View +source + + + +See `ModelBuilderWithMask`. + +

score

+ +View +source + + + +See `ModelBuilderWithMask`. diff --git a/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/premade/TFRBertModelConfig.md b/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/premade/TFRBertModelConfig.md new file mode 100644 index 0000000..6cfc936 --- /dev/null +++ b/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/premade/TFRBertModelConfig.md @@ -0,0 +1,334 @@ +description: A TFR-BERT model configuration. + +
+ + + + + + + + + + + + + + + + + + + + + +
+ +# tfr.keras.premade.TFRBertModelConfig + + + + + + + +A TFR-BERT model configuration. + + + + + + + + + + + + + + + + + + + + + + + + + +
+`default_params` + +Dataclass field +
+`restrictions` + +Dataclass field +
+`dropout_rate` + +Dataclass field +
+`encoder` + +Dataclass field +
+ +## Methods + +

as_dict

+ + + +Returns a dict representation of params_dict.ParamsDict. + +For the nested params_dict.ParamsDict, a nested dict will be returned. + +

from_args

+ + + +Builds a config from the given list of arguments. + +

from_json

+ + + +Wrapper for `from_yaml`. + +

from_yaml

+ + + +

get

+ + + +Accesses through built-in dictionary get method. + +

lock

+ + + +Makes the ParamsDict immutable. + +

override

+ + + +Override the ParamsDict with a set of given params. + + + + + + + + + + + + + + +
Args
+`override_params` + +a dict or a ParamsDict specifying the parameters to be +overridden. +
+`is_strict` + +a boolean specifying whether override is strict or not. If +True, keys in `override_params` must be present in the ParamsDict. If +False, keys in `override_params` can be different from what is currently +defined in the ParamsDict. In this case, the ParamsDict will be extended +to include the new keys. +
+ +

replace

+ + + +Overrides/returns a unlocked copy with the current config unchanged. + +

validate

+ + + +Validate the parameters consistency based on the restrictions. + +This method validates the internal consistency using the pre-defined list of +restrictions. A restriction is defined as a string which specfiies a binary +operation. The supported binary operations are {'==', '!=', '<', '<=', '>', +'>='}. Note that the meaning of these operators are consistent with the +underlying Python immplementation. Users should make sure the define +restrictions on their type make sense. + +For example, for a ParamsDict like the following `a: a1: 1 a2: 2 b: bb: bb1: 10 +bb2: 20 ccc: a1: 1 a3: 3` one can define two restrictions like this ['a.a1 == +b.ccc.a1', 'a.a2 <= b.bb.bb2'] + +#### What it enforces are: + +- a.a1 = 1 == b.ccc.a1 = 1 +- a.a2 = 2 <= b.bb.bb2 = 20 + + + + + + + + + + + + + + +
Raises
+`KeyError` + +if any of the following happens +(1) any of parameters in any of restrictions is not defined in +ParamsDict, +(2) any inconsistency violating the restriction is found. +
+`ValueError` + +if the restriction defined in the string is not supported. +
+ +

__contains__

+ + + +Implements the membership test operator. + +

__eq__

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+IMMUTABLE_TYPES + +`(, + , + , + , + )` +
+RESERVED_ATTR + +`['_locked', '_restrictions']` +
+SEQUENCE_TYPES + +`(, )` +
+default_params + +`None` +
+dropout_rate + +`0.1` +
+encoder + +Instance of `tensorflow_models.official.nlp.configs.encoders.EncoderConfig` +
+restrictions + +`None` +
diff --git a/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/premade/TFRBertScorer.md b/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/premade/TFRBertScorer.md new file mode 100644 index 0000000..ae06cc3 --- /dev/null +++ b/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/premade/TFRBertScorer.md @@ -0,0 +1,63 @@ +description: Univariate BERT-based scorer. + +
+ + + + +
+ +# tfr.keras.premade.TFRBertScorer + + + + + + + +Univariate BERT-based scorer. + +Inherits From: +[`UnivariateScorer`](../../../tfr/keras/model/UnivariateScorer.md), +[`Scorer`](../../../tfr/keras/model/Scorer.md) + + + + + + + +## Methods + +

__call__

+ +View +source + + + +See `Scorer`. diff --git a/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/premade/TFRBertTask.md b/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/premade/TFRBertTask.md new file mode 100644 index 0000000..437cf03 --- /dev/null +++ b/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/premade/TFRBertTask.md @@ -0,0 +1,686 @@ +description: Task object for tf-ranking BERT. + +
+ + + + + + + + + + + + + + + + + + +
+ +# tfr.keras.premade.TFRBertTask + + + + + + + +Task object for tf-ranking BERT. + +Inherits From: [`RankingTask`](../../../tfr/keras/task/RankingTask.md) + + + + + + + + + + + + + + + + + + + + + + +
+`params` + +the task configuration instance, which can be any of dataclass, +ConfigDict, namedtuple, etc. +
+`logging_dir` + +a string pointing to where the model, summaries etc. will be +saved. You can also write additional stuff in this directory. +
+`name` + +the task name. +
+ + + + + + + + + +
`logging_dir` + +
`name` Returns the name of this module as passed +or determined in the ctor. + +NOTE: This is not the same as the `self.name_scope.name` which includes parent +module names.
`name_scope` Returns a +`tf.name_scope` instance for this class.
+`non_trainable_variables` Sequence of non-trainable variables owned +by this module and its submodules. + +Note: this method uses reflection to find variables on the current instance and +submodules. For performance reasons you may wish to cache the result of calling +this method if you don't expect the return value to change.
+`submodules` Sequence of all sub-modules. + +Submodules are modules which are properties of this module, or found as +properties of modules which are properties of this module (and so on). + +``` +>>> a = tf.Module() +>>> b = tf.Module() +>>> c = tf.Module() +>>> a.b = b +>>> b.c = c +>>> list(a.submodules) == [b, c] +True +>>> list(b.submodules) == [c] +True +>>> list(c.submodules) == [] +True +``` + +
`task_config` + +
`trainable_variables` Sequence of trainable +variables owned by this module and its submodules. + +Note: this method uses reflection to find variables on the current instance and +submodules. For performance reasons you may wish to cache the result of calling +this method if you don't expect the return value to change.
+`variables` Sequence of variables owned by this module and its +submodules. + +Note: this method uses reflection to find variables on the current instance +and submodules. For performance reasons you may wish to cache the result +of calling this method if you don't expect the return value to change. +
+ +## Methods + +

aggregate_logs

+ +View +source + + + +Aggregates over logs. This runs on CPU in eager mode. + +

build_inputs

+ +View +source + + + +Returns tf.data.Dataset for tf-ranking BERT task. + +

build_losses

+ +View +source + + + +Standard interface to compute losses. + + + + + + + + + + + + + + + + + +
Args
+`labels` + +optional label tensors. +
+`model_outputs` + +a nested structure of output tensors. +
+`aux_losses` + +auxiliary loss tensors, i.e. `losses` in keras.Model. +
+ + + + + + + + + + +
Returns
+The total loss tensor. +
+ +

build_metrics

+ +View +source + + + +Gets streaming metrics for training/validation. + +

build_model

+ +View +source + + + +[Optional] Creates model architecture. + + + + + + + + + + +
Returns
+A model instance. +
+ +

create_optimizer

+ + + +Creates an TF optimizer from configurations. + + + + + + + + + + + + + + +
Args
+`optimizer_config` + +the parameters of the Optimization settings. +
+`runtime_config` + +the parameters of the runtime. +
+ + + + + + + + + + +
Returns
+A tf.optimizers.Optimizer object. +
+ +

inference_step

+ + + +Performs the forward step. + +With distribution strategies, this method runs on devices. + + + + + + + + + + + + + + +
Args
+`inputs` + +a dictionary of input tensors. +
+`model` + +the keras.Model. +
+ + + + + + + + + + +
Returns
+Model outputs. +
+ +

initialize

+ +View +source + + + +Load a pretrained checkpoint (if exists) and then train from iter 0. + +

process_compiled_metrics

+ + + +Process and update compiled_metrics. + +call when using compile/fit API. + + + + + + + + + + + + + + + + + +
Args
+`compiled_metrics` + +the compiled metrics (model.compiled_metrics). +
+`labels` + +a tensor or a nested structure of tensors. +
+`model_outputs` + +a tensor or a nested structure of tensors. For example, +output of the keras model built by self.build_model. +
+ +

process_metrics

+ +View +source + + + +Process and update metrics. + +Called when using custom training loop API. + + + + + + + + + + + + + + + + + +
Args
+`metrics` + +a nested structure of metrics objects. The return of function +self.build_metrics. +
+`labels` + +a tensor or a nested structure of tensors. +
+`model_outputs` + +a tensor or a nested structure of tensors. For example, +output of the keras model built by self.build_model. +
+ +

reduce_aggregated_logs

+ +View +source + + + +Calculates aggregated metrics and writes predictions to csv. + +

train_step

+ +View +source + + + +Does forward and backward. + +With distribution strategies, this method runs on devices. + + + + + + + + + + + + + + + + + + + + +
Args
+`inputs` + +a dictionary of input tensors. +
+`model` + +the model, forward pass definition. +
+`optimizer` + +the optimizer for this training step. +
+`metrics` + +a nested structure of metrics objects. +
+ + + + + + + + + + +
Returns
+A dictionary of logs. +
+ +

validation_step

+ +View +source + + + +Validation step. + +With distribution strategies, this method runs on devices. + + + + + + + + + + + + + + + + + +
Args
+`inputs` + +a dictionary of input tensors. +
+`model` + +the keras.Model. +
+`metrics` + +a nested structure of metrics objects. +
+ + + + + + + + + + +
Returns
+A dictionary of logs. +
+ +

with_name_scope

+ + + +Decorator to automatically enter the module name scope. + +``` +>>> class MyModule(tf.Module): +... @tf.Module.with_name_scope +... def __call__(self, x): +... if not hasattr(self, 'w'): +... self.w = tf.Variable(tf.random.normal([x.shape[1], 3])) +... return tf.matmul(x, self.w) +``` + +Using the above module would produce `tf.Variable`s and `tf.Tensor`s whose names +included the module name: + +``` +>>> mod = MyModule() +>>> mod(tf.ones([1, 2])) + +>>> mod.w + +``` + + + + + + + + + + + +
Args
+`method` + +The method to wrap. +
+ + + + + + + + + + +
Returns
+The original method wrapped such that it enters the module's name scope. +
+ + + + + + + + + + + +
+loss + +`'loss'` +
diff --git a/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/premade/TensorDict.md b/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/premade/TensorDict.md new file mode 100644 index 0000000..d981340 --- /dev/null +++ b/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/premade/TensorDict.md @@ -0,0 +1,31 @@ +description: The central part of internal API. + +
+ + +
+ +# tfr.keras.premade.TensorDict + + + +This symbol is a **type alias**. + +The central part of internal API. + +#### Source: + + + + + +This represents a generic version of type 'origin' with type arguments 'params'. +There are two kind of these aliases: user defined and special. The special ones +are wrappers around builtin collections and ABCs in collections.abc. These must +have 'name' always set. If 'inst' is False, then the alias can't be +instantiated, this is used by e.g. typing.List and typing.Dict. diff --git a/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/premade/tfrbert_task.md b/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/premade/tfrbert_task.md new file mode 100644 index 0000000..14760d2 --- /dev/null +++ b/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/premade/tfrbert_task.md @@ -0,0 +1,77 @@ +description: TF-Ranking BERT task. + +
+ + + + +
+ +# Module: tfr.keras.premade.tfrbert_task + + + + + + + +TF-Ranking BERT task. + +## Classes + +[`class TFRBertConfig`](../../../tfr/keras/premade/TFRBertConfig.md): The +tf-ranking BERT task config. + +[`class TFRBertDataConfig`](../../../tfr/keras/premade/TFRBertDataConfig.md): +Data config for TFR-BERT task. + +[`class TFRBertDataLoader`](../../../tfr/keras/premade/TFRBertDataLoader.md): A +class to load dataset for TFR-BERT task. + +[`class TFRBertModelBuilder`](../../../tfr/keras/premade/TFRBertModelBuilder.md): +Model builder for TFR-BERT models. + +[`class TFRBertModelConfig`](../../../tfr/keras/premade/TFRBertModelConfig.md): +A TFR-BERT model configuration. + +[`class TFRBertScorer`](../../../tfr/keras/premade/TFRBertScorer.md): Univariate +BERT-based scorer. + +[`class TFRBertTask`](../../../tfr/keras/premade/TFRBertTask.md): Task object +for tf-ranking BERT. + +## Type Aliases + +[`TensorDict`](../../../tfr/keras/premade/TensorDict.md): The central part of +internal API. + +[`TensorLike`](../../../tfr/keras/model/TensorLike.md): Union of all types that +can be converted to a `tf.Tensor` by `tf.convert_to_tensor`. + + + + + + + + + + + + + + +
+DOCUMENT_ID + +`'document_id'` +
+QUERY_ID + +`'query_id'` +
diff --git a/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/task.md b/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/task.md index 8f9340d..9c6ad08 100644 --- a/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/task.md +++ b/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/task.md @@ -42,7 +42,6 @@ TF-Ranking task config. internal API. - diff --git a/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/task/FeatureSpec.md b/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/task/FeatureSpec.md index ee9a72a..10960c2 100644 --- a/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/task/FeatureSpec.md +++ b/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/task/FeatureSpec.md @@ -8,7 +8,6 @@ description: The central part of internal API. # tfr.keras.task.FeatureSpec - This symbol is a **type alias**. The central part of internal API. diff --git a/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/task/RankingDataConfig.md b/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/task/RankingDataConfig.md index bb0a227..cb7291f 100644 --- a/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/task/RankingDataConfig.md +++ b/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/task/RankingDataConfig.md @@ -95,8 +95,8 @@ Data set config. - +
@@ -365,7 +365,6 @@ Makes the ParamsDict immutable. Override the ParamsDict with a set of given params. -
@@ -427,7 +426,6 @@ b.ccc.a1', 'a.a2 <= b.bb.bb2'] - a.a2 = 2 <= b.bb.bb2 = 20 -
Args
@@ -471,7 +469,6 @@ Implements the membership test operator. -
Raises
diff --git a/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/task/RankingTask.md b/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/task/RankingTask.md index 8ec1b15..9e28586 100644 --- a/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/task/RankingTask.md +++ b/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/task/RankingTask.md @@ -50,8 +50,8 @@ Task object for TF-Ranking. - +
@@ -83,7 +83,6 @@ the task name.
- @@ -160,7 +159,6 @@ from a validation step may be a tuple with elements from replicas, and a concatenation of the elements is needed in such case. -
@@ -200,7 +198,6 @@ Dataset functions define per-host datasets with the per-replica batch size. With distributed training, this method runs on remote hosts. -
Args
@@ -224,7 +221,6 @@ optional distribution input pipeline context.
Args
- @@ -250,7 +246,6 @@ source Standard interface to compute losses. -
Returns
@@ -280,7 +275,6 @@ auxiliary loss tensors, i.e. `losses` in keras.Model.
Args
- @@ -317,7 +311,6 @@ source [Optional] Creates model architecture. -
Returns
@@ -342,7 +335,6 @@ A model instance. Creates an TF optimizer from configurations. -
Returns
@@ -365,7 +357,6 @@ the parameters of the runtime.
Args
- @@ -391,7 +382,6 @@ Performs the forward step. With distribution strategies, this method runs on devices. -
Returns
@@ -414,7 +404,6 @@ the keras.Model.
Args
- @@ -442,7 +431,6 @@ called. You can use this callback function to load a pretrained checkpoint, saved under a directory other than the model_dir. -
Returns
@@ -470,7 +458,6 @@ Process and update compiled_metrics. call when using compile/fit API. -
Args
@@ -516,7 +503,6 @@ Process and update metrics. Called when using custom training loop API. -
Args
@@ -563,7 +549,6 @@ to compute the final metrics. It runs on CPU and in each eval_end() in base trainer (see eval_end() function in official/core/base_trainer.py). -
Args
@@ -586,7 +571,6 @@ An optional variable of global step.
Args
- @@ -617,7 +601,6 @@ Does forward and backward. With distribution strategies, this method runs on devices. -
Returns
@@ -654,7 +637,6 @@ a nested structure of metrics objects.
Args
- @@ -684,7 +666,6 @@ Validation step. With distribution strategies, this method runs on devices. -
Returns
@@ -714,7 +695,6 @@ a nested structure of metrics objects.
Args
- @@ -759,7 +739,6 @@ numpy=..., dtype=float32)> ``` -
Returns
@@ -775,7 +754,6 @@ The method to wrap.
Args
- @@ -788,7 +766,6 @@ The original method wrapped such that it enters the module's name scope.
Returns
- diff --git a/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/task/RankingTaskConfig.md b/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/task/RankingTaskConfig.md index 9001792..8e1cf3a 100644 --- a/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/task/RankingTaskConfig.md +++ b/tensorflow_ranking/g3doc/api_docs/python/tfr/keras/task/RankingTaskConfig.md @@ -61,8 +61,8 @@ The TF-Ranking task config. - +
@@ -212,7 +212,6 @@ Makes the ParamsDict immutable. Override the ParamsDict with a set of given params. -
@@ -274,7 +273,6 @@ b.ccc.a1', 'a.a2 <= b.bb.bb2'] - a.a2 = 2 <= b.bb.bb2 = 20 -
Args
@@ -318,7 +316,6 @@ Implements the membership test operator. -
Raises
diff --git a/tensorflow_ranking/python/keras/BUILD b/tensorflow_ranking/python/keras/BUILD index c9a1ebd..505b861 100644 --- a/tensorflow_ranking/python/keras/BUILD +++ b/tensorflow_ranking/python/keras/BUILD @@ -12,7 +12,6 @@ py_library( name = "keras", srcs = ["__init__.py"], srcs_version = "PY2AND3", - visibility = ["//visibility:public"], deps = [ ":estimator", ":feature", @@ -27,6 +26,7 @@ py_library( ":task", ":utils", "//tensorflow_ranking/python/keras/canned", + "//tensorflow_ranking/python/keras/premade", ], ) diff --git a/tensorflow_ranking/python/keras/__init__.py b/tensorflow_ranking/python/keras/__init__.py index 196ec08..4a91071 100644 --- a/tensorflow_ranking/python/keras/__init__.py +++ b/tensorflow_ranking/python/keras/__init__.py @@ -23,6 +23,7 @@ from tensorflow_ranking.python.keras import model from tensorflow_ranking.python.keras import network from tensorflow_ranking.python.keras import pipeline +from tensorflow_ranking.python.keras import premade from tensorflow_ranking.python.keras import saved_model from tensorflow_ranking.python.keras import strategy_utils from tensorflow_ranking.python.keras import task diff --git a/tensorflow_ranking/python/keras/canned/BUILD b/tensorflow_ranking/python/keras/canned/BUILD index c1e89ed..36ebb34 100644 --- a/tensorflow_ranking/python/keras/canned/BUILD +++ b/tensorflow_ranking/python/keras/canned/BUILD @@ -1,6 +1,10 @@ # TensorFlow Ranking Keras canned models. -package(default_visibility = ["//visibility:public"]) +package( + default_visibility = [ + "//tensorflow_ranking:__subpackages__", + ], +) licenses(["notice"]) @@ -8,7 +12,6 @@ py_library( name = "canned", srcs = ["__init__.py"], srcs_version = "PY2AND3", - visibility = ["//visibility:public"], deps = [ ":dnn", ":gam", diff --git a/tensorflow_ranking/python/keras/premade/BUILD b/tensorflow_ranking/python/keras/premade/BUILD index 46120a4..5a3cff2 100644 --- a/tensorflow_ranking/python/keras/premade/BUILD +++ b/tensorflow_ranking/python/keras/premade/BUILD @@ -1,9 +1,22 @@ """TFR-BERT.""" -package(default_visibility = ["//visibility:public"]) +package( + default_visibility = [ + "//tensorflow_ranking:__subpackages__", + ], +) licenses(["notice"]) +py_library( + name = "premade", + srcs = ["__init__.py"], + srcs_version = "PY3", + deps = [ + ":tfrbert_task", + ], +) + py_library( name = "tfrbert_task", srcs = ["tfrbert_task.py"], diff --git a/tensorflow_ranking/python/keras/premade/__init__.py b/tensorflow_ranking/python/keras/premade/__init__.py new file mode 100644 index 0000000..28859c3 --- /dev/null +++ b/tensorflow_ranking/python/keras/premade/__init__.py @@ -0,0 +1,17 @@ +# Copyright 2021 The TensorFlow Ranking Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""TensorFlow Ranking Premade Orbit Task Module.""" + +from tensorflow_ranking.python.keras.premade.tfrbert_task import * # pylint: disable=wildcard-import,line-too-long diff --git a/tensorflow_ranking/python/version.py b/tensorflow_ranking/python/version.py index f1db59c..9d4bb58 100644 --- a/tensorflow_ranking/python/version.py +++ b/tensorflow_ranking/python/version.py @@ -17,7 +17,7 @@ # We follow Semantic Versioning (https://semver.org/) _MAJOR_VERSION = '0' _MINOR_VERSION = '4' -_PATCH_VERSION = '1' +_PATCH_VERSION = '2' # When building releases, we can update this value on the release branch to # reflect the current release candidate ('rc0', 'rc1') or, finally, the official diff --git a/tensorflow_ranking/tools/pip_package/setup.py b/tensorflow_ranking/tools/pip_package/setup.py index f844aa5..beda1b1 100644 --- a/tensorflow_ranking/tools/pip_package/setup.py +++ b/tensorflow_ranking/tools/pip_package/setup.py @@ -28,7 +28,7 @@ # This version string is semver compatible, but incompatible with pip. # For pip, we will remove all '-' characters from this string, and use the # result for pip. -_VERSION = '0.4.1' +_VERSION = '0.4.2' REQUIRED_PACKAGES = [ 'absl-py >= 0.1.6', 'numpy >= 1.13.3', 'six >= 1.10.0',