Infrastructure¶
Provides types that support the core aspects for the API.
Modules¶
Modules |
Description |
---|---|
Represents the state of an agent. |
|
Represents ranges for a consumable resource. |
|
Represents hard disk information. |
|
Strategies for determining when host processes get recycled. |
|
Represents network information. |
|
Represents the task environment in the system. The task environment provides common methods to run before and after a set of Tasks are run for a given job in a host process. |
|
Snapshot data for task environment. |
|
Represents the task environment identification. |
|
A serialized task environment exposing the metadata needed to exchange task environments across the wire. |
|
A message representation of a task. |
|
Represents a resource constraint that should be satisfied by the agent to run a task. |
|
Represents the task reported progress. |
|
A collection of mutable attributes used to access, update, and keep track of a task. |
AgentSnapshot¶
- class agiparallel.infrastructure.AgentSnapshot.AgentSnapshot¶
Bases:
object
Represents the state of an agent.
- activity¶
str: The current activity performed on the agent.
- capacity¶
int: The capacity, which is the number of hosts that can be run simultaneously.
- cpu_speed¶
int: The cpu speed for the machine where the agent is running.
- current_cpu_usage¶
int: The current cpu usage.
- date_started¶
datetime: The time the agent connected to coordinator.
- description¶
str: The description associated with this agent.
- estimated_memory_budget¶
int : The amount of estimated memory budget the agent has to use. It is in Megabytes.
- hard_disk¶
HardDiskStatus: The amount of available disk space on the drive the agent is running on.
- host_pool¶
List: The list of host information.
- id¶
guid: The agent identifier.
- is_enabled¶
bool: A value indicating whether this agent is enabled or disabled.
- is_registered¶
bool: A value indicating whether this agent is registered.
- logging_level¶
LoggingLevel: logging level of the agent.
- machine_name¶
str: The name of the machine where the agent is running.
- meets_threshold¶
bool: A value indicating whether the agent meets the threshold for agent selection set by the coordinator.
- memory¶
MemoryStatus: The memory status (i.e. total and available memory).
- network¶
NetworkStatus: The network activity that agent using for remote connections.
- os_platform¶
OSPlatform: os platform of the agent.
- priority¶
int: The current priority of the resource.
- resources¶
dict: The resources of the agent.
- runtime_properties¶
dict: The runtime properties of the agent.
- threshold_failure_reason¶
str: The threshold failure reason.
- time_stamp¶
timestamp: The time the agent was created.
- user_name¶
str: The name of the user of this agent.
ConsumableResourceRange¶
HardDiskStatus¶
HostRecycleSettings¶
- class agiparallel.infrastructure.HostRecycleSettings.HostRecycleSettings¶
Bases:
object
Strategies for determining when host processes get recycled.
- fixed_number_of_tasks¶
int: Gets or sets the fixed number of tasks the host will execute before it is recycled..
- idle_timeout¶
int: The amount of time (in milliseconds) a host can idle before it is recycled.
- job_completion¶
bool: A value indicating whether to recycle the host upon the completion of the current job.
- private_memory_usage_maximum¶
long: The amount of private memory (in bytes) a host process must reach or exceed before it is recycled.
- regular_interval¶
int: The amount of time (in milliseconds) representing the interval after which the host will be regularly recycled. The interval is measured from the time the host process was started.
- specific_times¶
string: The specific times of day at which hosts get recycled. Specific times are in the format “hh:mm:ss tt”. Separate multiple times with commas.
- task_environment_no_longer_referenced¶
bool: A value indicating whether the host should get recycled after no other currently executing jobs reference the same task environment.
NetworkStatus¶
- class agiparallel.infrastructure.NetworkStatus.NetworkStatus¶
Bases:
object
Represents network information.
- link_bandwidth¶
long: The link bandwidth of the network interface in bits per second.
- receive_rate¶
int: The network sampled received rate in bytes per second.
- send_rate¶
int: The network sampled send rate in bytes per second.
TaskEnvironment¶
- class agiparallel.infrastructure.TaskEnvironment.TaskEnvironment¶
Bases:
object
Represents the task environment in the system. The task environment provides common methods to run before and after a set of Tasks are run for a given job in a host process.
- host_architecture¶
int: The desired CPU Architecture of the host that executes the task.
- recycle_settings¶
HostRecycleSettings: The recycling settings used for the policy which determines when to shutdown the host process the task runs on.
- setup()¶
Called by Host before tasks are executed.
- property tasks_per_host¶
int: The number of tasks this environment will execute before shutting down. tasks_per_host is Obsolete; use recycle_settings.fixed_number_of_tasks instead.
- teardown()¶
Called by Host after tasks are executed.
- teardown_timeout¶
int: The amount of time teardown can run for before it is timed-out in milliseconds.
- unique_id¶
uuid: The id of the environment. Environment can be reused if the environment IDs are identical.
TaskEnvironmentDefinition¶
- class agiparallel.infrastructure.TaskEnvironmentDefinition.TaskEnvironmentDefinition¶
Bases:
object
Snapshot data for task environment.
- headers¶
Hashtable: The task environment headers.
- identification¶
TaskEnvironmentIdentification: The task environment identification.
- name¶
string: The name.
- required_license¶
LicenseParameters: The required license.
TaskEnvironmentIdentification¶
- class agiparallel.infrastructure.TaskEnvironmentIdentification.TaskEnvironmentIdentification¶
Bases:
object
Represents the task environment identification.
- additional_id¶
str: Gets or sets a user provided string used to differentiate two task environments with the same unique identifier.
- execution_type¶
TaskExecutionType: The type of task execution.
- host_architecture¶
CpuArchitecture: The architecture of the host environment.
- host_gc_mode¶
This value must match the value of GarbageCollectionType.NotApplicable on the C# side.
- recycle_id¶
uuid: An additional UUID for differentiating task environments based on their host recycle settings.
- unique_id¶
guid: The unique id.
TaskEnvironmentMetadata¶
- class agiparallel.infrastructure.TaskEnvironmentMetadata.TaskEnvironmentMetadata¶
Bases:
object
A serialized task environment exposing the metadata needed to exchange task environments across the wire.
- configuration_content¶
str: The configuration settings content.
- dependencies¶
list: The list of assembly dependencies.
- identification¶
TaskEnvironmentIdentification: The identification. This is used as the mechanism to compare equality between two different task environments.
- name¶
str: The task environment name.
- payload¶
ChunkedByteArray: The payload (i.e. serialized task environment).
- recycle_settings¶
HostRecycleSettings: The settings determining when to shutdown the host process running the task(s).
- required_license¶
LicenseParameters: The required license.
- teardown_timeout¶
int: The amount of time teardown can run for before it is timed-out.
- working_directory¶
str: The custom working directory.
TaskMetadata¶
- class agiparallel.infrastructure.TaskMetadata.TaskMetadata¶
Bases:
object
A message representation of a task.
- properties_payload¶
ChunkedByteArray: The properties payload.
- result_payload¶
ChunkedByteArray: The task result payload.
- state¶
TaskState: The task state.
- task_payload¶
ChunkedByteArray: The serialized binary form of the task.
TaskPrecondition¶
TaskProgressInformation¶
TaskState¶
- class agiparallel.infrastructure.TaskState.TaskState¶
Bases:
object
A collection of mutable attributes used to access, update, and keep track of a task.
- agent_selection_preference¶
AgentSelectionType: The agent selection preference.
- allocated_task_resources¶
dict: The resources that have been allocated to the task.
- ancestors¶
guid[]: The list of ancestors of this task.
- assigned_worker¶
AgentSnapshot: The representation of the agent that exeucted this task.
- cancellation_message¶
str: The cancellation message.
- cancellation_reason¶
TaskCancellationReason: The reason the task was cancelled.
- date_assigned¶
datetime: The DateTime indicating the date this task was assigned to the host to execute.
- date_completed¶
datetime: The DateTime indicating the date task this task completed.
- date_started¶
datetime: The DateTime indicating the date this task started running.
- date_submitted¶
datetime: The DateTime indicating the date this task was submitted.
- disable_sending_events¶
bool: A value indicating whether to disable sending task events back to the client.
- disable_standard_output_redirect¶
bool: A value indicating whether to disable redirecting the standard output and error to the task.
- environment_identification¶
TaskEnvironmentIdentification: The environment identification associated with the TaskEnvironment of this task.
- execution_type¶
TaskExecutionType: The execution type of the tasks.
- fail_if_preconditions_not_satisfied¶
bool: A value indicating whether to fail all tasks if the preconditions is not satisfied. This value will be written to by the Coordinator depending on the job.
- group_id¶
int: The group ID associated with this task.
- host_id¶
int: The ID of the host that ran this task. Value is -1 if no host has run this task yet.
- interrupted_retry_attempts_so_far¶
short: The number of times task has been re-attempted after a task interruption so far.
- is_exclusive¶
bool: A value indicating whether this instance should have exclusive access to the resource it’s running on.
- last_interrupt_reason¶
str: The last reason for the task to be in the interrupted state. This can be ignored if the task is not in the interupted state.
- mailbox_acquaintances¶
guid[]: The mailbox acquaintances. Can be null if everybody can post to the mailbox.
- max_interrupted_retry_attempts¶
short: The maximum number of retries that will be attempted if this task gets interrupted.
- priority¶
short: The priority of task.
- process_id¶
int: The process ID of the host that executed the task.
- requested_task_resources¶
dict: The resources that will be consumed by the task.
- required_license¶
LicenseParameters: The required license of this task.
- standard_error¶
str: The standard error written to the host process while executing this task.
- standard_output¶
str: The standard output written to the host process while executing this task.
- status¶
TaskStatus: The current status of this task.
- submitter¶
list: Contains submitter information.
- submitter_id¶
guid: The submitter id.
- submitter_machine_name¶
str: The name of the machine that submitted the task.
- submitter_user_name¶
str: The username of the task submitter.
- task_id¶
int: The ID associated with this task.
- task_name¶
str: The name that describes this task.
- task_preconditions¶
list: The task pre conditions.
- timeout¶
int: The number of milliseconds the task can run before the task is interrupted.
- unique_id¶
guid: The unique ID associated with this task.