lancium.api.JobInput
JobInput
This is an object that represents job input data.
class
JobInput:
JobInput(id, job_id, **kwargs)
Initialize a JobInput object.
Args:
id (int): unique identifier for JobInput (data-id)job_id (int): associated Job IDname (string): filename in the job working directorysource_type (string): one of these options ('file', 'data', 'url')source (string): source location of the input datacache (bool, optional): if True, the file is copied to the node during execution as READ ONLY upload_complete (bool): boolean representing whether the upload has been completed chunks_received (string): represents the range of chunks received by Lancium Compute
def
upload(self, file_path, callback=None):
Upload input data for a job.
PATCH /jobs/
Args:
- `file_path (string): file path of input file
callback (func): called after each chunk is successfully uploaded, accepts arguments in the format of (file_size, file_start, total_chunks, current_chunk)
Returns: JSON: Response Object in JSON format