7fee961e6b0d8b90d118ca73ffdf81bd1f51a152,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: 7fee961e6b0d8b90d118ca73ffdf81bd1f51a152
Time: 2018-07-31
Author: kristian.hartikainen@gmail.com
File Name: examples/utils.py
Class Name:
Method Name: parse_domain_task


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: sentinel-hub/eo-learn
Commit Name: 01f9d3debc2f1b35a88a2398119809835b4431f0
Time: 2018-12-14
Author: matej.aleksandrov@sinergise.com
File Name: features/eolearn/features/interpolation.py
Class Name: InterpolationTask
Method Name: execute