idmtools.analysis.platform_anaylsis module#

Platform Analysis is a wrapper to allow execution of analysis through SSMT vs Locally.

Running remotely has great advantages over local execution with the biggest being more compute resources and less data transfer. Platform Analysis tries to make the process of running remotely similar to local execution.

Copyright 2021, Bill & Melinda Gates Foundation. All rights reserved.

class idmtools.analysis.platform_anaylsis.PlatformAnalysis(platform: IPlatform, analyzers: List[Type[IAnalyzer]], experiment_ids: List[str] = [], simulation_ids: List[str] = [], work_item_ids: List[str] = [], analyzers_args=None, analysis_name: str = 'WorkItem Test', tags=None, additional_files: FileList | AssetCollection | List[str] | None = None, asset_collection_id=None, asset_files: FileList | AssetCollection | List[str] | None = None, wait_till_done: bool = True, idmtools_config: str | None = None, pre_run_func: Callable | None = None, wrapper_shell_script: str | None = None, verbose: bool = False, extra_args: Dict[str, Any] | None = None)[source]#

Bases: object

PlatformAnalysis allows remote Analysis on the server.

__init__(platform: IPlatform, analyzers: List[Type[IAnalyzer]], experiment_ids: List[str] = [], simulation_ids: List[str] = [], work_item_ids: List[str] = [], analyzers_args=None, analysis_name: str = 'WorkItem Test', tags=None, additional_files: FileList | AssetCollection | List[str] | None = None, asset_collection_id=None, asset_files: FileList | AssetCollection | List[str] | None = None, wait_till_done: bool = True, idmtools_config: str | None = None, pre_run_func: Callable | None = None, wrapper_shell_script: str | None = None, verbose: bool = False, extra_args: Dict[str, Any] | None = None)[source]#

Initialize our platform analysis.

Parameters:
  • platform – Platform

  • experiment_ids – Experiment ids

  • simulation_ids – Simulation ids

  • work_item_ids – WorkItem ids

  • analyzers – Analyzers to run

  • analyzers_args – Arguments for our analyzers

  • analysis_name – Analysis name

  • tags – Tags for the workitem

  • additional_files – Additional files for server analysis

  • asset_collection_id – Asset Collection to use

  • asset_files – Asset files to attach

  • wait_till_done – Wait until analysis is done

  • idmtools_config – Optional path to idmtools.ini to use on server. Mostly useful for development

  • pre_run_func – A function (with no arguments) to be executed before analysis starts on the remote server

  • wrapper_shell_script – Optional path to a wrapper shell script. This script should redirect all arguments to command passed to it. Mostly useful for development purposes

  • verbose – Enables verbose logging remotely

  • extra_args – Optional extra arguments to pass to AnalyzerManager on the server side. See __init__()

analyze(check_status=True)[source]#

Analyze remotely.

Parameters:

check_status – Should we check status

Returns:

None

Notes

TODO: check_status is not being used

validate_args()[source]#

Validate arguments for the platform analysis and analyzers.

Returns:

None

get_work_item()[source]#

Get work item being using to run analysis job on server.

Returns:

Workflow item