Publishing
The pd4castr publish command is the final step in the authoring workflow. It
registers your model with the pd4castr platform, builds and pushes your Docker
image to the private registry, uploads static input files, and triggers a model
run.
What Publish Does
At a high level, the publish command performs these steps:
- Registers (or updates) the model on the pd4castr platform.
- Builds and pushes the Docker image to the private container registry.
- Uploads every configured input file. Each top-level
fileand eachfileentry of an input’ssourcesgets its own upload. - Triggers a model run.
The exact flow depends on whether you’re publishing for the first time or updating an existing model.
First-Time Publish
The publish flow for a new model:
- The CLI displays a summary of your model configuration and prompts for confirmation.
- The CLI validates your input files and runs
pd4castr testinternally to verify the model IO contract. When an input, or an input’s default source, uses a data fetcher, runpd4castr fetchbefore you publish. Validation fails until the fetched file is intest_input/. - The CLI creates your model on the platform with your full
.pd4castrrc.jsonconfiguration. - A new model group is created and the revision starts at
r0. - The CLI pushes your model’s Docker image to a private container registry scoped to your organisation.
- If your model has configured input files, the CLI uploads them to the
platform. Each top-level
fileand eachfileentry of an input’ssourcesgets its own upload. - Unless you pass
--skip-trigger, the CLI triggers the first model run. On a model with a source-binding axis, it triggers the default source.
If an upload fails partway through step 6, the CLI lists what it already
uploaded in that run and asks you to re-run pd4castr publish, which uploads
every input again from the start.
Updating an Existing Model
When your model has already been published, the publish flow will prompt you to choose between two options:
- New revision (
r0tor1,r1tor2, and so on) — Creates a new model entry in the same model group with an incremented revision number. Previous revisions remain available in the pd4castr UI. - Update existing revision — Updates the current revision in place. See What an in-place update does to existing runs for what this means for runs you’ve already seen in the pd4castr UI.
After choosing an option, the flow continues with the same build, push, upload, and trigger steps as a first-time publish.
What an In-Place Update Does to Existing Runs
Updating a revision in place queues a model run the same way any other on-demand trigger does: with the latest file available for each input, not the files a past run used. The queued run’s run datetime is the time it was queued, unless the model’s config sets a run datetime query, in which case the platform recomputes the run datetime from that run’s own prepared input files, before the model container starts.
When the model’s run datetime query derives its value from input data that hasn’t changed since an earlier run, the new run gets that earlier run’s exact run datetime. The pd4castr UI’s run history and latest-run views group runs by run datetime and keep only the most recently created run in each group, so there the newer run displaces the earlier one at that datetime. A plain list of a model’s runs is not deduplicated this way: it returns every run ordered by creation time, so both the earlier run and the newer one sharing its run datetime appear.
Non-Interactive Mode
For non-interactive environments (CI pipelines, scripts, etc.), use
--non-interactive to skip all confirmation prompts. When publishing a new
model (no $$id in the config), no extra flags are needed:
pd4castr publish --config .pd4castrrc.json --non-interactiveWhen publishing an existing model, you must also specify --publish-action to
tell the CLI which path to take:
# update the current revision in place
pd4castr publish --config .pd4castrrc.json --non-interactive --publish-action=update
# create a new revision
pd4castr publish --config .pd4castrrc.json --non-interactive --publish-action=new-revisionThe CLI errors if --publish-action is omitted for an existing model in
non-interactive mode.
Publish Command Flags
The following flags are available for the pd4castr publish command:
| Flag | Default | Description |
|---|---|---|
-c, --config | .pd4castrrc.json | Path to the config file. |
-p, --port | 9800 | Port for the IO testing web server. |
--skip-trigger (--st) | false | Skip triggering a model run after publish. |
--non-interactive | false | Skip all confirmation prompts. |
--publish-action | Action for existing models: update or new-revision. Required with --non-interactive. |
After Publishing
Once your model is live, you can verify and configure it.
- Open the pd4castr UI to see your model’s first run results (if a run was triggered).
- If your model uses
AUTOMATICrun mode, it will now run automatically whenever all required input data arrives. See Run modes and scheduling for details. - Use the Author dashboard to monitor run status and manage your model.
Next Steps
- Learn how your model runs are triggered in Run modes and scheduling.
- Review the Testing your model guide if you need to validate your model before publishing.
- See Model axes for the full reference of source and axes-related publish rejections and warnings.