Media sets bring a number of advanced, out-of-the-box transformations to the platform. In addition to being triggered via transforms and pipelines, media transformations are also triggered by interacting with media items in the platform, for example, by previewing a media item. Additionally, there is a cost to download or stream the full contents of a media item.
Usage is tracked in units of Foundry compute-seconds. The table below describes each transformation available, with usage rate in terms of compute-seconds per gigabyte processed.
If you have an enterprise contract with Palantir, contact your Palantir representative before proceeding with usage calculations.
Usage rate is measured in compute-seconds per GB.
Transformation | Usage Rate |
---|---|
Download / stream | 2 |
Transformation | Usage Rate |
---|---|
Rotate | 40 |
Resize | 40 |
Generate PDF | 40 |
Adjust Contrast | 75 |
Crop / chip | 75 |
Grayscale | 75 |
Geo tile | 75 |
Render DICOM image layer | 75 |
Extract text (OCR) | 275 |
Encryption / decryption | 75 |
Transformation | Usage Rate |
---|---|
Transcode | 75 |
Waveform generation | 75 |
Stream with HLS | 75 |
Transcription | 275 |
Transformation | Usage Rate |
---|---|
Get timestamps for scene frames | 40 |
Extract audio | 75 |
Extract frames at timestamp | 75 |
Extract all scene frames | 275 |
Stream with HLS | 275 |
Transcode | 275 |
Transformation | Usage Rate |
---|---|
Render page as image | 40 |
Render page as image within bounding box | 40 |
Get PDF page dimensions | 40 |
Slice PDF range | 75 |
Extract form fields | 75 |
Extract table of contents | 75 |
Extract text on page (raw) | 75 |
Extract all text (raw) | 75 |
Extract text (OCR) | 275 |
MediaSet:MediaItemPathInvalid
error.While it is possible to interact with media sets at scale, such as uploading or transforming millions of media items, error handling should be implemented to ensure pipeline stability. When interacting with media sets at scale, the media set service may throttle by responding with Quality of Service (QoS) errors which have status codes of either 429 or 503. This indicates that the media set service cannot handle the storage or compute load at the moment.
Instead of failing on a QoS error when the service throttles, the client should build an adequate retrying mechanism.
For example, if a client is uploading millions of media items by submitting PUT requests at /{mediaSetRid}/items
, the client should retry any media item upload requests that receive a QoS error.
When using the transforms-media library in Python transforms, a retrying mechanism is generally already in place. For example, when uploading media files from a catalog dataset to a media set, the library method provided already has retrying logic to handle QoS errors.
Copied!1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
from transforms.api import transform, Input, Output from transforms.mediasets import MediaSetOutput @transform( input_files=Input('/examples/image_files'), output_media_set=MediaSetOutput('/examples/image_media_set'), uploaded_media_record=Output('/examples/uploaded_media_record'), ) def compute(input_files, input_files, output_media_set, uploaded_media_record): uploaded_media_items = output_files.put_dataset_files_and_get_dataframe_of_uploads( input_files, ignore_items_not_matching_schema=False, ignore_items_failing_to_convert=False, ) uploaded_media_record.write_dataframe(uploaded_media_items)