Step 4: Run the session

The next step is to join the session with the sample data. This example has data for two silos, which means to run this example, you will run through the process of joining a session twice to connect each silo to the session.

  1. Join the first silo.

    1. Run this command in your terminal

      export SILO_NAME=silo1

    2. Run this command in your terminal. Reference the data path for where you downloaded synthetic.tar.gz and use that for <data-path>.

      1. docker run -it -d --name $SILO_NAME -v <data_path>:/root/demo 919740802015.dkr.ecr.ca-central-1.amazonaws.com/edge/fl-client:0.2.35 
        docker exec -it $SILO_NAME /bin/bash

    3. Run the hfl train command.

      1. Generate a JSON Web Token to use for authentication while interacting with the integrate.ai Federated Learning client. Find “Tokens” under "Client Management" in the navigation bar.

      2. Get the <session-id> from the integrate.ai UI.

      3. Use the file path for test.parquet as the <test_path> and train_silo0.parquet for the <train_path>

        1. Run this command:

          cd /root/demo 
          export TOKEN= <token>
          hfl train --token $TOKEN --session-id <session_id> --train-path <train_path> --test-path <test_path> --batch-size 10

  2. Join the second silo.

    1. Run this command in your terminal

      export SILO_NAME=silo2

    2. Run this command in your terminal. Reference the data path for where you downloaded synthetic.tar.gz and use that for <data-path>.

      1. docker run -it -d --name $SILO_NAME -v <data_path>:/root/demo 919740802015.dkr.ecr.ca-central-1.amazonaws.com/edge/fl-client:0.2.29
        docker exec -it $SILO_NAME /bin/bash
    3. Run the hfl train command.

      1. Generate a JSON Web Token to use for authentication while interacting with the integrate.ai Federated Learning client. Find “Tokens” under "Client Management" in the navigation bar.

      2. Get the <session-id> from the integrate.ai UI.

      3. Use the file path for test.parquet as the <test_path> and train_silo1.parquet for the <train_path>

        1. Run this command:

          cd /root/demo 
          export TOKEN= <token>
          hfl train --token $TOKEN --session-id <session_id> --train-path <train_path> --test-path <test_path> --batch-size 10

Last updated