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

Loading custom profiles per user #496

Merged
merged 4 commits into from
Jul 30, 2021
Merged

Loading custom profiles per user #496

merged 4 commits into from
Jul 30, 2021

Conversation

JackUrb
Copy link
Contributor

@JackUrb JackUrb commented Jul 8, 2021

Overview

Following #494, we're now able to do recursive defaults and imports along the search path. This means we can set up profile's which can be used across different tasks.

Usage:

By defining a config in ~/.mephisto/hydra_configs/profile/, you can later invoke all of the configuration from that with just one command. For instance, with ~/.mephisto/hydra_configs/profile/sandbox.yaml as follows:

# @package _global_
defaults:
 - override /mephisto/architect: heroku
 - override /mephisto/provider: mturk_sandbox

mephisto:
  architect:
    _architect_type: heroku
    use_hobby: true
  provider:
    requester_name: MY_REQUESTER_ACCOUNT_sandbox
  log_level: debug

I can run python run_task +profile=sandbox for any task, and pull in the options both for the sandbox requester to use, as well as the heroku-specific argument to launch on the hobby tier. This means one can store profiles for common launch patterns that are shared between tasks.

Testing:

Using the above file, successfully launched a task to sandbox.

@JackUrb JackUrb requested a review from EricMichaelSmith July 8, 2021 21:57
@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 Jul 8, 2021
Copy link
Contributor

@EricMichaelSmith EricMichaelSmith left a comment

Choose a reason for hiding this comment

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

Okay, seems reasonable - so I suppose that this profile setup can also be used to specify live mode with a single arg, instead of doing mephisto.provider.requester_name=${REQUESTER_NAME} mephisto/architect=heroku as currently?

@JackUrb
Copy link
Contributor Author

JackUrb commented Jul 12, 2021

Yup, the basic case will likely just be outlining a requester name and the architect to use, but it can be more specialized for each profile.

Base automatically changed from hydra-1.1 to master July 30, 2021 20:19
@JackUrb JackUrb merged commit f76a722 into master Jul 30, 2021
@JackUrb JackUrb deleted the config-profile-path branch July 30, 2021 21:26
@JackUrb JackUrb added this to the 🚀 Mephisto 1.0 milestone Jan 5, 2022
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants