diff --git a/.github/workflows/simple.yml b/.github/workflows/simple.yml index 18fd4d1c648e655c5db18d35892cbbfd33aedb00..9398933541935845608281877c5a37f610ab151c 100644 --- a/.github/workflows/simple.yml +++ b/.github/workflows/simple.yml @@ -27,6 +27,7 @@ jobs: if: github.ref == 'refs/heads/master' || (github.event.pull_request.draft == false && contains(github.event.pull_request.requested_reviewers.*.login, 'oneflow-ci-bot')) runs-on: ${{ matrix.os }} needs: [cancel_previous] + timeout-minutes: 120 strategy: fail-fast: false max-parallel: 3 diff --git a/tools/conver_single_client_name_space.py b/tools/conver_single_client_name_space.py index 8770a7bd1012476b16001ce2e3c27cd127895f9d..9755c913e865228e037e3ed34d75ed2788a98113 100644 --- a/tools/conver_single_client_name_space.py +++ b/tools/conver_single_client_name_space.py @@ -23,7 +23,8 @@ def convert_name_sapce(python_file): ) -with multiprocessing.Pool(processes=multiprocessing.cpu_count()) as pool: - pool.map(convert_name_sapce, single_client_python_files) - pool.close() - pool.join() +if __name__ == "__main__": + with multiprocessing.Pool(processes=multiprocessing.cpu_count()) as pool: + pool.map(convert_name_sapce, single_client_python_files) + pool.close() + pool.join()