Engine¶
The AWS EC2 instance types to use - in order.
- class moveai_mocap.compute.enums.ec2.InstanceTypeEnum(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
The AWS EC2 instance types to use - in order.
- g6_2xlarge: str = 'g6.2xlarge'¶
- g6_4xlarge: str = 'g6.4xlarge'¶
- g6_8xlarge: str = 'g6.8xlarge'¶
- g6_xlarge: str = 'g6.xlarge'¶
Models for EC2 compute.
- pydantic model moveai_mocap.compute.models.ec2.EC2ProvisionResponse¶
The response from the call to provision.
- field instance_id: str [Required]¶
- field instance_type: str [Required]¶
- field region_name: str [Required]¶
- pydantic model moveai_mocap.compute.models.ec2.Filter¶
Filter Schema.
- Fields:
- field Name: str [Required]¶
- field Values: List[Any] [Required]¶
- pydantic model moveai_mocap.compute.models.ec2.InstanceAttributes¶
Instance Attribute schema.
- Fields:
- field CapacityReservationSpecification: Dict[str, str] = {'CapacityReservationPreference': 'open'}¶
- field DryRun: bool [Required]¶
- field IamInstanceProfile: Dict[str, str] [Required]¶
- field ImageId: str [Required]¶
- field InstanceInitiatedShutdownBehavior: str [Required]¶
- field InstanceType: str [Required]¶
- field MaxCount: int = 1¶
- field MetadataOptions: Dict[str, str] = {'HttpTokens': 'required'}¶
- field MinCount: int = 1¶
- field SecurityGroupIds: List[str] [Required]¶
- field SubnetId: str [Required]¶
- field UserData: Any | None = None¶
- pydantic model moveai_mocap.compute.models.ec2.ModifyAttribute¶
Modify attribute schema.
- field InstanceId: str [Required]¶
- field UserData: dict[str, Any] [Required]¶
A class that allows processing using an ec2 backend.
- pydantic model moveai_mocap.compute.ec2.EC2ComputeManager¶
The ec2 compute class.
- Fields:
- field dry_run: bool = False¶
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response
- Validated by:
- field iam_boto3_client: BaseClient [Required]¶
Boto3 client instance which points to iam service.
- Validated by:
- field iam_instance_profile_name: str [Required]¶
The instance profile name that the EC2 instance should use.
- Validated by:
- field instance_initiated_shutdown_behaviour: str = 'stop'¶
Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown)
- Validated by:
- field instance_types: Type[Enum] = <enum 'InstanceTypeEnum'>¶
An enum of EC2 instance types. See InstanceTypeEnum for more information.
- Validated by:
- field regions: list[Region] [Required]¶
List of regions to be used.
- Validated by:
- validator instantiate_private_attributes » all fields¶
Instantiate the private attributes used on this compute class.
- Returns:
The validated object
- model_post_init(context: Any, /) None¶
This function is meant to behave like a BaseModel method to initialise private attributes.
It takes context as an argument since that’s what pydantic-core passes when calling it.
- Args:
self: The BaseModel instance. context: The context.
- provision(run: BaseRunModel) dict[str, str]¶
Launch an EC2 instance.
- Args:
run: The run object that the instance is being provisioned for
- Raises:
MoveFailedToStartEc2InstanceError: If instances cannot be started
- Returns:
The response from the started instance
A class that allows processing using a local backend.
- pydantic model moveai_mocap.compute.local_run.LocalComputeManager¶
The local compute class.
- Fields:
- field dry_run: bool = False¶
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response
- model_post_init(context: Any, /) None¶
This function is meant to behave like a BaseModel method to initialise private attributes.
It takes context as an argument since that’s what pydantic-core passes when calling it.
- Args:
self: The BaseModel instance. context: The context.
- provision(run: BaseRunModel) dict[str, str]¶
Launch a local instance.
- Args:
run: The run object that the run is being provisioned for
- Raises:
MoveFailedToStartLocalRunError: If local run cannot be started
- Returns:
The response from the run