chipiron.scripts package
Subpackages
- chipiron.scripts.base_tree_exploration package
- chipiron.scripts.league package
- chipiron.scripts.learn_nn_supervised package
- Submodules
- chipiron.scripts.learn_nn_supervised.learn_nn_from_supervised_datasets module
LearnNNScriptLearnNNScript.base_scriptLearnNNScript.nnLearnNNScript.argsLearnNNScript.argsLearnNNScript.args_dataclass_nameLearnNNScript.base_experiment_output_folderLearnNNScript.base_scriptLearnNNScript.nnLearnNNScript.nn_board_evaluatorLearnNNScript.print_and_log_metrics()LearnNNScript.run()LearnNNScript.saving_folderLearnNNScript.saving_things_to_file()LearnNNScript.terminate()
LearnNNScriptArgs
- Module contents
- chipiron.scripts.one_match package
- chipiron.scripts.replay_game package
- chipiron.scripts.tree_visualization package
- Submodules
- chipiron.scripts.tree_visualization.tree_visualizer module
PhotoViewerVisualizeTreeScriptWindowWindow.viewerWindow.btnLoadWindow.btnPixInfoWindow.editPixInfoWindow.treeWindow.current_nodeWindow.indexWindow.__init__()Window.build_subtree()Window.display_subtree()Window.load_image()Window.pixInfo()Window.photoClicked()Window.keyPressEvent()Window.father()Window.move_to_son()Window.build_subtree()Window.display_subtree()Window.father()Window.keyPressEvent()Window.load_image()Window.move_to_son()Window.photoClicked()Window.pixInfo()Window.staticMetaObject
- Module contents
Submodules
chipiron.scripts.chipiron_args module
chipiron.scripts.factory module
factory for scripts module
- chipiron.scripts.factory.create_script(script_type: ScriptType, extra_args: dict[str, Any] | None = None, config_file_name: str | None = None, should_parse_command_line_arguments: bool = True) IScript[source]
Creates the corresponding script
- Parameters:
should_parse_command_line_arguments – whether the script should parse the command line. Default is True.
some (But might be set to False if called from a higher level script that wants the current script to stick to) –
extra_args. (defaults argument or if the higher level script wants to set them thought the) –
script_type – name of the script to create
extra_args – arguments provided to the script from the outside. In some cases they originate from a gui or command line. It can also be any dict specified to this function
- Return type:
object
chipiron.scripts.get_script module
- chipiron.scripts.get_script.get_script_type_from_script_class_name(script_type: ScriptType) Any[source]
Retrieves the script class name based on the given script type.
- Parameters:
script_type (ScriptType) – The script type.
- Returns:
The script class name.
- Return type:
Any
- Raises:
Exception – If the script type is not found.
chipiron.scripts.iscript module
This module defines the IScript interface, which serves as the interface for scripts in the application.
chipiron.scripts.main_chipiron module
Launching the main chipiron
- chipiron.scripts.main_chipiron.get_script_and_args(raw_command_line_arguments: list[str]) tuple[chipiron.scripts.script_type.ScriptType, dict[str, Any] | None, str | None][source]
- Parameters:
raw_command_line_arguments – the list of arguments of the scripts given by command line
- Returns:
A string for the name of script and a dictionary of parameters
chipiron.scripts.script module
This module contains the Script class which is responsible for launching scripts. It handles computing execution time, profiling, and parsing arguments.
- class chipiron.scripts.script.HasBaseScriptArgs(*args, **kwargs)[source]
Bases:
ProtocolProtocol of generic ScriptArgs that contains the BaseScriptArgs
- base_script_args: BaseScriptArgs
- class chipiron.scripts.script.Script(parser: Parsley, extra_args: dict[str, Any] | None = None, config_file_name: str | None = None)[source]
Bases:
GenericThe core Script class to launch scripts. Takes care of computing execution time, profiling, and parsing arguments.
- base_experiment_output_folder: str | PathLike[str] = 'chipiron/scripts/'
- default_experiment_output_folder: str | PathLike[str] = 'chipiron/scripts/default_output_folder'
- initiate(experiment_output_folder: str | None = None) T_Dataclass[source]
Initiates the script by parsing arguments and converting them into a standardized dataclass.
- Parameters:
args_dataclass_name – The type of the dataclass to convert the arguments into.
experiment_output_folder – The base folder for experiment output. If None, uses the default value.
- Returns:
The converted arguments as a dataclass.
- parser: Parsley
- start_time: float
chipiron.scripts.script_args module
- class chipiron.scripts.script_args.BaseScriptArgs(profiling: bool = False, testing: bool = False, universal_behavior: bool = False, experiment_output_folder: str | PathLike[str] | None = None, relative_script_instance_experiment_output_folder: str | PathLike[str] | None = None, seed: int = 0)[source]
Bases:
objectDataclass representing the arguments for the Script class.
- profiling: bool = False
- seed: int = 0
- testing: bool = False
- universal_behavior: bool = False
chipiron.scripts.script_type module
This module defines the ScriptType enum and provides a mapping between script types and their corresponding script classes.
- class chipiron.scripts.script_type.ScriptType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
str,EnumEnum class representing different types of scripts.
- BaseTreeExploration = 'base_tree_exploration'
- League = 'league'
- LearnNN = 'learn_nn'
- LearnNNFromScratch = 'learn_nn_from_scratch'
- OneMatch = 'one_match'
- ReplayMatch = 'replay_match'
- TreeVisualization = 'tree_visualization'
Module contents
Init file for scripts module
- class chipiron.scripts.IScript(base_script: Script[Any])[source]
Bases:
ProtocolThe interface for scripts in the application.
- class chipiron.scripts.Script(parser: Parsley, extra_args: dict[str, Any] | None = None, config_file_name: str | None = None)[source]
Bases:
GenericThe core Script class to launch scripts. Takes care of computing execution time, profiling, and parsing arguments.
- args: IsDataclass | None
- base_experiment_output_folder: str | PathLike[str] = 'chipiron/scripts/'
- default_experiment_output_folder: str | PathLike[str] = 'chipiron/scripts/default_output_folder'
- initiate(experiment_output_folder: str | None = None) T_Dataclass[source]
Initiates the script by parsing arguments and converting them into a standardized dataclass.
- Parameters:
args_dataclass_name – The type of the dataclass to convert the arguments into.
experiment_output_folder – The base folder for experiment output. If None, uses the default value.
- Returns:
The converted arguments as a dataclass.
- parser: Parsley
- start_time: float
- class chipiron.scripts.ScriptType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
str,EnumEnum class representing different types of scripts.
- BaseTreeExploration = 'base_tree_exploration'
- League = 'league'
- LearnNN = 'learn_nn'
- LearnNNFromScratch = 'learn_nn_from_scratch'
- OneMatch = 'one_match'
- ReplayMatch = 'replay_match'
- TreeVisualization = 'tree_visualization'