Daniel Kantor commited on
Commit
60f8a4b
·
1 Parent(s): 878bf7d

allow submitting models even when requests dataset is empty

Browse files
Files changed (1) hide show
  1. backend/app/services/models.py +4 -4
backend/app/services/models.py CHANGED
@@ -250,9 +250,6 @@ class ModelService(HuggingFaceService):
250
  for line in LogFormatter.stats(stats, "Repository Statistics"):
251
  logger.info(line)
252
 
253
- if not json_files:
254
- raise Exception("No JSON files found in repository")
255
-
256
  # Initialize progress tracker
257
  progress = ProgressTracker(total_files, "PROCESSING FILES")
258
 
@@ -536,7 +533,10 @@ class ModelService(HuggingFaceService):
536
 
537
  # Check that model on hub and valid
538
  valid, error, model_config = await self.validator.is_model_on_hub(
539
- model_data["model_id"], model_data["revision"], model_info.gated, test_tokenizer=True
 
 
 
540
  )
541
  if not valid:
542
  logger.error(LogFormatter.error("Model on hub validation failed", error))
 
250
  for line in LogFormatter.stats(stats, "Repository Statistics"):
251
  logger.info(line)
252
 
 
 
 
253
  # Initialize progress tracker
254
  progress = ProgressTracker(total_files, "PROCESSING FILES")
255
 
 
533
 
534
  # Check that model on hub and valid
535
  valid, error, model_config = await self.validator.is_model_on_hub(
536
+ model_data["model_id"],
537
+ model_data["revision"],
538
+ model_info.gated,
539
+ test_tokenizer=True,
540
  )
541
  if not valid:
542
  logger.error(LogFormatter.error("Model on hub validation failed", error))