decentriq_platform.media.compute_job
Classes
ComputeJob
ComputeJob(
dcr_id: str,
action: decentriq_dcr_compiler._schemas.data_room_compute_action.DataRoomComputeAction,
result_zip_file_name: str,
client: decentriq_platform.client.Client,
)
Abstract base class for compute jobs in a Media DCR.
Initialize a compute job.
Parameters:
dcr_id
: The identifier for the DCRaction
: The compute action to performresult_zip_file_name
: The name of the file in the zip to get the result fromclient
: The client instance for API communication
Ancestors (in MRO)
- abc.ABC Descendants
- decentriq_platform.media.compute_job.MediaAudienceUserListJob
- decentriq_platform.media.compute_job.MediaDataAttributesJob
- decentriq_platform.media.compute_job.MediaEstimateAudienceSizeJob
- decentriq_platform.media.compute_job.MediaGetAudiencesJob
- decentriq_platform.media.compute_job.MediaInsightsJob
- decentriq_platform.media.compute_job.MediaLookalikeAudienceStatisticsJob
- decentriq_platform.media.compute_job.MediaModelQualityReportJob
- decentriq_platform.media.compute_job.MediaOverlapStatisticsJob
- decentriq_platform.media.compute_job.ValidationReportJob
- decentriq_platform.media.compute_job._GetCustomAudiencesJob
- decentriq_platform.media.compute_job._GetSeedAudiencesJob
download_result
def download_result(
self,
task_result_hash: str,
) ‑> io.RawIOBase
Download the result of the compute job.
Parameters:
task_result_hash
: The hash of the task result to download
Returns:
- The result of the compute job
get_result
def get_result(
self,
) ‑> bytes
Get the result of the compute job.
Returns:
- The content of the result file as bytes or raises an exception if the job failed
is_complete
def is_complete(
self,
) ‑> bool
Check if the compute job is complete.
Returns:
- True if the job is complete, False otherwise
result
def result(
self,
) ‑> Any
run
def run(
self,
) ‑> None
Run the compute job.
Raises:
Exception
: If the computation has already been run
wait_for_completion
def wait_for_completion(
self,
timeout: Optional[int] = None,
sleep_interval: int = 1,
) ‑> typing_extensions.Self
Wait for the compute job to complete.
Parameters:
timeout
: The maximum time to wait for the job to complete, in secondssleep_interval
: The interval to wait between checks, in seconds
Returns:
- The compute job
MediaAudienceUserListJob
MediaAudienceUserListJob(
dcr_id: str,
audience: Union[decentriq_platform.media.api.SeedAudience, decentriq_platform.media.api.CustomAudience],
client: decentriq_platform.client.Client,
)
A compute job for retrieving audience user lists from a Media DCR.
Initialize a MediaAudienceUserListJob instance.
Parameters:
dcr_id
: The identifier for the DCRaudience
: The audience to get the user list forclient
: The client instance for API communication
Ancestors (in MRO)
- decentriq_platform.media.compute_job.ComputeJob
- abc.ABC
result
def result(
self,
) ‑> List[str]
Get the result of the MediaAudienceUserListJob.
Returns:
- The result of the MediaAudienceUserListJob
MediaAudiencesValidationReportJob
MediaAudiencesValidationReportJob(
dcr_id: str,
client: decentriq_platform.client.Client,
)
A compute job for retrieving audiences validation reports from a Media DCR.
Initialize a MediaAudiencesValidationReportJob instance.
Parameters:
dcr_id
: The identifier for the DCRclient
: The client instance for API communication
Ancestors (in MRO)
- decentriq_platform.media.compute_job.ValidationReportJob
- decentriq_platform.media.compute_job.ComputeJob
- abc.ABC
result
def result(
self,
) ‑> decentriq_platform.media.api.ValidationReport
Get the result of the MediaAudiencesValidationReportJob.
Returns:
- The result of the MediaAudiencesValidationReportJob
MediaBaseAudienceValidationReportsJob
MediaBaseAudienceValidationReportsJob(
dcr_id: str,
client: decentriq_platform.client.Client,
)
A class to encapsulate the various base audience validation report jobs for a DCR.
This class does not inherit from ComputeJob because it encapsulates multiple jobs rather than being a single job itself.
Initialize a MediaBaseAudienceValidationReportsJob instance.
Parameters:
dcr_id
: The identifier for the DCRclient
: The client instance for API communication
result
def result(
self,
) ‑> decentriq_platform.media.validation_reports.ValidationReports
Get the result of the MediaBaseAudienceValidationReportsJob.
Returns:
- The result of the MediaBaseAudienceValidationReportsJob
run
def run(
self,
) ‑> None
Run all validation jobs.
wait_for_completion
def wait_for_completion(
self,
timeout: Optional[int] = None,
sleep_interval: int = 1,
) ‑> typing_extensions.Self
Wait for the compute job to complete.
Parameters:
timeout
: The maximum time to wait for the job to complete, in secondssleep_interval
: The interval to wait between checks, in seconds
Returns:
- The compute job
MediaDataAttributesJob
MediaDataAttributesJob(
dcr_id: str,
client: decentriq_platform.client.Client,
)
A compute job for retrieving data attributes from a Media DCR.
Initialize a MediaDataAttributesJob instance.
Parameters:
dcr_id
: The identifier for the DCRclient
: The client instance for API communication
Ancestors (in MRO)
- decentriq_platform.media.compute_job.ComputeJob
- abc.ABC
result
def result(
self,
) ‑> decentriq_platform.media.api.DataAttributesResult
Get the result of the MediaDataAttributesJob.
Returns:
- The result of the MediaDataAttributesJob
MediaDemographicsValidationReportJob
MediaDemographicsValidationReportJob(
dcr_id: str,
client: decentriq_platform.client.Client,
)
A compute job for retrieving demographics validation reports from a Media DCR.
Initialize a MediaDemographicsValidationReportJob instance.
Parameters:
dcr_id
: The identifier for the DCRclient
: The client instance for API communication
Ancestors (in MRO)
- decentriq_platform.media.compute_job.ValidationReportJob
- decentriq_platform.media.compute_job.ComputeJob
- abc.ABC
result
def result(
self,
) ‑> decentriq_platform.media.api.ValidationReport
Get the result of the MediaDemographicsValidationReportJob.
Returns:
- The result of the MediaDemographicsValidationReportJob
MediaEstimateAudienceSizeJob
MediaEstimateAudienceSizeJob(
dcr_id: str,
audience: Union[decentriq_platform.media.api.SeedAudience, decentriq_platform.media.api.CustomAudience],
client: decentriq_platform.client.Client,
)
A compute job for estimating audience size in a Media DCR.
Initialize a MediaEstimateAudienceSizeJob instance.
Parameters:
dcr_id
: The identifier for the DCRaudience
: The audience to get the size forclient
: The client instance for API communication
Ancestors (in MRO)
- decentriq_platform.media.compute_job.ComputeJob
- abc.ABC
result
def result(
self,
) ‑> int
Get the result of the MediaEstimateAudienceSizeJob.
Returns:
- The result of the MediaEstimateAudienceSizeJob
MediaGetAudiencesJob
MediaGetAudiencesJob(
dcr_id: str,
user: str,
client: decentriq_platform.client.Client,
participant_id: str,
)
A compute job for retrieving all audiences from a Media DCR.
Initialize a MediaGetAudiencesJob instance.
Parameters:
dcr_id
: The identifier for the DCRuser
: The user to get the audiences forclient
: The client instance for API communication
Ancestors (in MRO)
- decentriq_platform.media.compute_job.ComputeJob
- abc.ABC
result
def result(
self,
) ‑> decentriq_platform.media.audiences.Audiences
Get the result of the MediaGetAudiencesJob.
Returns:
- The result of the MediaGetAudiencesJob
MediaInsightsJob
MediaInsightsJob(
dcr_id: str,
client: decentriq_platform.client.Client,
)
A compute job for retrieving insights from a Media DCR.
Initialize a MediaInsightsJob instance.
Parameters:
dcr_id
: The identifier for the DCRclient
: The client instance for API communication
Ancestors (in MRO)
- decentriq_platform.media.compute_job.ComputeJob
- abc.ABC
result
def result(
self,
) ‑> decentriq_platform.media.api.ComputeInsightsResult
Get the result of the MediaInsightsJob.
Returns:
- The result of the MediaInsightsJob
MediaLookalikeAudienceStatisticsJob
MediaLookalikeAudienceStatisticsJob(
dcr_id: str,
audience: Union[decentriq_platform.media.api.SeedAudience, decentriq_platform.media.api.CustomAudience],
client: decentriq_platform.client.Client,
)
A compute job for retrieving lookalike audience statistics from a Media DCR.
Initialize a MediaLookalikeAudienceStatisticsJob instance.
Parameters:
dcr_id
: The identifier for the DCRaudience
: The audience to get the statistics forclient
: The client instance for API communication
Ancestors (in MRO)
- decentriq_platform.media.compute_job.ComputeJob
- abc.ABC
result
def result(
self,
) ‑> decentriq_platform.media.audience_statistics_result.LalAudienceStatistics
Get the result of the MediaLookalikeAudienceStatisticsJob.
Returns:
- Lookalike statistics as a LalAudienceStatistics object
MediaMatchingValidationReportJob
MediaMatchingValidationReportJob(
dcr_id: str,
client: decentriq_platform.client.Client,
)
A compute job for retrieving matching validation reports from a Media DCR.
Initialize a MediaMatchingValidationReportJob instance.
Parameters:
dcr_id
: The identifier for the DCRclient
: The client instance for API communication
Ancestors (in MRO)
- decentriq_platform.media.compute_job.ValidationReportJob
- decentriq_platform.media.compute_job.ComputeJob
- abc.ABC
result
def result(
self,
) ‑> decentriq_platform.media.api.ValidationReport
Get the result of the MediaMatchingValidationReportJob.
Returns:
- The result of the MediaMatchingValidationReportJob
MediaModelQualityReportJob
MediaModelQualityReportJob(
dcr_id: str,
client: decentriq_platform.client.Client,
)
Abstract base class for compute jobs in a Media DCR.
Initialize a compute job.
Parameters:
dcr_id
: The identifier for the DCRaction
: The compute action to performresult_zip_file_name
: The name of the file in the zip to get the result fromclient
: The client instance for API communication
Ancestors (in MRO)
- decentriq_platform.media.compute_job.ComputeJob
- abc.ABC
result
def result(
self,
) ‑> Dict[str, Any]
MediaOverlapStatisticsJob
MediaOverlapStatisticsJob(
dcr_id: str,
client: decentriq_platform.client.Client,
)
A compute job for retrieving overlap statistics from a Media DCR.
Initialize a MediaOverlapStatisticsJob instance.
Parameters:
dcr_id
: The identifier for the DCRclient
: The client instance for API communication
Ancestors (in MRO)
- decentriq_platform.media.compute_job.ComputeJob
- abc.ABC
result
def result(
self,
) ‑> decentriq_platform.media.api.OverlapStatisticsResult
Get the result of the MediaOverlapStatisticsJob.
Returns:
- The result of the MediaOverlapStatisticsJob
MediaSegmentsValidationReportJob
MediaSegmentsValidationReportJob(
dcr_id: str,
client: decentriq_platform.client.Client,
)
A compute job for retrieving segments validation reports from a Media DCR.
Initialize a MediaSegmentsValidationReportJob instance.
Parameters:
dcr_id
: The identifier for the DCRclient
: The client instance for API communication
Ancestors (in MRO)
- decentriq_platform.media.compute_job.ValidationReportJob
- decentriq_platform.media.compute_job.ComputeJob
- abc.ABC
result
def result(
self,
) ‑> decentriq_platform.media.api.ValidationReport
Get the result of the MediaSegmentsValidationReportJob.
Returns:
- The result of the MediaSegmentsValidationReportJob
ValidationReportJob
ValidationReportJob(
dcr_id: str,
action: decentriq_dcr_compiler._schemas.data_room_compute_action.DataRoomComputeAction,
client: decentriq_platform.client.Client,
)
A compute job for retrieving validation reports from a Media DCR.
Initialize a ValidationReportJob instance.
Parameters:
dcr_id
: The identifier for the DCRaction
: The compute action to performclient
: The client instance for API communication
Ancestors (in MRO)
- decentriq_platform.media.compute_job.ComputeJob
- abc.ABC Descendants
- decentriq_platform.media.compute_job.MediaAudiencesValidationReportJob
- decentriq_platform.media.compute_job.MediaDemographicsValidationReportJob
- decentriq_platform.media.compute_job.MediaMatchingValidationReportJob
- decentriq_platform.media.compute_job.MediaSegmentsValidationReportJob
get_validation_report
def get_validation_report(
self,
) ‑> decentriq_platform.media.api.ValidationReport
Get the validation report for the given task name.
Parameters:
task_name
: The name of the task to get the validation report for
Returns:
- The validation report