Skip to content

Commit

Permalink
Add in git method
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenpardy committed Nov 16, 2023
1 parent 4700ea9 commit be16377
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion rubicon_ml/client/rubicon.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,16 @@ def _get_github_url(self):

return github_url

def is_auto_git_enabled(self) -> bool:
"""Is git enabled for any of the configs."""
if isinstance(self.configs, list):
return any(_config.is_auto_git_enabled for _config in self.configs)

if self.configs is None:
return False

return self.configs.is_auto_git_enabled

def _create_project_domain(
self,
name: str,
Expand All @@ -105,7 +115,7 @@ def _create_project_domain(
training_metadata: Optional[Union[List[Tuple], Tuple]],
):
"""Instantiates and returns a project domain object."""
if self.config.is_auto_git_enabled and github_url is None:
if self.is_auto_git_enabled and github_url is None:
github_url = self._get_github_url()

if training_metadata is not None:
Expand Down

0 comments on commit be16377

Please sign in to comment.