-
Notifications
You must be signed in to change notification settings - Fork 77
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
Auto Generate Architect Documentation #871
Merged
Merged
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
205ea10
🚧 Began work on auto-generating architect
Etesam913 b17f1c3
Merge branch 'auto-generate-blueprint' of https://github.com/facebook…
Etesam913 8403096
📝 Updated deploy action to generate architect
Etesam913 a58678e
♻️ Added two argument overrides for architect
Etesam913 51fc0ed
📝 Updated paragraphs for blueprint & architect
Etesam913 305203a
Merge branch 'main' of https://github.com/facebookresearch/Mephisto i…
Etesam913 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,56 @@ | ||
|
||
|
||
|
||
|
||
# Architects | ||
|
||
## mock | ||
|
||
|
||
|
||
|
||
|dest|type|default|help|choices|required| | ||
| :--- | :--- | :--- | :--- | :--- | :--- | | ||
|server_type|str|node|None|None|False| | ||
|server_source_path|str|???|Optional path to a prepared server directory containing everything needed to run a server of the given type. Overrides server type. |None|False| | ||
|should_run_server|bool|False|Addressible location of the server|None|False| | ||
|port|str|3000|Port to launch the server on|None|False| | ||
|
||
## local | ||
|
||
|
||
|
||
|
||
|dest|type|default|help|choices|required| | ||
| :--- | :--- | :--- | :--- | :--- | :--- | | ||
|server_type|str|node|None|None|False| | ||
|server_source_path|str|???|Optional path to a prepared server directory containing everything needed to run a server of the given type. Overrides server type. |None|False| | ||
|hostname|str|localhost|Addressible location of the server|None|False| | ||
|port|str|3000|Port to launch the server on|None|False| | ||
|
||
## heroku | ||
|
||
|
||
|
||
|
||
|dest|type|default|help|choices|required| | ||
| :--- | :--- | :--- | :--- | :--- | :--- | | ||
|server_type|str|node|None|None|False| | ||
|server_source_path|str|???|Optional path to a prepared server directory containing everything needed to run a server of the given type. Overrides server type. |None|False| | ||
|use_hobby|bool|False|Launch on the Heroku Hobby tier|None|False| | ||
|heroku_team|unknown|???|Heroku team to use for this launch|None|False| | ||
|heroku_app_name|unknown|???|Heroku app name to use for this launch|None|False| | ||
|heroku_config_args|unknown|{}|str:str dict containing all heroku config variables to set for the app|None|False| | ||
|
||
## ec2 | ||
|
||
|
||
|
||
|
||
|dest|type|default|help|choices|required| | ||
| :--- | :--- | :--- | :--- | :--- | :--- | | ||
|server_type|str|node|None|None|False| | ||
|server_source_path|str|???|Optional path to a prepared server directory containing everything needed to run a server of the given type. Overrides server type. |None|False| | ||
|instance_type|str|t2.micro|Instance type to run router|None|False| | ||
|subdomain|str|The task name defined in your task's hydra config|Subdomain name for routing|None|False| | ||
|profile_name|str|???|Profile name for deploying an ec2 instance|None|False| |
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 |
---|---|---|
|
@@ -4,6 +4,8 @@ | |
|
||
# Blueprints | ||
|
||
|
||
The blueprint determines the task content. | ||
## parlai chat | ||
|
||
|
||
|
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
27 changes: 27 additions & 0 deletions
27
mephisto/scripts/local_db/gh_actions/auto_generate_architect.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,27 @@ | ||
from mdutils.mdutils import MdUtils | ||
from mephisto.client.cli_commands import get_wut_arguments | ||
from mephisto.operations.registry import get_valid_architect_types | ||
from mephisto.scripts.local_db.gh_actions.auto_generate_blueprint import ( | ||
create_blueprint_info, | ||
) | ||
|
||
|
||
def main(): | ||
architect_file = MdUtils( | ||
file_name="../../../../docs/web/docs/reference/architects.md", | ||
) | ||
architect_file.new_header(level=1, title="Architects") | ||
valid_architect_types = get_valid_architect_types() | ||
for architect_type in valid_architect_types: | ||
architect_file.new_header(level=2, title=architect_type.replace("_", " ")) | ||
args = get_wut_arguments( | ||
("architect={architect_name}".format(architect_name=architect_type),) | ||
) | ||
arg_dict = args[0] | ||
create_blueprint_info(architect_file, arg_dict) | ||
|
||
architect_file.create_md_file() | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
https://mephisto.ai/docs/explanations/architecture_overview/#blueprints
Maybe opportunity to align and keep definitions consistent here?
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.
Yeah, I'll do that. I was just copying the output when you run
mephisto wut