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

migrate archive code into repo layer #352

Closed
ryanSoley opened this issue Apr 20, 2023 · 1 comment
Closed

migrate archive code into repo layer #352

ryanSoley opened this issue Apr 20, 2023 · 1 comment
Assignees
Labels
development Issues that require technical work. Associated PRs are required. enhancement Issues & PRs that capture enhancements to existing features. Issues require associated PRs.

Comments

@ryanSoley
Copy link
Member

Is your enhancement request related to a problem? Please describe

the new archiving functionality leverages a lot of repo layer functionality in the client

Describe the solution you'd like

the majority of the archiving code, specifically anything leveraging the repo directly, should be moved into the repo layer on the BaseRepository object

Additional context

the remaining client code should probably look something like this. it may be necessary to leave other things in or generate inputs at the client level that I'm not noticing at the moment

    @failsafe
    def archive(
        self, experiments: Optional[List[Experiment]] = None, remote_root: Optional[str] = None
    ):
        if len(self.experiments()) == 0:
            raise ValueError("`project` has no logged `experiments` to archive")
        if experiments is not None:
            if not isinstance(experiments, list) or not all(
                [isinstance(experiment, Experiment) for experiment in experiments]
            ):
                raise ValueError(
                    "`experiments` must be `list` of type `rubicon_ml.client.Experiment`"
                )

        zip_archive_filename = self.repository.archive(**required_args)

        return zip_archive_filename

    @failsafe
    def experiments_from_archive(self, remote_root: str, latest_only: Optional[bool] = False):
        self.repository.read_archive(**required_args)
@ryanSoley ryanSoley added enhancement Issues & PRs that capture enhancements to existing features. Issues require associated PRs. development Issues that require technical work. Associated PRs are required. labels Apr 20, 2023
@ryanSoley
Copy link
Member Author

closed with #355

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development Issues that require technical work. Associated PRs are required. enhancement Issues & PRs that capture enhancements to existing features. Issues require associated PRs.
Projects
None yet
Development

No branches or pull requests

2 participants