File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -913,6 +913,23 @@ def add_gradio_docs(
913913 print (f"New chunks to embed: { len (chunks_to_process )} " )
914914 print (f"Stale entries to remove: { len (stale_ids )} " )
915915
916+ # Log which pages are being updated
917+ if chunks_to_process :
918+ new_pages = {c .source_page_url for c in chunks_to_process }
919+ print (f"\n New/updated pages ({ len (new_pages )} ):" )
920+ for page in sorted (new_pages )[:20 ]: # Show first 20
921+ print (f" + { page } " )
922+ if len (new_pages ) > 20 :
923+ print (f" ... and { len (new_pages ) - 20 } more" )
924+
925+ # Log which IDs are being removed
926+ if stale_ids :
927+ print (f"\n Stale IDs to remove ({ len (stale_ids )} ):" )
928+ for stale_id in sorted (stale_ids )[:20 ]: # Show first 20
929+ print (f" - { stale_id } " )
930+ if len (stale_ids ) > 20 :
931+ print (f" ... and { len (stale_ids ) - 20 } more" )
932+
916933 if len (chunks_to_process ) == 0 and len (stale_ids ) == 0 :
917934 print ("No new Gradio documents to process. All documents are up to date." )
918935 return
Original file line number Diff line number Diff line change @@ -102,6 +102,23 @@ def process_hf_docs_command(args):
102102 print (f"New chunks to embed: { len (chunks_to_process )} " )
103103 print (f"Stale entries to remove: { len (stale_ids )} " )
104104
105+ # Log which pages are being updated
106+ if chunks_to_process :
107+ new_pages = {f"{ c .package_name } /{ c .page } " for c in chunks_to_process }
108+ print (f"\n New/updated pages ({ len (new_pages )} ):" )
109+ for page in sorted (new_pages )[:20 ]: # Show first 20
110+ print (f" + { page } " )
111+ if len (new_pages ) > 20 :
112+ print (f" ... and { len (new_pages ) - 20 } more" )
113+
114+ # Log which pages are being removed
115+ if stale_ids :
116+ print (f"\n Stale IDs to remove ({ len (stale_ids )} ):" )
117+ for stale_id in sorted (stale_ids )[:20 ]: # Show first 20
118+ print (f" - { stale_id } " )
119+ if len (stale_ids ) > 20 :
120+ print (f" ... and { len (stale_ids ) - 20 } more" )
121+
105122 if len (chunks_to_process ) == 0 and len (stale_ids ) == 0 :
106123 print ("\n No new documents to process. All documents are up to date." )
107124 print ("\n " + "=" * 80 )
You can’t perform that action at this time.
0 commit comments