| 325 | |
| 326 | # Mimics the other tester's determination of working directory |
| 327 | def _get_work_dir(test_file: str) -> str: |
| 328 | test_fname = os.path.realpath(test_file) |
| 329 | # Create test name by removing '.py' from file name |
| 330 | test_fname = os.path.splitext(os.path.basename(test_fname))[0] |
| 331 | if not re.match('^test_.', test_fname): |
| 332 | # Make sure test name is prefixed with 'test_' |
| 333 | test_fname = 'test_' + test_fname |
| 334 | return os.path.join(os.path.dirname(test_file), 'experiments', test_fname) |
| 335 | |
| 336 | |
| 337 | # Ensures that backpropagation would be run through the entire model |