두가지 달라지는 모드에서 바뀌는 레이어 전부 리스트업해봐
- drop out
- bathroom(?)
한글로 대답해
from tqdm import tqdm
prevent redundant print on notebook
from tqdm.noteboook import tqdm
if __name__ == "__main__": # --- Task 1: Evaluating Retrieval Quality (AP and NDCG) --- print("\n--- Task 1: Evaluation Metrics ---") # --- Evaluate BM25 on Validation Data --- print("Evaluating BM25 on validation data...") bm25_val_predictions = {} validation_queries = validation_df[['qid', 'queries']].drop_duplicates() for qid, group in tqdm(validation_df.groupby('qid'), desc="Scoring validation with BM25"): query_text = group['queries'].iloc[0] # Get query text for this qid query_tokens = tokenize(query_text) scored_passages = [] for _, row in group.iterrows(): pid = row['pid'] # Use the BM25 model fitted on train+val data score = bm25_model.score(query_tokens, pid) scored_passages.append((pid, score)) # Sort passages by score descending scored_passages.sort(key=lambda x: x[1], reverse=True) bm25_val_predictions[qid] = scored_passages
tqdm 사용법 - python 진행률 프로세스바
파이썬으로 어떤 작업을 수행중인데, 프로그램이 내가 의도한 데로 돌아가고 있는 중인가, 진행상황이 궁금할 때가 있다. 시간이 걸리는 작업의 경우에 더 이런 상태 확인이 필요하다. 파이썬 모듈중에 tqdm이라는 것이 이 용도로 쓰이고 있다. 사용법 tqdm is very versatile and can be used in a number of ways. The three main ones are given below. tqdm은 아주 변하기 쉽고 많은 방법으로 사용될 수 있다. 아래 세가지 주요 방법들이 있다. Iterable-based Wrap tqdm() around any iterable: 어느 이터러블이든 tqdm()로 감싼다. 리스트도 가능. 이터러블이 증가하는 것에 따라서, 진행률 증가. fro..
https://skillmemory.tistory.com/entry/tqdm-사용법-python-진행률-프로세스바

Seonglae Cho