LPX commited on
Commit
87fc2bb
·
1 Parent(s): 0f427f3

fix: enable dataset logging to Hugging Face Hub by uncommenting push_to_hub functionality

Browse files
Files changed (1) hide show
  1. utils/hf_logger.py +3 -3
utils/hf_logger.py CHANGED
@@ -11,7 +11,7 @@ import numpy as np
11
 
12
  logger = logging.getLogger(__name__)
13
 
14
- HF_DATASET_NAME = "aiwithoutborders-xyz/degentic_rd0" # TODO: Replace with your actual HF username and dataset name
15
 
16
  # Custom JSON Encoder to handle numpy types (copy from app_mcp.py if it's identical)
17
  class NumpyEncoder(json.JSONEncoder):
@@ -125,8 +125,8 @@ def log_inference_data(
125
  logger.info("Inference data logged successfully to local cache.")
126
 
127
  # To push to hub, uncomment the line below and ensure HF_DATASET_NAME is set correctly and you are logged in
128
- # updated_dataset.push_to_hub(HF_DATASET_NAME, private=True)
129
- # logger.info("Inference data pushed to Hugging Face Hub.")
130
 
131
  except Exception as e:
132
  logger.error(f"Failed to log inference data to Hugging Face dataset: {e}")
 
11
 
12
  logger = logging.getLogger(__name__)
13
 
14
+ HF_DATASET_NAME = "aiwithoutborders-xyz/degentic_rd0"
15
 
16
  # Custom JSON Encoder to handle numpy types (copy from app_mcp.py if it's identical)
17
  class NumpyEncoder(json.JSONEncoder):
 
125
  logger.info("Inference data logged successfully to local cache.")
126
 
127
  # To push to hub, uncomment the line below and ensure HF_DATASET_NAME is set correctly and you are logged in
128
+ updated_dataset.push_to_hub(HF_DATASET_NAME, private=True)
129
+ logger.info("Inference data pushed to Hugging Face Hub.")
130
 
131
  except Exception as e:
132
  logger.error(f"Failed to log inference data to Hugging Face dataset: {e}")