Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DownloadAnalyzer should not stop if one sim fails, but try to download all sims independently. #1506

Closed
ghart-IDM opened this issue Mar 31, 2021 · 4 comments · Fixed by #1598

Comments

@ghart-IDM
Copy link

Table of Contents

- [Description]When using a DownloadAnalyzer to download an experiment if it hits an error on one sim (for example did not find a file it is trying to download) it stops. I think it would be useful to have it stop with that sim but continue trying to download the rest of the sims.
- [What I Did]Download the first third of sims in the experiment but not know if the last 2/3 where missing the file or just the next one.

Description

I was recently using a DownloadAnalyzer to download the outputs of an experiment with 100 sims in it. It downloaded 32 sims and then stopped. Looking at the log it failed on the next sims because one of the files (a plot) that it was trying to download was missing. However, I think most of the 68 sims that were not downloaded had all the files and would like the "bad" sim to be skipped and the others to downloaded or at least attempted.

What I Did

from idmtools.analysis.analyze_manager import AnalyzeManager
from idmtools.analysis.download_analyzer import DownloadAnalyzer
from idmtools.core import ItemType
from idmtools.core.platform_factory import Platform

if __name__ == "__main__":

    # Set the platform where you want to run your analysis
    platform = Platform('Calculon')

    experiment_id = '7f8c52bb-d991-eb11-a2ce-c4346bcb1550'
    output_path='sweepRuns/All/R028/5000000'
    ignorelist = []

    files = 'all'
    if files == 'all':
        filenames = ['config.json', 'outputs/summary.json', 'outputs/Plots/snapshots_over_nodes_E10.png',
                     'outputs/Plots/snapshots_over_nodes_E10.png', 'outputs/Plots/snapshots_over_nodes_not_S0.png',
                     'outputs/Plots/t_AFP.png', 'outputs/Plots/time_series_S0.png', 'outputs/Plots/time_series_R.png',
                     'outputs/DDApolio_SIA-Heir.hdf5', 'stdout.txt', 'stderr.txt']
        analyzers = [DownloadAnalyzer(filenames=filenames, output_path=output_path)]
    elif files == 'plots':
        filenames = ['config.json', 'outputs/summary.json',
                     'outputs/Plots/snapshots_over_nodes_E10.png', 'stdout.txt']
        analyzers = [DownloadAnalyzer(filenames=filenames, output_path=output_path)]
    else:
        filenames = ['config.json', 'outputs/Plots/stats.pickle', 'outputs/summary.json',
                     'outputs/summary_noResponse.json', 'outputs/Plots/statsnoResponse_.pickle']
        analyzers = [DownloadAnalyzer(filenames=filenames, output_path='output')]

    # Specify the id Type, in this case an Experiment
    manager = AnalyzeManager(configuration={}, platform=platform, ids=[(experiment_id, ItemType.EXPERIMENT)],
                             analyzers=analyzers, partial_analyze_ok=True)
    manager.analyze()

Extras

Please populate system information by running idmtools info system --issue. To accomplish this, please follow these steps

  • Ensure idmtool-cli packages is installed. You can do this be installing it using the command
> pip install idmtools-cli --index-url=https://packages.idmod.org/api/pypi/pypi-production/simple
  • Run
> idmtools info system --issue

This will copy the system information to your clipboard

  • Paste the data here
@shchen-idmod
Copy link
Collaborator

DownloadAnalyzer stop is due to some simulations do not have files analyzer is looking for. The root cause is simulation/experiment do not Fail even something is wrong in simulation. For this case, looks like process got Killed and but simulations are still return "Succeeded" status. (part of the reason is original experiment script did not check exit code for shell script). But Killed process may not fail to exit code anyway.

@ghart-IDM
Copy link
Author

Related to this. In the log the ERROR gives the file name that is missing, but it does not give the sim ID that it failed on.

@devclinton devclinton self-assigned this Jul 28, 2021
devclinton added a commit that referenced this issue Jul 28, 2021
#1506 - Download Analyzer
#1581 - Ensure errors are displayed in log
#1594 - Disable log reinitialization in worker threads
@devclinton devclinton linked a pull request Jul 28, 2021 that will close this issue
@devclinton
Copy link
Member

Address in #1598

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants