-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fetching initial peers from env variables #12
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,9 +1,14 @@ | ||||||||||||||||||||
import os | ||||||||||||||||||||
from petals.constants import PUBLIC_INITIAL_PEERS | ||||||||||||||||||||
|
||||||||||||||||||||
from data_structures import ModelInfo | ||||||||||||||||||||
|
||||||||||||||||||||
|
||||||||||||||||||||
INITIAL_PEERS = PUBLIC_INITIAL_PEERS | ||||||||||||||||||||
initial_peers_str = os.getenv("INITIAL_PEERS") | ||||||||||||||||||||
initial_peers_list = initial_peers_str.split(",") if initial_peers_str else [] | ||||||||||||||||||||
if len(initial_peers_list) > 0: | ||||||||||||||||||||
INITIAL_PEERS = initial_peers_list | ||||||||||||||||||||
else: | ||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggest moving |
||||||||||||||||||||
INITIAL_PEERS = PUBLIC_INITIAL_PEERS | ||||||||||||||||||||
Comment on lines
+6
to
+11
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not super familiar with python, but redefining a constant like that seems unexpected |
||||||||||||||||||||
|
||||||||||||||||||||
MODELS = [ | ||||||||||||||||||||
ModelInfo( | ||||||||||||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,4 @@ services: | |
volumes: | ||
- .:/usr/src/app | ||
ports: | ||
- "5000:5000" | ||
- "5000:5000" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's keep the diff minimal and revert this change :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.