firefox-translations-training icon indicating copy to clipboard operation
firefox-translations-training copied to clipboard

Add an author field

Open eu9ene opened this issue 9 months ago • 3 comments

We should be able to identify the author of an experiment. Currently, it's always moz-translations-wandb-bot because of the service token we use. Let's find a way to either change this one or use another field.

eu9ene avatar May 08 '24 16:05 eu9ene

@bhearsum I wonder if there's a way to pull a secret based on the author of the task. Then instead of using our service token we could use personal tokens to automatically identify authors in w&B.

Screenshot 2024-05-08 at 9 48 37 AM

eu9ene avatar May 08 '24 16:05 eu9ene

There's no technical reason we can't do that. The secrets are defined in the task definitions: https://github.com/mozilla/firefox-translations-training/blob/c4b0d121985d84ed88aefc966df0ffbb1431a3ed/taskcluster/kinds/train-backwards/kind.yml#L70

The person who triggered the task (whether by opening a PR, making a push, or triggering an action) is available in config.params["owner"] in the transforms. So we could either substitute that into the secret in a transform, or add the secret entirely in a transform.

We'd likely want some way to gracefully handle the secret not existing. That could be checking for existence before adding it to the task definition (and fallback to disabling or a default), or it could be done somewhere in the payload. Eg: if the secret doesn't exist we implicitly disable publication.

bhearsum avatar May 08 '24 17:05 bhearsum

Ok, ideally we should do tricks with tokens because it turned out W&B has some nice filters like "show only my work" based on this Author field and I don't see an API to override that.

eu9ene avatar May 08 '24 17:05 eu9ene

After discussion there will not be multiple tokens.

We can add a new tag on the run, with format author:<owner> where <owner> comes from the run configuration as mentionned by @bhearsum above.

La0 avatar Jun 19 '24 08:06 La0

I'm happy with this solution.

gregtatum avatar Jun 19 '24 19:06 gregtatum