baa053496a78bbb89279847277e49242f721af0e,rllib/tests/run_regression_tests.py,,,#,27

Before Change


    else:
        yaml_files = sys.argv[1:]

    print("Will run the following regression files:")
    for yaml_file in yaml_files:
        print("->", yaml_file)

    // Loop through all collected files.

After Change


    help="The directory in which to find all yamls to test.")

if __name__ == "__main__":
    args = parser.parse_args()

    // Bazel regression test mode: Get path to look for yaml files from argv[2].
    // Get the path or single file to use.
    rllib_dir = Path(__file__).parent.parent
    print("rllib dir={}".format(rllib_dir))

    if not os.path.isdir(os.path.join(rllib_dir, args.yaml_dir)):
        raise ValueError("yaml-dir ({}) not found!".format(args.yaml_dir))

    yaml_files = rllib_dir.rglob(args.yaml_dir + "/*.yaml")
    yaml_files = sorted(
        map(lambda path: str(path.absolute()), yaml_files), reverse=True)

    print("Will run the following regression tests:")
    for yaml_file in yaml_files:
        print("->", yaml_file)

    // Loop through all collected files.
    for yaml_file in yaml_files:
        experiments = yaml.load(open(yaml_file).read())
        assert len(experiments) == 1,\
            "Error, can only run a single experiment per yaml file!"

        print("== Test config ==")
        print(yaml.dump(experiments))

        // Add torch option to exp configs.
        for exp in experiments.values():
            if args.torch:
                exp["config"]["use_pytorch"] = True

        // Try running each test 3 times and make sure it reaches the given
        // reward.
        passed = False
        for i in range(3):
            try:
                ray.init(num_cpus=5)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: ray-project/ray
Commit Name: baa053496a78bbb89279847277e49242f721af0e
Time: 2020-05-26
Author: sven@anyscale.io
File Name: rllib/tests/run_regression_tests.py
Class Name:
Method Name:


Project Name: NervanaSystems/nlp-architect
Commit Name: 24d3656c6c4b3c6806954487720d53af775a1150
Time: 2018-06-07
Author: shira.guskin@intel.com
File Name: set_expansion_demo/ui/main.py
Class Name:
Method Name: get_phrases


Project Name: ClimbsRocks/auto_ml
Commit Name: b1756fd255d0f921cd30537d55d0dfb2a6c8ad32
Time: 2017-04-17
Author: ClimbsBytes@gmail.com
File Name: auto_ml/utils_models.py
Class Name:
Method Name: load_ml_model