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

Ways to reset blocked workers for onboarding qualification? #748

Closed
evelynkyl opened this issue Apr 4, 2022 · 4 comments
Closed

Ways to reset blocked workers for onboarding qualification? #748

evelynkyl opened this issue Apr 4, 2022 · 4 comments

Comments

@evelynkyl
Copy link

Hi!
I'm trying to reset the existing onboarding qualification data and let the blocked worker (me..) redo the qualification. I've tried removing block_qualification in example.yaml but it didn't work. I've also tried adding the below code to get the current worker id and unblock myself in the init of PerTurnEvalWorld, but that didn't do anything either.

if agent.mephisto_agent.get_worker().is_disqualified(self.block_qualification):
    logging.info("This worker is disqualified!")
    agent.mephisto_agent.get_worker().grant_qualification(
        self.block_qualification, 1
    )
    logging.info("Permission granted.")

Are there any ways to unblock myself? Do I have to modify ModelChatOnboardWorld? Or is there a easy way to wipe existing data so that system can't get the list of blocked workers?

Thanks so much in advance!

@JackUrb
Copy link
Contributor

JackUrb commented Apr 5, 2022

Hi @evelynkyl, sorry that this flow isn't fully clear. In testing with a LocalArchitect and MockProvider we tend to just change the worker_id url param as described in our tutorial as it's easier than having to pull yourself out of the db and revoke the block qualification.

That being said, you were close to removing the qualification - we key blocking qualifications on the existence of a qualification however, so you'll need to remove it with revoke_qualification:

def revoke_qualification(self, qualification_name) -> bool:

@evelynkyl
Copy link
Author

evelynkyl commented Apr 5, 2022

Thanks so much for the fast response @JackUrb! I wasn't aware of the changing worker_id approach. I used this method and it's working for me now!

Oddly enough, I was actually qualified, but because the validate_onboarding function in world.py in pairwise_per_turn_eval was returning None, it disqualified me.

I removed submitted_data from the below code since data was not in the status_message and it's been fixed:
https://github.com/facebookresearch/ParlAI/blob/5f3fea75d7df55f24e8f0bf14d2b6d15351b005d/parlai/crowdsourcing/tasks/pairwise_per_turn_eval/worlds.py#L509-L524

Thanks again for the help!

@JackUrb
Copy link
Contributor

JackUrb commented Apr 7, 2022

I removed submitted_data from the below code since data was not in the status_message and it's been fixed:
https://github.com/facebookresearch/ParlAI/blob/5f3fea75d7df55f24e8f0bf14d2b6d15351b005d/parlai/crowdsourcing/tasks/pairwise_per_turn_eval/worlds.py#L509-L524

If this resolved the issue for you, any chance you can submit a PR over there with this fix? I'd be happy to accept

@evelynkyl
Copy link
Author

Happy to! Just submitted one, please see above :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants