28ab797cf51f35222d1ac0e8a4ca8a5f153a9326,rllib/models/catalog.py,ModelCatalog,get_model_v2,#Any#Any#Any#Any#Any#Any#Any#Any#,271
Before Change
// fallback to a default v1 model
if v2_class is None:
if tf.executing_eagerly():
raise ValueError(
"Eager execution requires a TFModelV2 model to be "
"used, however there is no default V2 model for this "
"observation space: {}, use_lstm={}".format(
obs_space, model_config.get("use_lstm")))
v2_class = make_v1_wrapper(ModelCatalog.get_model)
// Wrap in the requested interface.
wrapper = ModelCatalog._wrap_if_needed(v2_class, model_interface)
return wrapper(obs_space, action_space, num_outputs, model_config,
name, **model_kwargs)
After Change
v2_class = default_model or ModelCatalog._get_v2_model_class(
obs_space, model_config, framework=framework)
if not v2_class:
raise ValueError("ModelV2 class could not be determined!")
if model_config.get("use_lstm"):
wrapped_cls = v2_class
forward = wrapped_cls.forward
v2_class = ModelCatalog._wrap_if_needed(
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances Project Name: ray-project/ray
Commit Name: 28ab797cf51f35222d1ac0e8a4ca8a5f153a9326
Time: 2020-09-06
Author: sven@anyscale.io
File Name: rllib/models/catalog.py
Class Name: ModelCatalog
Method Name: get_model_v2
Project Name: GPflow/GPflow
Commit Name: baf110d82f60c51a5680e728cd3c5c6d3536117d
Time: 2017-09-24
Author: art.art.v@gmail.com
File Name: gpflow/params.py
Class Name: ParamList
Method Name: __init__
Project Name: tryolabs/luminoth
Commit Name: fbcbb710c465da13ed6705fb8d904fe2795b246a
Time: 2018-02-08
Author: agustin@tryolabs.com
File Name: luminoth/models/base/truncated_base_network.py
Class Name: TruncatedBaseNetwork
Method Name: get_trainable_vars