MAAP-Project / sar2-d2

Apache License 2.0
0 stars 1 forks source link

SAR2-D2: Synthetic Aperture Radar Remote Disturbance Detector

Running the NASA algorithm locally

You can run the NASA algorithm locally like so:

nasa/run.sh CALIBRATION_FILE LEFT BOTTOM RIGHT TOP

where:

As a convenience, this will automatically do the following for you:

  1. Create a conda environment named sar2-d2, if it does not already exist.
  2. Install all dependencies in environment.yml and environment-dev.yml whenever the environment is (re-)created or one (or both) of the files have been modified since the environment was (re-)created.
  3. Run the code with the sar2-d2 environment automatically activated (i.e., there is no need for you to manually activate the environment).

Registering the algorithm

To register the algorithm (or re-register it after making code changes), run the following command:

nasa/algorithm/register.py

This will kick off a process to build a new algorithm image, and will output a link where you can check the progress of this process, which may take several minutes. The new version of the algorithm will not be available for submitting jobs until this process completes successfully. Once the process completes successfully, the new version of the algorithm is considered "registered."

Submitting a job

Once the algorithm is registered (or re-registered), you may submit a job using the following command:

nasa/job/submit.py CALIBRATION_FILE LEFT BOTTOM RIGHT TOP

where the arguments are the same as those used when running the algorithm locally (see above), with the following difference: if CALIBRATION_FILE is not a URL, it will automatically be converted to a URL if its path starts with /projects/my-public-bucket or /projects/shared-bucket/USERNAME (where USERNAME is the username of any MAAP user, not necessarily your username).

If the job was successfully submitted, the command above will print out the job ID of the newly submitted job, which you can use to check the job status.

Checking the status of a job

After successfully submitting a job, you can use the job ID to check its status:

nasa/job/status.py JOB_ID

where JOB_ID is the job ID printed out by the job submission command.

You can also get more information about the job, using the following command:

nasa/job/result.py JOB_ID

If the job has completed, successfully or not, the command will indicate where the results were written. If the job failed, the command should also show an error message, that may or may not be helpful, and may require looking at the triaged job files for more information.