Rest API - Set CPU count

Need help setting the CPU parameters when calling the Pollination API. Any documentation on this topic?

I imagine there is a method to do this somewhere? Seeing an example would be very helpful.

Some context from my script:

if __name__ == '__main__':
    project = Payload.Create(
        description='A test project',
    res: Any = create_project(client, project)
    recipe_filter: Payload.RecipeFilter = Payload.RecipeFilter(
    # ...
    job: Payload.Job = Payload.Job(source=recipe_source_url, arguments=arguments)
    res: Any = client.create_job(, job)
    # ...

Hi @jriise,

Here is a code sample that shows how to submit a study to Pollination using the API:

The daylighting recipes have an input for cpu_count that can be used to set the number of CPUs for the run. See these lines in the code.

recipe_inputs = {
    'model': None,
    'model_id': None,
    'min-sensor-count': 1000,
    'cpu-count': 20 # you can set the number of CPUs here

Let me know if you have any other questions.

1 Like