f632bc3e2fc323161972306acdac8a59dade337a,examples/utils.py,,parse_domain_task,#Any#Any#,47

Before Change



    env_name = env_name.replace(domain, "").strip("-")
    tasks = TASKS_BY_DOMAIN_BY_UNIVERSE[universe][domain]
    task = next((task for task in tasks if task in env_name), DEFAULT_TASK)

    return domain, task

After Change



    if task is None:
        matching_tasks = [task for task in tasks if task in env_name]
        if len(matching_tasks) > 1:
            raise ValueError(
                "Task name cannot be unmbiguously determined: {}."
                " Following task names match: {}"
                "".format(env_name, matching_tasks))
        elif len(matching_tasks) == 1:
            task = matching_tasks[-1]
        else:
            task = DEFAULT_TASK

    return domain, task


def parse_universe_domain_task(args):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: rail-berkeley/softlearning
Commit Name: f632bc3e2fc323161972306acdac8a59dade337a
Time: 2018-08-10
Author: kristian.hartikainen@gmail.com
File Name: examples/utils.py
Class Name:
Method Name: parse_domain_task


Project Name: rail-berkeley/softlearning
Commit Name: 7fee961e6b0d8b90d118ca73ffdf81bd1f51a152
Time: 2018-07-31
Author: kristian.hartikainen@gmail.com
File Name: examples/utils.py
Class Name:
Method Name: parse_domain_task


Project Name: snipsco/snips-nlu
Commit Name: be5b7adef5a75a8db9af53c641cf6e2233fb2832
Time: 2017-04-12
Author: clement.doumouro@snips.ai
File Name: snips_nlu/slot_filler/data_augmentation.py
Class Name:
Method Name: get_noise_iterator