|
14 | 14 | # Below code block is for production use |
15 | 15 | # ------------------------------------------------------------------------------------- |
16 | 16 | # Set up DagsHub credentials for MLflow tracking |
17 | | -# dagshub_token = os.getenv("CAPSTONE_TEST") |
18 | | -# if not dagshub_token: |
19 | | -# raise EnvironmentError("CAPSTONE_TEST environment variable is not set") |
| 17 | +dagshub_token = os.getenv("CAPSTONE_TEST") |
| 18 | +if not dagshub_token: |
| 19 | + raise EnvironmentError("CAPSTONE_TEST environment variable is not set") |
20 | 20 |
|
21 | | -# os.environ["MLFLOW_TRACKING_USERNAME"] = dagshub_token |
22 | | -# os.environ["MLFLOW_TRACKING_PASSWORD"] = dagshub_token |
| 21 | +os.environ["MLFLOW_TRACKING_USERNAME"] = dagshub_token |
| 22 | +os.environ["MLFLOW_TRACKING_PASSWORD"] = dagshub_token |
23 | 23 |
|
24 | | -# dagshub_url = "https://dagshub.com" |
25 | | -# repo_owner = "vikashdas770" |
26 | | -# repo_name = "YT-Capstone-Project" |
27 | | -# # Set up MLflow tracking URI |
28 | | -# mlflow.set_tracking_uri(f'{dagshub_url}/{repo_owner}/{repo_name}.mlflow') |
29 | | -# ------------------------------------------------------------------------------------- |
| 24 | +dagshub_url = "https://dagshub.com" |
| 25 | +repo_owner = "CodeBy-HP" |
| 26 | +repo_name = "Sentiment-Classification-Mlflow-DVC" |
30 | 27 |
|
| 28 | +# Set up MLflow tracking URI |
| 29 | +mlflow.set_tracking_uri(f'{dagshub_url}/{repo_owner}/{repo_name}.mlflow') |
| 30 | +# ------------------------------------------------------------------------------------- |
31 | 31 |
|
32 | 32 | # Below code block is for local use |
33 | 33 | # ------------------------------------------------------------------------------------- |
34 | | -mlflow.set_tracking_uri('https://dagshub.com/CodeBy-HP/Sentiment-Classification-Mlflow-DVC.mlflow') |
35 | | -dagshub.init(repo_owner='CodeBy-HP', repo_name='Sentiment-Classification-Mlflow-DVC', mlflow=True) |
| 34 | +# mlflow.set_tracking_uri('https://dagshub.com/CodeBy-HP/Sentiment-Classification-Mlflow-DVC.mlflow') |
| 35 | +# dagshub.init(repo_owner='CodeBy-HP', repo_name='Sentiment-Classification-Mlflow-DVC', mlflow=True) |
36 | 36 | # ------------------------------------------------------------------------------------- |
37 | 37 |
|
38 | 38 | def load_model_info(file_path: str) -> dict: |
|
0 commit comments