本文整理汇总了Python中gin.clear_config方法的典型用法代码示例。如果您正苦于以下问题:Python gin.clear_config方法的具体用法?Python gin.clear_config怎么用?Python gin.clear_config使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gin
的用法示例。
在下文中一共展示了gin.clear_config方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setUp
# 需要导入模块: import gin [as 别名]
# 或者: from gin import clear_config [as 别名]
def setUp(self):
super(EvalMetricsTest, self).setUp()
gin.clear_config()
gin_file = os.path.join(
'./',
'rl_reliability_metrics/evaluation',
'eval_metrics_test.gin')
gin.parse_config_file(gin_file)
# fake set of training curves to test analysis
self.test_data_dir = os.path.join(
'./',
'rl_reliability_metrics/evaluation/test_data')
self.run_dirs = [
os.path.join(self.test_data_dir, 'run%d' % i, 'train') for i in range(3)
]
示例2: setUp
# 需要导入模块: import gin [as 别名]
# 或者: from gin import clear_config [as 别名]
def setUp(self):
super(DataLoadingTest, self).setUp()
gin.clear_config()
gin_file = os.path.join(
'./',
'rl_reliability_metrics/evaluation',
'eval_metrics_test.gin')
gin.parse_config_file(gin_file)
# fake set of training curves to test analysis
test_data_dir = os.path.join(
'./',
'rl_reliability_metrics/evaluation/test_data')
self.run_dirs = [
os.path.join(test_data_dir, 'run%d' % i, 'train') for i in range(3)
]
示例3: setUp
# 需要导入模块: import gin [as 别名]
# 或者: from gin import clear_config [as 别名]
def setUp(self):
gin.clear_config()
示例4: setUp
# 需要导入模块: import gin [as 别名]
# 或者: from gin import clear_config [as 别名]
def setUp(self):
super().setUp()
gin.clear_config()
示例5: test_get_t5_preprocessor_by_name
# 需要导入模块: import gin [as 别名]
# 或者: from gin import clear_config [as 别名]
def test_get_t5_preprocessor_by_name(self):
gin.clear_config()
gin.parse_config("""
get_t5_preprocessor_by_name.name = 'rekey'
get_t5_preprocessor_by_name.fn_kwargs = {'key_map': {'inputs': 'other', 'targets': 'text'}}
""")
prep_rekey = tf_inputs.get_t5_preprocessor_by_name()
og_dataset = tf.data.Dataset.from_tensors({
'text': 'That is good.', 'other': 'That is bad.'})
training = True
dataset = prep_rekey(og_dataset, training)
t5_test_utils.assert_dataset(
dataset,
{'inputs': 'That is bad.', 'targets': 'That is good.'})
示例6: setUp
# 需要导入模块: import gin [as 别名]
# 或者: from gin import clear_config [as 别名]
def setUp(self):
super().setUp()
gin.clear_config()
gin.add_config_file_search_path(_CONFIG_DIR)
示例7: setUp
# 需要导入模块: import gin [as 别名]
# 或者: from gin import clear_config [as 别名]
def setUp(self):
super(RunnerLibTest, self).setUp()
gin.clear_config()
示例8: tearDown
# 需要导入模块: import gin [as 别名]
# 或者: from gin import clear_config [as 别名]
def tearDown(self):
gin.clear_config()
super(TrainEvalTest, self).tearDown()
示例9: setUp
# 需要导入模块: import gin [as 别名]
# 或者: from gin import clear_config [as 别名]
def setUp(self):
super(ExportedSavedmodelPredictorTest, self).setUp()
gin.clear_config()
gin.parse_config('tf.estimator.RunConfig.save_checkpoints_steps=1')
示例10: setUp
# 需要导入模块: import gin [as 别名]
# 或者: from gin import clear_config [as 别名]
def setUp(self):
super(CheckpointPredictorTest, self).setUp()
gin.clear_config()
gin.parse_config('tf.estimator.RunConfig.save_checkpoints_steps=1')
示例11: tearDown
# 需要导入模块: import gin [as 别名]
# 或者: from gin import clear_config [as 别名]
def tearDown(self):
gin.clear_config()
super(SuitePybulletTest, self).tearDown()
示例12: tearDown
# 需要导入模块: import gin [as 别名]
# 或者: from gin import clear_config [as 别名]
def tearDown(self):
gin.clear_config()
super(SuiteGymTest, self).tearDown()
示例13: tearDown
# 需要导入模块: import gin [as 别名]
# 或者: from gin import clear_config [as 别名]
def tearDown(self):
gin.clear_config()
super(SuiteMujocoTest, self).tearDown()
示例14: tearDown
# 需要导入模块: import gin [as 别名]
# 或者: from gin import clear_config [as 别名]
def tearDown(self):
gin.clear_config()
super(SuiteBsuiteTest, self).tearDown()
示例15: setUp
# 需要导入模块: import gin [as 别名]
# 或者: from gin import clear_config [as 别名]
def setUp(self):
super(TestCase, self).setUp()
tf.compat.v1.enable_resource_variables()
# Guard against tests calling gin.parse_config() without calling
# gin.clear_config(), which can cause nasty bugs that show up in a
# completely different test. See b/139088071 for example.
gin.clear_config()