IBMExperimentService.create_figures#

IBMExperimentService.create_figures(experiment_id, figure_list, blocking=True, max_workers=100)[source]#

Create multiple figures in the database using asynchronous calls.

If you choose blocking==True, the method will run until all the save threads terminated. To improve running time, multithreading is used.

If blocking==False it is up to the user to verify all the threads finished; block_for_save() can be called to ensure all threads finish. save_status() returns the information on the status of the threads.

Parameters:
  • experiment_id (str) – ID of the experiment this figure is for.

  • figure_list (List[Tuple[Union[str, bytes], str]]) – A list of the figures to save. Every figure is given by a tuple of the form (figure, name) where figure can be the actual figure or its filename and name is the name given to the figure in the db. If None, the figure file name, if given, or a generated name is used.

  • blocking (bool) – Whether to wait for all the save threads to finish before returning control

  • max_workers (int) – Maximum number of worker threads to write to the server.

Raises: