AntaresSimulatorTeam / AntaREST

API REST and WebUI for Antares_Simulator
Apache License 2.0
10 stars 6 forks source link

[ANT-583] Improve retrieval of simulation results (option `-z`) #1738

Open laurent-laporte-pro opened 1 year ago

laurent-laporte-pro commented 1 year ago

Problem Statement

Currently, Antares Web is able to handle scenarios where Antares Launcher provides the entire study archive, including the results in the study's output folder. Antares Web is able to take into account the case where results are stored in a sub-folder, e.g. output/20230914-1918eco, but also the case where results are provided in a ZIP archive, e.g. output/20230914-1918eco.zip.

However, Antares Web does not have the capacity to handle the situation where the archive does not contain the entire study, but only the simulation results in the form of a compressed archive. This is particularly the case when using the -z option in Antares Solver.

Proposed Solution

The aim of this feature request is to modify Antares Web to take account of this new scenario in addition to the existing scenarios.

Specifically, the SlurmLauncher._import_study_output method (which is an implementation detail) needs to be modified to take into account the case where the directory path self.local_workspace / STUDIES_OUTPUT_DIR_NAME / job_id represents a compressed archive of results instead of a entire study.

The old behavior should also be retained, i.e. where the directory path self.local_workspace / STUDIES_OUTPUT_DIR_NAME / job_id is a complete study containing an output sub-folder.

Developer Notes

MartinBelthle commented 1 year ago

Processus de rapatriement des résultats de Calin vers AntaresWeb:

Quand l'étude est finie et revient de Calin, on reçoit un zip dans le slurm workspace. Pour exporter l’output vers AntaresWeb, il faut:

Si l’option auto_unzip est activée on le dézippe sur AntaresWeb.