Skip to content

Get results

Fetching results in your code

When you call a function from your code, the results are part of the job object created when calling the function.

You can only get the results when they are ready by using job.results:

while not job.ready:
    sleep(1.)

print(job.results)

Currently, the while loop is necessary to wait for the results. If the job has not been submitted for some reason the job.ready query triggers automatic resubmission.

This could easily become a future (in the sense of concurrent programming) later on. We are also looking for feedback, what would work best for you.

Get results with the CLI

LMRTFY also provides a way to download the results of the computation. All you need is the <job_id> that you received when you submitted the job. Then, you simply run

$ lmrtfy fetch <job_id> <save_path>

The results will be saved in <save_path>/<job_id>/... Each result is currently saved as a JSON file with the following format:

{
    "<var_name>": <value>
}

Each variable has its own file.