Skip to content

Commit

Permalink
Fix W&B publication setting (#585)
Browse files Browse the repository at this point in the history
* Add W&B publication setting

* Switch to boolean

* Add wandb setting to the train action

* Run linter

* Change type name

* Make bool values lower case
  • Loading branch information
eu9ene authored May 14, 2024
1 parent 77e95bf commit adb890e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions taskcluster/configs/config.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,9 @@ marian-args:
# https://mozilla.github.io/firefox-translations-training/task-cluster.html#running-up-to-a-specific-step
target-stage: all

# Enable publication to Weights and Biases
wandb-publication: true

taskcluster:
# After the parallel corpora are merged and de-duplicated, the combined file is
# then split into an even number of chunks.
Expand Down
5 changes: 5 additions & 0 deletions taskcluster/translations_taskgraph/actions/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ def validate_pretrained_models(params):
"default": defaults["target-stage"],
"enum": graph_config["valid-stages"],
},
"wandb-publication": {
"type": "boolean",
"description": """Enable publication to Weights and Biases""",
"default": True,
},
"experiment": {
"type": "object",
"default": defaults["experiment"],
Expand Down
2 changes: 1 addition & 1 deletion tracking/translations_parser/cli/taskcluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def get_args() -> argparse.Namespace:
parser.add_argument(
"--wandb-publication",
action="store_true",
help="Trigger publication on Weight & Biases. Disabled by default. Can be set though env variable WANDB_PUBLICATION=true|false",
help="Trigger publication on Weight & Biases. Disabled by default. Can be set though env variable WANDB_PUBLICATION=True|False",
default=os.environ.get("WANDB_PUBLICATION", "false").lower() == "true",
)
parser.add_argument(
Expand Down

0 comments on commit adb890e

Please sign in to comment.