Skip to content

Conversation

@mwiebe
Copy link
Contributor

@mwiebe mwiebe commented Oct 30, 2025

What was the problem/requirement? (What/Why)

Because a job template is runnable code similar to a script, we can think of openjd run <templatefile> the same as bash <scriptfile>. Part of this is printing help output of the options available.

What was the solution? (How)

This change makes it so openjd run <templatefile> -h prints help that is specific about the template file, displaying the job name, description, and all its parameters. Similarly, if there are missing required parameters, the error message says that and then displays this same help text.

This change was created with the help of Kiro using the Claude Sonnet 4.5 model.

What is the impact of this change?

Before this change:

$ openjd run gsplat_pipeline/template.yaml
ERROR generating Job: Values missing for required job parameters: InputVideoFile, OutputPlyFile

$ openjd run gsplat_pipeline/template.yaml -h
usage: openjd run JOB_TEMPLATE_PATH [arguments]

positional arguments:
  path                  The path to the template file.

options:
  -h, --help            show this help message and exit
  --output {human-readable,json,yaml}
                        How to format the command's output.
...

After this change:

$ openjd run gsplat_pipeline/template.yaml
ERROR generating Job: Values missing for required job parameters: InputVideoFile, OutputPlyFile

usage: openjd run gsplat_pipeline\template.yaml [arguments]

Job: Gaussian Splatting pipeline (FFmpeg -> COLMAP/GLOMAP -> NeRF Studio)
This job runs a pipeline on AWS Deadline Cloud that takes an input video file and trains a Gaussian Splatting
.ply file as output. It uses FFmpeg to extract frames from the video, COLMAP and GLOMAP to solve structure-from-motion,
and NeRF Studio to train the Gaussian Splatting and export it to .ply.

It requires the Deadline Cloud queue have a conda queue environment like
https://github.com/aws-deadline/deadline-cloud-samples/blob/mainline/queue_environments/conda_queue_env_improved_caching.yaml
to provide a conda virtual environment. The conda chnanels should include conda-forge and a
channel with a nerfstudio package. To build your own nerfstudio package, follow
https://docs.aws.amazon.com/deadline-cloud/latest/developerguide/configure-jobs-s3-channel.html
to create an S3 conda channel with a Deadline Cloud queue for building packages, and build the recipe
https://github.com/aws-deadline/deadline-cloud-samples/tree/mainline/conda_recipes/nerfstudio-1.1


Job Parameters (-p/--job-param PARAM_NAME=VALUE):
  InputVideoFile (PATH) [required] (minimum length: 1 characters)
      The video file input of the subject to solve Gaussian Splatting for.
  ApproxImageCount (INT) [default: 100] (minimum: 10)
      An approximate image count to use from the input video. Adjust this based on how long the video is and how fast it moves about the subject.

  ImageDownscaleFactor (FLOAT) [default: 1.0] (minimum: 1.0)
      Scale the image size down by this much when converting from video to images.
  OutputPlyFile (PATH) [required] (minimum length: 1 characters)
      Select the Gaussian Splatting output .ply file.
  GaussianSplattingTrainer (STRING) [default: 'NERFSTUDIO'] (allowed: 'NERFSTUDIO', 'GSPLAT_SIMPLE_TRAINER')
  MaxNumIterations (INT) [default: 30000] (minimum: 1)
      The maximum number of training iterations for Gaussian Splatting.
  NerfStudioOptions (STRING) [default: 'splatfacto --pipeline.model.num-downscales 2']
      Additional command-line options to provide to the NeRF Studio ns-train command.
  Options for the model:
        splatfacto-w-light, splatfacto, splatfacto-big
  Example options to add:
        "--pipeline.model.num-downscales 1" to reduce how many powers of 2 it shrinks the image
        "--save-only-latest-checkpoint False" to save more checkpoint files

  GSplatSimpleTrainerOptions (STRING) [default: 'mcmc --data-factor 4 --strategy.cap-max 1000000 --no-use-bilateral-grid']
      Additional command-line options to provide to the gsplat simple_trainer.py script.
  Options for the model:
        default, mcmc
  Example options to add:
        "--data-factor 1" to keep the full image resolution
        "--use-bilateral-grid" to use the experimental bilateral-grid option
        "--strategy.cap-max 2000000" to increase the max number of splats to 2 million

  WorkspaceDir (PATH) [default: '']
      If provided, this path is used for the pipeline's workspace. If not provided, a temporary directory is used.
  CondaPackages (STRING) [default: 'ffmpeg colmap=*=gpu* glomap nerfstudio']
      Choose which conda packages to install in the environment. Add a queue environment to your Deadline Cloud queue like https://github.com/aws-deadline/deadline-cloud-samples/blob/mainline/queue_environments/conda_queue_env_improved_caching.yaml to provide a conda virtual environment with these packages
for the job.

  JobScriptDir (PATH) [default: 'scripts']
      Directory containing bundled scripts.

Standard Options:
  --output {human-readable,json,yaml}
                        How to format the command's output.
...

$ openjd run gsplat_pipeline/template.yaml -h
usage: openjd run gsplat_pipeline\template.yaml [arguments]

Job: Gaussian Splatting pipeline (FFmpeg -> COLMAP/GLOMAP -> NeRF Studio)
This job runs a pipeline on AWS Deadline Cloud that takes an input video file and trains a Gaussian Splatting
.ply file as output. It uses FFmpeg to extract frames from the video, COLMAP and GLOMAP to solve structure-from-motion,
and NeRF Studio to train the Gaussian Splatting and export it to .ply.

It requires the Deadline Cloud queue have a conda queue environment like
https://github.com/aws-deadline/deadline-cloud-samples/blob/mainline/queue_environments/conda_queue_env_improved_caching.yaml
to provide a conda virtual environment. The conda chnanels should include conda-forge and a
channel with a nerfstudio package. To build your own nerfstudio package, follow
https://docs.aws.amazon.com/deadline-cloud/latest/developerguide/configure-jobs-s3-channel.html
to create an S3 conda channel with a Deadline Cloud queue for building packages, and build the recipe
https://github.com/aws-deadline/deadline-cloud-samples/tree/mainline/conda_recipes/nerfstudio-1.1


Job Parameters (-p/--job-param PARAM_NAME=VALUE):
  InputVideoFile (PATH) [required] (minimum length: 1 characters)
      The video file input of the subject to solve Gaussian Splatting for.
...

How was this change tested?

Added unit tests, tested a bunch of cases manually.

Was this change documented?

It is a change to the help output documentation of the CLI command.

Is this a breaking change?

No

Does this change impact security?

No


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

…eters

Because a job template is runnable code similar to a script, we can
think of `openjd run <templatefile>` the same as `bash <scriptfile>`.
Part of this is printing help output of the options available.

This change makes it so `openjd run <templatefile> -h` prints help that
is specific about the template file, displaying the job name,
description, and all its parameters. Similarly, if there are missing
required parameters, the error message says that and then displays this
same help text.

Signed-off-by: Mark <[email protected]>
@mwiebe mwiebe requested a review from a team as a code owner October 30, 2025 23:05
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
2 Security Hotspots
5.2% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@mwiebe mwiebe merged commit ac751c7 into OpenJobDescription:mainline Nov 4, 2025
19 of 20 checks passed
@mwiebe mwiebe deleted the openjd-run-help branch November 4, 2025 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants