Skip to content

Commit

Permalink
fix(project): integrate composer into projectConfig class
Browse files Browse the repository at this point in the history
  • Loading branch information
entelecheia committed Aug 6, 2023
1 parent 492bdc5 commit a0c0eec
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/hyfi/project/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@
from pathlib import Path
from typing import Optional, Union

from hyfi.composer import BaseConfig, field_validator
from hyfi.composer import BaseConfig, Composer, field_validator
from hyfi.dotenv import DotEnvConfig
from hyfi.joblib import JobLibConfig
from hyfi.path.project import ProjectPathConfig
from hyfi.utils.logging import LOGGING
from hyfi.utils.notebooks import NBs

logger = LOGGING.getLogger(__name__)
logger = Composer.getLogger(__name__)


class ProjectConfig(BaseConfig):
class ProjectConfig(BaseConfig, Composer):
"""Project Config"""

_config_name_: str = "__init__"
Expand Down Expand Up @@ -142,7 +140,7 @@ def init_huggingface_hub(self):

local_token = HfFolder.get_token()
if local_token is None:
if NBs.is_notebook():
if ProjectConfig.is_notebook():
notebook_login()
else:
logger.info(
Expand Down

0 comments on commit a0c0eec

Please sign in to comment.