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: idmtools.entities.iplatform.IPlatform, analyzers: List[Type[idmtools.entities.ianalyzer.IAnalyzer]], experiment_ids: List[str] = [], work_item_ids: List[str] = [], analyzers_args=None, analysis_name: str = 'WorkItem Test', tags=None, additional_files: Optional[Union[idmtools.assets.file_list.FileList, idmtools.assets.asset_collection.AssetCollection, List[str]]] = None, asset_collection_id=None, asset_files: Optional[Union[idmtools.assets.file_list.FileList, idmtools.assets.asset_collection.AssetCollection, List[str]]] = None, wait_till_done: bool = True, idmtools_config: Optional[str] = None, pre_run_func: Optional[Callable] = None, wrapper_shell_script: Optional[str] = None, verbose: bool = False, extra_args: Optional[Dict[str, Any]] = None)

Bases: object

PlatformAnalysis allows remote Analysis on the server.

See also

idmtools.analysis.analyze_manager.AnalyzeManager

__init__(platform: idmtools.entities.iplatform.IPlatform, analyzers: List[Type[idmtools.entities.ianalyzer.IAnalyzer]], experiment_ids: List[str] = [], work_item_ids: List[str] = [], analyzers_args=None, analysis_name: str = 'WorkItem Test', tags=None, additional_files: Optional[Union[idmtools.assets.file_list.FileList, idmtools.assets.asset_collection.AssetCollection, List[str]]] = None, asset_collection_id=None, asset_files: Optional[Union[idmtools.assets.file_list.FileList, idmtools.assets.asset_collection.AssetCollection, List[str]]] = None, wait_till_done: bool = True, idmtools_config: Optional[str] = None, pre_run_func: Optional[Callable] = None, wrapper_shell_script: Optional[str] = None, verbose: bool = False, extra_args: Optional[Dict[str, Any]] = None)

Initialize our platform analysis.

Parameters:
  • platform – Platform

  • experiment_ids – Experiment 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

analyze(check_status=True)

Analyze remotely.

Parameters:

check_status – Should we check status

Returns:

None

Notes

TODO: check_status is not being used

validate_args()

Validate arguments for the platform analysis and analyzers.

Returns:

None

get_work_item()

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

Returns:

Workflow item