Skip to content

Commit

Permalink
Reduce worker number
Browse files Browse the repository at this point in the history
  • Loading branch information
YuanTingHsieh committed May 22, 2024
1 parent 4ba289c commit edf6d14
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
5 changes: 4 additions & 1 deletion nvflare/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,7 @@

# https://github.com/microsoft/pylance-release/issues/856

from nvflare.private.fed.app.simulator.simulator_runner import SimulatorRunner as SimulatorRunner
from nvflare.app_common.executors.script_executor import ScriptExecutor
from nvflare.app_common.workflows.fedavg import FedAvg
from nvflare.job_config.fed_job import FedJob, FilterType
from nvflare.private.fed.app.simulator.simulator_runner import SimulatorRunner
2 changes: 1 addition & 1 deletion nvflare/job_config/fed_job_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
from tempfile import TemporaryDirectory
from typing import Dict

from nvflare import SimulatorRunner
from nvflare.fuel.utils.class_utils import get_component_init_parameters
from nvflare.job_config.fed_app_config import FedAppConfig
from nvflare.private.fed.app.fl_conf import FL_PACKAGES
from nvflare.private.fed.app.simulator.simulator_runner import SimulatorRunner

CONFIG = "config"
CUSTOM = "custom"
Expand Down
4 changes: 2 additions & 2 deletions runtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ do
;;

-u |--unit*)
cmd_prefix="python3 -m pytest --numprocesses=auto -v "
cmd_prefix="python3 -m pytest --numprocesses=8 -v "

echo "coverage_report=" ${coverage_report}
if [ "${coverage_report}" == true ]; then
Expand Down Expand Up @@ -304,7 +304,7 @@ if [[ -z $cmd ]]; then
cmd="check_license;
check_style_type_import "${DIR_TO_CHECK[@]}";
fix_style_import "${DIR_TO_CHECK[@]}";
python3 -m pytest --numprocesses=auto -v --cov=nvflare --cov-report html:cov_html --cov-report xml:cov.xml --junitxml=unit_test.xml --dist loadgroup tests/unit_test;
python3 -m pytest --numprocesses=8 -v --cov=nvflare --cov-report html:cov_html --cov-report xml:cov.xml --junitxml=unit_test.xml --dist loadgroup tests/unit_test;
"
else
cmd="$cmd $target"
Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ test_support =
flake8==5.0.4
black==22.10.0
click==8.1.3
pytest-xdist==3.0.2
pytest-cov==4.0.0
pytest-xdist==3.6.1
pytest-cov==5.0.0
pandas>=1.5.1

test =
Expand Down

0 comments on commit edf6d14

Please sign in to comment.