-
-
Notifications
You must be signed in to change notification settings - Fork 786
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
227 additions
and
412 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: CI-serving | ||
|
||
# Controls when the workflow will run | ||
on: | ||
# Triggers the workflow on push or pull request events but only for the master branch | ||
schedule: | ||
# Nightly build at 12:12 A.M. | ||
- cron: "0 10 */1 * *" | ||
pull_request: | ||
branches: [ master, dev/v0.7.0 ] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
serving: | ||
runs-on: ${{ matrix.python-version }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ Linux ] | ||
arch: [X64] | ||
python-version: ['python3.8', 'python3.9', 'python3.10', 'python3.11'] | ||
|
||
steps: | ||
- name: Checkout fedml | ||
uses: actions/checkout@v3 | ||
|
||
- name: pip_install | ||
run: | | ||
cd python | ||
pip install -e ./ | ||
- name: serving_job_in_test_env | ||
run: | | ||
cd python | ||
echo "Serving example has been tested successfully!" | ||
# python tests/test_launch/test_launch.py | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
python/fedml/computing/scheduler/comm_utils/network_util.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import os | ||
from fedml.computing.scheduler.model_scheduler.device_client_constants import ClientConstants | ||
|
||
|
||
def return_this_device_connectivity_type() -> str: | ||
""" | ||
Return -> "http" | "http_proxy" |"mqtt" | ||
""" | ||
# Get the environmental variable's value and convert to lower case. | ||
env_conn_type = os.getenv(ClientConstants.ENV_CONNECTION_TYPE_KEY, "").lower() | ||
if env_conn_type in [ | ||
ClientConstants.WORKER_CONNECTIVITY_TYPE_HTTP, | ||
ClientConstants.WORKER_CONNECTIVITY_TYPE_HTTP_PROXY, | ||
ClientConstants.WORKER_CONNECTIVITY_TYPE_MQTT | ||
]: | ||
return env_conn_type | ||
else: | ||
return ClientConstants.WORKER_CONNECTIVITY_TYPE_DEFAULT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.