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

Update Analyze Semantics #457

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions lib/ramble/ramble/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -1398,11 +1398,10 @@ def _analyze_experiments(self, workspace, app_inst=None):
"""

if self.get_status() == experiment_status.UNKNOWN.name and not workspace.dry_run:
logger.die(
f'Workspace status is {self.get_status()}\n'
'Make sure your workspace is fully setup with\n'
' ramble workspace setup'
logger.warn(
f'Experiment has status is {self.get_status()}. Skipping analysis..\n'
)
return

def format_context(context_match, context_format):

Expand Down
24 changes: 17 additions & 7 deletions lib/ramble/ramble/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,14 +228,24 @@ def __init__(self, workspace, filters, output_formats=['text'], upload=False):
self.upload_results = upload

def _prepare(self):
for _, app_inst, _ in self._experiment_set.filtered_experiments(self.filters):

# We only want to let the user run analyze if one of the following is true:
# - At least one expeirment is set up
# - `--dry-run` is enabled
found_valid_experiment = False
for exp, app_inst, _ in self._experiment_set.filtered_experiments(self.filters):
if not (app_inst.is_template or app_inst.repeats.is_repeat_base):
if app_inst.get_status() == ramble.application.experiment_status.UNKNOWN.name:
logger.die(
f'Workspace status is {app_inst.get_status()}\n'
'Make sure your workspace is fully setup with\n'
' ramble workspace setup'
)
if app_inst.get_status() != ramble.application.experiment_status.UNKNOWN.name:
found_valid_experiment = True

if not found_valid_experiment and self._experiment_set.num_experiments() \
and not self.workspace.dry_run:
logger.die(
'No analyzeable experiment detected.'
' Make sure your workspace is setup with\n'
' ramble workspace setup'
)

super()._construct_hash()
super()._prepare()

Expand Down
Loading