adaa8aefa828c8b426e9ecf6e15f5990b3c1abef,baselines/common/tf_util.py,,save_state,#Any#Any#,321

Before Change


    from baselines import logger
    logger.warn("save_state method is deprecated, please use save_variables instead")
    sess = sess or get_session()
    os.makedirs(os.path.dirname(fname), exist_ok=True)
    saver = tf.train.Saver()
    saver.save(tf.get_default_session(), fname)

// The methods above and below are clearly doing the same thing, and in a rather similar way

After Change


    from baselines import logger
    logger.warn("save_state method is deprecated, please use save_variables instead")
    sess = sess or get_session()
    dirname = os.path.dirname(fname)
    if any(dirname):
        os.makedirs(dirname, exist_ok=True)
    saver = tf.train.Saver()
    saver.save(tf.get_default_session(), fname)

// The methods above and below are clearly doing the same thing, and in a rather similar way
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 7

Instances


Project Name: openai/baselines
Commit Name: adaa8aefa828c8b426e9ecf6e15f5990b3c1abef
Time: 2018-09-10
Author: peterzhokhoff@gmail.com
File Name: baselines/common/tf_util.py
Class Name:
Method Name: save_state


Project Name: openai/baselines
Commit Name: 23b2333238e9850a230f0fa3ce95497d4c6c418b
Time: 2018-09-10
Author: peterzhokhoff@gmail.com
File Name: baselines/common/tf_util.py
Class Name:
Method Name: save_state


Project Name: openai/baselines
Commit Name: 23b2333238e9850a230f0fa3ce95497d4c6c418b
Time: 2018-09-10
Author: peterzhokhoff@gmail.com
File Name: baselines/common/tf_util.py
Class Name:
Method Name: save_variables


Project Name: openai/baselines
Commit Name: adaa8aefa828c8b426e9ecf6e15f5990b3c1abef
Time: 2018-09-10
Author: peterzhokhoff@gmail.com
File Name: baselines/common/tf_util.py
Class Name:
Method Name: save_variables


Project Name: openai/baselines
Commit Name: adaa8aefa828c8b426e9ecf6e15f5990b3c1abef
Time: 2018-09-10
Author: peterzhokhoff@gmail.com
File Name: baselines/common/tf_util.py
Class Name:
Method Name: save_state