Spaces:
Sleeping
Sleeping
Download server/src/entity/config_entity.py from VashuTheGreat2/ML-Learner: direct link, hf CLI and curl.
- Browser
- Download file 2.91 kB
-
https://huggingface.co/spaces/VashuTheGreat2/ML-Learner/resolve/main/server/src/entity/config_entity.py
- Command line
-
hf download hf://spaces/VashuTheGreat2/ML-Learner/server/src/entity/config_entity.py
-
curl -L -o config_entity.py https://huggingface.co/spaces/VashuTheGreat2/ML-Learner/resolve/main/server/src/entity/config_entity.py
2.91 kB
| from dataclasses import dataclass, field | |
| from typing import List | |
| from src.constants import * | |
| import uuid | |
| import os | |
| import time | |
| BASE_FOLDER_NAME=f"artifacts/{time.time()}" | |
| class DummyInterviewConfig: | |
| no_of_interviews: int = DEFAULT_NO_OF_INTERVIEWS | |
| fields: List[str] = field(default_factory=lambda: DEFAULT_FIELDS.copy()) | |
| updated: bool = DEFAULT_UPDATED | |
| companiesName: List[str] = field(default_factory=lambda: DEFAULT_COMPANIES_NAME.copy()) | |
| INTERVIEW_JSON_FILE_PATH: str = INTERVIEW_JSON_FILE_PATH | |
| class InterviewPerformanceConfig: | |
| thread_id: str | |
| from dataclasses import dataclass, field | |
| from typing import List | |
| from src.constants import * | |
| class JobFetcherConfig: | |
| no_of_jobs: int = DEFAULT_NO_OF_JOBS | |
| web_driver_wait:int=WEB_DRIVER_WAIT | |
| target_url:str=LINKED_IN_TARGET_URL | |
| saved_jobs_file_path:str=SAVED_JOBS_FILE_PATH | |
| saved_cookie_path:str=DEFAULT_SAVE_COOKIE_PATH | |
| headless: bool = False | |
| from dataclasses import dataclass | |
| from src.constants import * | |
| class JobSimilarityModelConfig: | |
| model_uri: str=MLFLOW_MODEL_URI | |
| local_model_path: str=MLFLOW_DOWNLOADED_MODEL_PATH | |
| mlflow_tracking_uri:str=MLFLOW_TRACKING_URI | |
| mlflow_username:str=MLFLOW_TRACKING_USERNAME | |
| mlflow_password:str=MLFLOW_TRACKING_PASSWORD | |
| class JobSimilarityPredictionnConfig: | |
| pass | |
| pass | |
| class JobSimilaritynValidationConfig: | |
| pass | |
| class JobSimilaritynTrainingConfig: | |
| pass | |
| class DataIngestionConfig: | |
| input_file_path: str | |
| save_file_path: str = field(default=None) | |
| def __post_init__(self): | |
| if self.save_file_path is None: | |
| # Generate a random UUID for the ingested file name | |
| random_name = f"{uuid.uuid4()}.pdf" | |
| self.save_file_path = os.path.join(BASE_FOLDER_NAME, INGESTION_FOLDER_NAME, random_name) | |
| class ContentEmbedderConfig: | |
| data_ingestion_configs:List[DataIngestionConfig] | |
| class DataTransformationConfig: | |
| vector_store_path: str = field(default=None) | |
| def __post_init__(self): | |
| if self.vector_store_path is None: | |
| self.vector_store_path = os.path.join(BASE_FOLDER_NAME, "transformation", "vector_store") | |
| class ContentTransformationConfig: | |
| data_transformation_configs: List[DataTransformationConfig] | |
| class RetreiverConfig: | |
| vector_store_path: str = field(default=None) | |
| k: int = 5 | |
| ensemble_weights: List[float] = field(default_factory=lambda: [0.7, 0.3]) | |
| partition_strategy: str = "hi_res" | |
| max_characters: int = 3000 | |
| new_after_n_chars: int = 2400 | |
| combine_text_under_n_chars: int = 50 | |
| def __post_init__(self): | |
| if self.vector_store_path is None: | |
| self.vector_store_path = os.path.join(BASE_FOLDER_NAME, "transformation", "vector_store") |