Skip to content

Commit e99cab8

Browse files
committed
feat: add cron task that runs the minimal training pipeline nightly
1 parent 7d45b3a commit e99cab8

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

.cron.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
jobs:
2+
# Run the minimal pipeline once a day to support integration testing before
3+
# worker image changes are made (see https://bugzilla.mozilla.org/show_bug.cgi?id=1937882).
4+
# These runs will pick up cached tasks, so most of the time this will simply
5+
# end up running `all-pipeline`.
6+
- name: run-pipeline
7+
job:
8+
type: decision-task
9+
# we don't use treeherder...but this is a required field
10+
treeherder-symbol: pipeline
11+
target-tasks-method: train-target-tasks
12+
when:
13+
- {hour: 0, minute: 0}

taskcluster/translations_taskgraph/parameters.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22
# License, v. 2.0. If a copy of the MPL was not distributed with this
33
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
44

5+
import logging
56
from pathlib import Path
67
from taskgraph.parameters import extend_parameters_schema
78
from voluptuous import Extra, Optional, Required
89
import yaml
910

11+
logger = logging.getLogger(__name__)
12+
1013

1114
# By default, provide a very minimal config for CI that runs very quickly. This allows
1215
# the pipeline to be validated in CI. The production training configs should override
@@ -104,3 +107,13 @@ def deep_setdefault(dict_, defaults):
104107
def get_decision_parameters(graph_config, parameters):
105108
parameters.setdefault("training_config", {})
106109
deep_setdefault(parameters, get_ci_training_config())
110+
# We run the pipeline on a cron schedule to enable integration testing when
111+
# worker images change (see https://bugzilla.mozilla.org/show_bug.cgi?id=1937882).
112+
# These runs should _never_ be sent to W&B to avoid cluttering it up
113+
# with data of no value.
114+
if (
115+
parameters["tasks_for"] == "cron"
116+
and parameters["target_tasks_method"] == "train-target-tasks"
117+
):
118+
logger.info("Overriding wandb-publication to be False for cron pipeline run")
119+
parameters["training_config"]["wandb-publication"] = False

0 commit comments

Comments
 (0)