davidberenstein1957 HF staff commited on
Commit
ab34078
·
1 Parent(s): 2079b17

fix argilla validation

Browse files
src/synthetic_dataset_generator/constants.py CHANGED
@@ -9,7 +9,7 @@ SFT_TASK = "supervised_fine_tuning"
9
 
10
  # Hugging Face
11
  HF_TOKEN = os.getenv("HF_TOKEN")
12
- if HF_TOKEN is None:
13
  raise ValueError(
14
  "HF_TOKEN is not set. Ensure you have set the HF_TOKEN environment variable that has access to the Hugging Face Hub repositories and Inference Endpoints."
15
  )
@@ -70,8 +70,8 @@ if ARGILLA_API_URL is None or ARGILLA_API_KEY is None:
70
  ARGILLA_API_URL = os.getenv("ARGILLA_API_URL_SDG_REVIEWER")
71
  ARGILLA_API_KEY = os.getenv("ARGILLA_API_KEY_SDG_REVIEWER")
72
 
73
- if ARGILLA_API_URL is None or ARGILLA_API_KEY is None:
74
- warnings.warn("ARGILLA_API_URL or ARGILLA_API_KEY is not set")
75
  argilla_client = None
76
  else:
77
  argilla_client = rg.Argilla(
 
9
 
10
  # Hugging Face
11
  HF_TOKEN = os.getenv("HF_TOKEN")
12
+ if not HF_TOKEN:
13
  raise ValueError(
14
  "HF_TOKEN is not set. Ensure you have set the HF_TOKEN environment variable that has access to the Hugging Face Hub repositories and Inference Endpoints."
15
  )
 
70
  ARGILLA_API_URL = os.getenv("ARGILLA_API_URL_SDG_REVIEWER")
71
  ARGILLA_API_KEY = os.getenv("ARGILLA_API_KEY_SDG_REVIEWER")
72
 
73
+ if not ARGILLA_API_URL or not ARGILLA_API_KEY:
74
+ warnings.warn("ARGILLA_API_URL or ARGILLA_API_KEY is not set or is empty")
75
  argilla_client = None
76
  else:
77
  argilla_client = rg.Argilla(