0e49e55d906660e5c9168447c77ebc6d917dda5c,softlearning/samplers/utils.py,,get_sampler_from_variant,#Any#,9

Before Change


    sampler_type = sampler_params["type"]
    // Use getattr instead of import here since otherwise we would
    // have a circular import between remote_sampler and utils.
    SamplerClass = getattr(sys.modules[__package__], sampler_type)
    sampler_args = sampler_params.get("args", ())
    sampler_kwargs = sampler_params.get("kwargs", {})
    sampler = SamplerClass(*sampler_args, **sampler_kwargs)

After Change


        "DummySampler": dummy_sampler.DummySampler,
        "ExtraPolicyInfoSampler": (
            extra_policy_info_sampler.ExtraPolicyInfoSampler),
        "RemoteSampler": remote_sampler.RemoteSampler,
        "Sampler": sampler_base.BaseSampler,
        "SimpleSampler": simple_sampler.SimpleSampler,
    }
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: rail-berkeley/softlearning
Commit Name: 0e49e55d906660e5c9168447c77ebc6d917dda5c
Time: 2018-10-22
Author: hartikainen@berkeley.edu
File Name: softlearning/samplers/utils.py
Class Name:
Method Name: get_sampler_from_variant


Project Name: elbayadm/attn2d
Commit Name: 5b2be870f4008f54ccd145e10d4de24d2db9c1de
Time: 2019-08-01
Author: myleott@fb.com
File Name: fairseq/hub_utils.py
Class Name: Generator
Method Name: __init__