Starting Job Runs

You use job runs to apply your various use cases to the jobs you've created.

While job creation sets the infrastructure and the actual use case artifact, the job run actually runs the job with the specified parameters. Job runs provision the specified infrastructure, run the job artifact, and deprovision then destroy the used resources when the job ends.

Using the Console

  1. Log into your tenancy using the Console with the necessary policies.
  2. Open the navigation menu and click Analytics & AI. Under Machine Learning, click Data Science.
  3. Select the compartment that contains the project you want to use.
  4. Click the name of a project.
  5. Click Jobs.
  6. Select a job to work with.
  7. Click start a job run.
  8. (Optional) Select a different compartment for the job.
  9. (Optional) Enter a unique name for the job run (limit of 255 characters). If you don't provide a name, a name is automatically generated for you.

    For example:

    jobrun20210808222435
  10. (Optional) To use logging, click Select, and then ensure that Enable logging is selected.
    1. Select a log group from the list. You can change to a different compartment to specify a log group in a different compartment from the job.
    2. Select one of the following to store all stdout and stderr messages:
      Enable automatic log creation

      Data Science automatically creates a log when the job starts.

      Select a log

      Select a log to use.

  11. (Optional) Click Select to return to the job run creation page.
  12. (Optional) You can override the default job configuration that was defined when the job was created using these options:
    Custom environment variable key

    Environment variables to control the job.

    Value

    Value for your custom environment variable key.

    You can click Additional custom environment variables to specify more variables.

    Command line arguments

    The command line arguments that you want to use for running the job.

    Maximum runtime (in minutes)

    The maximum number of minutes that the job can run. The service cancels the job run if its runtime exceeds the specified value. The maximum runtime is 30 days. We recommend that you configure a maximum runtime on all job runs to prevent runaway job runs.

  13. (Optional) Add tags to easily locate and track the resource by selecting a tag namespace, then entering the key and value. To add more than one tag, click +Additional Tags.

    Tagging describes the various tags that you can use organize and find resources including cost-tracking tags.

  14. Click Start.

Using the CLI

These environment variables control the job.

You can use the OCI CLI to start job runs as in this example:

  1. Start a job run with:
    oci data-science job-run create \
    --display-name <job_run_name> \
    --compartment-id <compartment_ocid> \
    --project-id <project_ocid> \
    --job-id <job_ocid> \
    --configuration-override-details file://<optional_job_run_configuration_override_json_file> \
    --log-configuration-override-details file://<optional_job_run_logging_configuration_override_json_file>
  2. (Optional) Use this job run configuration override JSON file to override the configurations defined on the parent job:
    {
      "jobType": "DEFAULT",
      "maximumRuntimeInMinutes": 240,
      "commandLineArguments" : "test-arg",
      "environmentVariables": {
        "SOME_ENV_KEY": "<some_env_value_override>" 
      }
    }
  3. (Optional) Use this job run logging configuration override JSON file to override the logging configuration defined on the parent job:
    {
      "enableLogging": true,
      "enableAutoLogCreation": true,
      "logGroupId": "<log_group_ocid>"
    }