Skip to content
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

Add info on link_task_source to docs #885

Merged
merged 6 commits into from
Aug 10, 2022
Merged

Conversation

Etesam913
Copy link
Contributor

@Etesam913 Etesam913 commented Aug 8, 2022

Overview

For local development using the link_task_source property can significantly improve productivity. However, on the docs, there is not much information available on it.

When searching "link_task_source" on the docs I only get two results, which both come from the blueprint table.

search-results

Ideally there should be some info on this property in the tutorial.

Changes:

  • Updated tutorial to include information on link_task_source
  • Added a logging message that prints to the console if you have link_task_source set to false.

Updated documentation section in "working on a custom task" page

launching_the_task

Logging message that shows when link_task_source is set to false

link_task_source_logging

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 8, 2022
@Etesam913 Etesam913 changed the title Improve link_task_source docs Add info on link_task_source to docs Aug 8, 2022
):
logger.info(
"If you want your server to update on reload whenever you make changes to your webapp, then make sure to set \n\nlink_task_source: true\n\nin your task's hydra configuration and run \n\ncd webapp && npm run dev:watch\n\nin a separate terminal window. For more information check out:\nhttps://mephisto.ai/docs/guides/tutorials/custom_react/#12-launching-the-task"
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the rationale for putting the checking code here as opposed to somewhere else? Not challenging, just curious. Is there any other place this could be placed up the function call stack?

I find that adding a new param to the function just for this functionality to be a bit of a code smell, though I'm willing to be talked out of it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to be messing up the python build test so I will probably have to find a new place to put it.

I put it there so that I could get access to the run_config variables. I need to check if link_task is set to false before showing anything.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

e.g. why not put it in launch_task_run_or_die?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto to @pringshia's concern here. While I'm a big fan of raising visibility on this, I think the best place to put this warning is actually inside of the assert_task_args method for the StaticReactBlueprint. (If the architect is in the allowed architects and link_task_source is false, let people know).

Copy link
Contributor Author

@Etesam913 Etesam913 Aug 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this seems like a way better solution. This will also most likely prevent the tests from failing.

🎨 Added a little bit of color to the logging message
Copy link
Contributor

@JackUrb JackUrb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Etesam913 Etesam913 merged commit f8bf7b1 into main Aug 10, 2022
Sprint #15 - Affectionate Moose (Aug 15) automation moved this from In progress to Done Aug 10, 2022
@JackUrb JackUrb deleted the improve-link_task_source-docs branch September 14, 2023 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Development

Successfully merging this pull request may close these issues.

None yet

4 participants