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:

  1. Registers (or updates) the model on the pd4castr platform.
  2. Builds and pushes the Docker image to the private container registry.
  3. Uploads any static input files.
  4. 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:

  1. The CLI displays a summary of your model configuration and prompts for confirmation.
  2. Unless you pass --skip-checks, the CLI validates your input files and runs pd4castr test internally to verify the model IO contract.
  3. The CLI creates your model on the platform with your full .pd4castrrc.json configuration.
  4. A new model group is created and the revision starts at r0.
  5. The CLI pushes your model’s Docker image to a private container registry scoped to your organisation.
  6. If your model has static inputs, the CLI uploads them to the platform.
  7. Unless you pass --skip-trigger, the CLI triggers the first model run.

Updating an Existing Model

When your model has already been published, the publish flow will prompt you to choose between two options:

  • New revision (r0 to r1, r1 to r2, 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. Historical data is preserved but no guarantees are made about accuracy or completeness of data 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.

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-interactive

When 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-revision

The 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:

FlagDefaultDescription
-c, --config.pd4castrrc.jsonPath to the config file.
-i, --input-dirtest_inputDirectory containing input files.
-p, --port9800Port for the IO testing web server.
--skip-checks (--sc)falseSkip IO validation.
--skip-trigger (--st)falseSkip triggering a model run after publish.
--non-interactivefalseSkip all confirmation prompts.
--publish-actionAction 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 AUTOMATIC run 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