Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }} # ${{ github.event.pull_request.head.sha }}

- name: Setup Python 3.10
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: 'pip'
Expand Down Expand Up @@ -70,13 +70,13 @@ jobs:

steps:
- name: Checkout to latest changes
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ needs.formatting.outputs.new_sha }}
fetch-depth: 0

- name: Set up Python 3.10
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: 'pip'
Expand All @@ -94,13 +94,13 @@ jobs:

steps:
- name: Checkout to latest changes
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ needs.formatting.outputs.new_sha }}
fetch-depth: 0

- name: Set up Python 3.10
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: 'pip'
Expand All @@ -125,13 +125,13 @@ jobs:

steps:
- name: Checkout to latest changes
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ needs.formatting.outputs.new_sha }}
fetch-depth: 0

- name: Set up Python 3.10
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: 'pip'
Expand Down
10 changes: 6 additions & 4 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
################################################################################

############## Dataset type to use
# Possible values: , kaggle_hf, mnist, dt4h_format
# Possible values: , kaggle_hf, diabetes, mnist, dt4h_format
dataset: dt4h_format
#custom
#libsvm
Expand All @@ -33,7 +33,7 @@ train_size: 0.7
# ****** * * * * * * * * * * * * * * * * * * * * *******************

############## Number of clients (data centers) to use for training
num_clients: 1
num_clients: 3

############## Model type
# Possible values: logistic_regression, lsvc, elastic_net, random_forest, weighted_random_forest, xgb
Expand All @@ -43,7 +43,7 @@ model: random_forest
#random_forest

############## Training length
num_rounds: 50
num_rounds: 5

############## Metric to select the best model
# Possible values: accuracy, balanced_accuracy, f1, precision, recall
Expand Down Expand Up @@ -87,6 +87,8 @@ smoothWeights:
linear_models:
n_features: 9

n_features: 9

# Random Forest
random_forest:
balanced_rf: true
Expand All @@ -101,7 +103,7 @@ xgb:
batch_size: 32
num_iterations: 100
task_type: BINARY
tree_num: 500
tree_num: 10


held_out_center_id: -1
Expand Down
2 changes: 1 addition & 1 deletion flcore/client_selector.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def get_model_client(config, data, client_id):
if model in ("logistic_regression", "elastic_net", "lsvc"):
client = linear_models.client.get_client(config,data,client_id)

elif model == "random_forest":
elif model in ("random_forest", "balanced_random_forest"):
client = random_forest.client.get_client(config,data,client_id)

elif model == "weighted_random_forest":
Expand Down
Loading
Loading