Skip to navigation

aistore.sdk.dsort.framework

View as MarkdownOpen in Claude

Module Contents

Classes

NameDescription
DsortAlgorithmDeprecated: retained for AIStore before 5.3; removal is planned for a future SDK release.
DsortFrameworkDeprecated: retained for AIStore before 5.3; removal is planned for a future SDK release.
DsortShardsGroupDeprecated: retained for AIStore before 5.3; removal is planned for a future SDK release.

API

class aistore.sdk.dsort.framework.DsortAlgorithm()

Bases: BaseModel

Deprecated: retained for AIStore before 5.3; removal is planned for a future SDK release.

Represents the algorithm used in a Dsort job

content_key_type
Optional[Literal['int', 'float', 'string']] = None
decreasing
bool = False
extension
Optional[str] = None
kind
Literal['alphanumeric', 'shuffle', 'content'] = 'alphanumeric'
seed
Optional[str] = ''
aistore.sdk.dsort.framework.DsortAlgorithm.as_dict()

Converts the DsortAlgorithm instance to a dictionary representation

aistore.sdk.dsort.framework.DsortAlgorithm.validate_content_fields()

Validates required key fields

class aistore.sdk.dsort.framework.DsortFramework(
algorithm: typing.Optional[aistore.sdk.dsort.framework.DsortAlgorithm] = None,
description = None,
output_shard_size = None
)

Deprecated: retained for AIStore before 5.3; removal is planned for a future SDK release.

Represents the framework for a dSort job, including input and output shard configurations.

aistore.sdk.dsort.framework.DsortFramework.from_file(
spec
)
classmethod

Class method to create a DsortFramework instance from a JSON or YAML file.

Only fields represented by this class are loaded. Pass the file path directly to Dsort.start() to preserve all server settings, including dry_run and max_mem_usage.

Parameters:

spec
str or Path

The path to the JSON or YAML file containing the specification

Returns:

An instance of the DsortFramework class

Raises:

  • ValueError: If the file extension is not .json, .yml, or .yaml
aistore.sdk.dsort.framework.DsortFramework.to_spec()

Converts the DsortFramework instance to a dictionary representation for use in dSort job specification

Returns:

Dictionary representation of dSort specification

class aistore.sdk.dsort.framework.DsortShardsGroup(
role: typing.Literal['input', 'output'],
format: typing.Union[aistore.sdk.multiobj.ObjectNames, aistore.sdk.multiobj.ObjectRange, aistore.sdk.dsort.ekm.ExternalKeyMap],
extension: str
)

Deprecated: retained for AIStore before 5.3; removal is planned for a future SDK release.

Represents the configuration for the input or output of a shard group in a dSort job

aistore.sdk.dsort.framework.DsortShardsGroup.as_dict()

Converts the DsortShardsGroup instance to a dictionary representation