Running a Request

From python on client side

rail_pz_service.client.request.PZRailRequestClient.run(self, row_id)

Run a request

Parameters:
  • request_id – Id of the request in the Request table

  • row_id (int)

Returns:

Request in question

Return type:

Request

Example

client = RZRailClient()

new_request = client.request.create(
    dataset_name='my_com_cam_dataset',
    estimator_name='my_gpz_com_cam_estimaor',
)
updated_request = client.request.run(
    new_request.id,
)

From client CLI

pz-rail-service-client request run

Get the data_dict parameters for a partiuclar node

pz-rail-service-client request run [OPTIONS]

Options

--row-id <row_id>

ID of object in database table

-o, --output <output>

Output format. Summary table if not specified.

Options:

yaml | json

From python on server side

async rail_pz_service.db.Cache.run_request(self, session, request_id)

Run a request

Parameters:
  • session (async_scoped_session) – DB session manager

  • request_id (int) – Id of the request in the Request table

Returns:

Request in question

Return type:

Request

Example

from structlog import get_logger
logger = get_logger(__name__)
cache  = pz_rail_service.db.Cache.shared_cache(logger)
new_request = await cache.create_request(
    session,
    dataset_name='my_com_cam_dataset',
    estimator_name='my_gpz_com_cam_estimaor',
)
await cache.run_request(
    session,
    new_request.id,
)

From server CLI

pz-rail-service-admin request run

Run a particular request

pz-rail-service-admin request run [OPTIONS]

Options

--row-id <row_id>

ID of object in database table

-o, --output <output>

Output format. Summary table if not specified.

Options:

yaml | json