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

Calibra may fail with ContainerPlatform #2393

Open
ZDu-IDM opened this issue Nov 13, 2024 · 0 comments
Open

Calibra may fail with ContainerPlatform #2393

ZDu-IDM opened this issue Nov 13, 2024 · 0 comments
Assignees
Labels
bug Something isn't working Container Workflow

Comments

@ZDu-IDM
Copy link
Collaborator

ZDu-IDM commented Nov 13, 2024

When run calibration we will encounter this case:

  • experiment has parent_id
  • experiment has None parent

As the results, platform.get_directory call may fail at this line:

        suite_dir = Path(self.job_directory, self.entity_display_name(item.parent))

in

def get_directory(self, item: Union[Suite, Experiment, Simulation]) -> Path:
    """
    Get item's path.
    Args:
        item: Suite, Experiment, Simulation
    Returns:
        item file directory
    """
    if isinstance(item, Suite):
        item_dir = Path(self.job_directory, self.entity_display_name(item))
    elif isinstance(item, Experiment):
        suite_id = item.parent_id or item.suite_id
        if suite_id is None:
            raise RuntimeError("Experiment missing parent!")
        suite_dir = Path(self.job_directory, self.entity_display_name(item.parent))
        item_dir = Path(suite_dir, self.entity_display_name(item))
    elif isinstance(item, Simulation):
        exp = item.parent
        if exp is None:
            raise RuntimeError("Simulation missing parent!")
        exp_dir = self.get_directory(exp)
        item_dir = Path(exp_dir, self.entity_display_name(item))
    else:
        raise RuntimeError(f"Get directory is not supported for {type(item)} object on FilePlatform")

    return item_dir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Container Workflow
Projects
None yet
Development

No branches or pull requests

2 participants