Challenge
aica_challenge_1.challenge.Challenge
¶
This is the main class for programmatic manipulation with the AICA challenge. It provides access to challenge management functionality and enables launching of training runs.
In most of the cases it is better to use the TUI.
Example:
from aica_challenge_1.challenge import Challenge
# It is better to hide everything behind this flag if you are to ever execute
# runs. They are separate processes and they could cause some strange errors.
if __name__ == "__main__"
challenge = Challenge()
packages: PackageManager
property
¶
Provides access to package and agent management utilities.
Returns:
| Type | Description |
|---|---|
PackageManager
|
package manager |
scenarios: ScenarioManager
property
¶
Provides access to scenario management utilities.
Returns:
| Type | Description |
|---|---|
ScenarioManager
|
scenario manager |
execution: ExecutionManager
property
¶
Provides access to run preparation and execution.
Returns:
| Type | Description |
|---|---|
ExecutionManager
|
execution manager |
execute(run_specification: RunSpecification | str, single_process=False) -> None
¶
Executes a run. This function is just a proxy for the same function in execution manager.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
run_specification
|
RunSpecification | str
|
Either a RunSpecification object or a name of a run specification that is stored in the database. |
required |
single_process
|
If set to True, it will execute only one run at a time (regardless of the run specification) and it will display the stdout and stderr. If set to False, it will execute each run in a new process (even if the run specification says no parallel runs) and stdout and stderr are hidden and stored in the database. |
False
|
check_init_state(challenge_dir: Path) -> bool
staticmethod
¶
Checks, whether an AICA challenge is initialized at the specified directory. The function looks for a presence
of agents and scenarios directories.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
challenge_dir
|
Path
|
A directory where to check for the challenge environment. |
required |
Returns:
| Type | Description |
|---|---|
bool
|
True if the challenge is initialized at the specified path. |
init_environment()
staticmethod
¶
Initializes the AICA challenge environment in the current working directory. The initialization currently
entails only creation of agents and scenarios directories.