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

Multiple backends refactor #396

Merged
merged 8 commits into from
Nov 28, 2023
Merged

Multiple backends refactor #396

merged 8 commits into from
Nov 28, 2023

Conversation

stephenpardy
Copy link
Contributor


What

  • Simplifies the multiple backends setup so that users pass in multiple Config options.

How to Test

  • Running existing unit tests

Copy link
Member

@ryanSoley ryanSoley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking good so far!

Comment on lines -52 to -66
if storage_options is not None and "composite_config" in storage_options:
composite_config = storage_options.get("composite_config", [])
repositories = []
for config in composite_config:
self.persistence, self.root_dir, self.is_auto_git_enabled = self._load_config(
config["persistence"], config["root_dir"], is_auto_git_enabled
)
repositories.append(self._get_repository())

self.repositories = repositories
else:
self.persistence, self.root_dir, self.is_auto_git_enabled = self._load_config(
persistence, root_dir, is_auto_git_enabled
)
self.repository = self._get_repository()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 awesome, this is exactly what I wanted to clean up

rubicon_ml/client/rubicon.py Outdated Show resolved Hide resolved
@stephenpardy stephenpardy marked this pull request as ready for review November 16, 2023 20:02
@stephenpardy stephenpardy requested a review from a team as a code owner November 16, 2023 20:02
Comment on lines 46 to 50
Config(
persistence=config["persistence"],
root_dir=config["root_dir"],
auto_git_enabled=auto_git_enabled,
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this also needs **storage_options

I think we should ultimately just make users pass a list of Configs if they want to use multiple backends - what do you think? we don't need to do it in this PR

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. Yes I was hoping to split this into two PRs. This one is mostly backwards compatible, and that change would require an API change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also the fact that this didn't cause any unit tests to fail indicates a gap - let me address that before we merge here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I was hoping to split this into two PRs. This one is mostly backwards compatible, and that change would require an API change.

perfect, sounds good!

Also the fact that this didn't cause any unit tests to fail indicates a gap - let me address that before we merge here.

thanks!

Copy link
Member

@ryanSoley ryanSoley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome, thanks!

@stephenpardy stephenpardy merged commit d010369 into main Nov 28, 2023
6 checks passed
@stephenpardy stephenpardy deleted the multiple_backends_refactor branch November 28, 2023 15:42
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

Successfully merging this pull request may close these issues.

2 participants