diff --git a/rubicon_ml/client/rubicon.py b/rubicon_ml/client/rubicon.py index eec35699..7842a799 100644 --- a/rubicon_ml/client/rubicon.py +++ b/rubicon_ml/client/rubicon.py @@ -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, @@ -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: