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

Potentially confusing print by YAML checker when checking a loader is first in the pipeline #515

Open
yousefmoazzam opened this issue Oct 28, 2024 · 0 comments

Comments

@yousefmoazzam
Copy link
Collaborator

There's a check that is making sure that the first method in the pipeline YAML file is a loader:

def check_first_method_is_loader(conf: PipelineConfig) -> bool:
"""
Check that the first method in pipeline is a
loader.
"""
first_stage = conf[0]
module_path = first_stage["module_path"]
_print_with_colour(
"Checking that the first method in the pipeline is a loader...",
colour=Colour.GREEN,
)
if module_path != "httomo.data.hdf.loaders":
_print_with_colour(
"The first method in the YAML_CONFIG file is not a loader from "
"'httomo.data.hdf.loaders'. Please recheck the yaml file."
)
return False
_print_with_colour("Loader check successful!!\n", colour=Colour.GREEN)
return True

If the check passes, the message printed is:

_print_with_colour("Loader check successful!!\n", colour=Colour.GREEN)

However, in the event that:

  • this check passes
  • but other checks fail in the loader (such as a duplicate parameter)

this message being printed is confusing, because "loader check successful" implies that the loader config is error-free, but in reality this is not the case.

I think the message should be updated to be more specific in stating that the check for the first method being a loader was successful, to avoid such confusion in cases where the check passes but other checks that involve the loader fail. Maybe something like:

Loader first in pipeline check successful
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant