class_docstr: Test assessment ParallelAssessment
docstr: Test assessment plot format
docstr_tok: ["Test","assessment","plot","format"]
code: def test_analysis(self, orionstate, study_experiments_config):
      """Test assessment plot format"""
      repetitions = 2
      n_workers = [1, 2, 4]
      pa1 = ParallelAssessment(
          repetitions=repetitions, n_workers=n_workers
      )
  
      study_experiments_config["task_number"] = repetitions
      study_experiments_config["n_workers"] = n_workers
      experiments = create_study_experiments(
          orionstate, **study_experiments_config
      )
      figure = pa1.analysis("task_name", zip(pa1.workers, experiments))
  
      names = []
      algorithms = []
      for algorithm in study_experiments_config["algorithms"]:
          algo = list(algorithm.keys())[0]
          algorithms.append(algo)
  
          for worker in n_workers:
              names.append(algo + "_workers_" + str(worker))
  
      assert len(figure) == 3
      assert_regrets_plot(
          figure["regrets"],
          names,
          balanced=study_experiments_config["max_trial"],
          with_avg=True,
      )
  
      asset_parallel_assessment_plot(
          figure["parallel_assessment"],
          algorithms,
          3,
      )
  
      assert_durations_plot(figure["durations"], names)
  
file_path: orion/tests/unittests/benchmark/test_assessments.py
imports: import plotly
  import pytest
  from orion.benchmark.assessment import AverageRank, AverageResult, ParallelAssessment
  from orion.testing import create_experiment, create_study_experiments
  from orion.testing.plotting import assert_durations_plot, assert_rankings_plot, assert_regrets_plot, asset_parallel_assessment_plot
label_desc: Use image node_id 2 for calling the TestParallelAssessment obj's underlying member method code with example usage: obj.test_analysis(orionstate, study_experiments_config) without return types