Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion benchmarks/benchmark/base_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ def _initialize_ray_cluster(self):
" ✓ Ray connected to existing cluster (auto-detected)",
style=success_style,
)
except:
except Exception:
# Fallback to local mode
console.print(
" [yellow]No existing cluster found, initializing local mode...[/yellow]",
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/benchmark/tasks/v1_0/base_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ def _process_dataframe(self, df: pd.DataFrame) -> Dict[str, Dict[str, Any]]:
if isinstance(messages, str):
try:
messages = json.loads(messages)
except:
except Exception:
console.print(f"Sample {sample_id}: failed to parse messages, skipping")
continue

Expand All @@ -317,7 +317,7 @@ def _process_dataframe(self, df: pd.DataFrame) -> Dict[str, Dict[str, Any]]:
if isinstance(metadata_raw, str):
try:
metadata_dict = json.loads(metadata_raw)
except:
except Exception:
console.print(f"Sample {sample_id}: failed to parse metadata, skipping")
continue
elif isinstance(metadata_raw, dict):
Expand Down
6 changes: 3 additions & 3 deletions pretrain/onerec_llm/data/qwen3_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def __init__(self, **kwargs):

try:
model_config = AutoConfig.from_pretrained(self.kwargs.base_model_dir)
except:
except Exception:
model_config = Qwen3Config.from_pretrained(self.kwargs.base_model_dir)

self.pad_token_id = model_config.pad_token_id
Expand Down Expand Up @@ -477,14 +477,14 @@ def __iter__(self):

try:
source_name = sample["json"]["source"]
except:
except Exception:
source_name = "None"

self.source_sample_cnt.setdefault(source_name, 0)
self.source_sample_cnt[source_name] += 1

inputs = self._process(sample, source_name)
except:
except Exception:
self.source_error_cnt.setdefault(source_name, 0)
self.source_error_cnt[source_name] += 1
error_ratio = self.source_error_cnt[source_name] * 1.0 / \
Expand Down
2 changes: 1 addition & 1 deletion pretrain/onerec_llm/utils/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
def print_rank_n(*msg, rank=0):
try:
_rank = dist.get_rank()
except:
except Exception:
_rank = 0
if _rank == rank:
print(*msg)
Expand Down
2 changes: 1 addition & 1 deletion pretrain/onerec_llm/utils/data_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def _load_parquet_from_hdfs(
print(f"Warning: Cached file {cache_path} is corrupted, removing: {e}")
try:
os.remove(cache_path)
except:
except Exception:
pass

# Download from HDFS with retry
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def normalize_answer(answer: Optional[str]) -> Optional[str]:
if m is not None:
answer = m.group("text").strip()
return _strip_string(answer)
except: # noqa: E722
except Exception: # noqa: E722
return answer


Expand All @@ -67,7 +67,7 @@ def _fix_fracs(string):
else:
try:
assert len(substr) >= 2
except: # noqa: E722
except Exception: # noqa: E722
return string
a = substr[0]
b = substr[1]
Expand Down Expand Up @@ -98,7 +98,7 @@ def _fix_a_slash_b(string):
assert string == "{}/{}".format(a, b)
new_string = "\\frac{" + str(a) + "}{" + str(b) + "}"
return new_string
except: # noqa: E722
except Exception: # noqa: E722
return string


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ async def code_execution(self, request: Request):
finally:
try:
os.unlink(temp_file)
except: # noqa: E722
except Exception: # noqa: E722
pass

async def _start_fastapi_server(self):
Expand Down
4 changes: 2 additions & 2 deletions verl_rl/verl/utils/reward_score/math.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def fix_fracs(string):
else:
try:
assert len(substr) >= 2
except: # noqa: E722
except Exception: # noqa: E722
return string
a = substr[0]
b = substr[1]
Expand Down Expand Up @@ -130,7 +130,7 @@ def fix_a_slash_b(string):
assert string == "{}/{}".format(a, b)
new_string = "\\frac{" + str(a) + "}{" + str(b) + "}"
return new_string
except: # noqa: E722
except Exception: # noqa: E722
return string


Expand Down
6 changes: 3 additions & 3 deletions verl_rl/verl/utils/reward_score/prime_math/math_normalize.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def normalize_answer(answer: Optional[str]) -> Optional[str]:
if m is not None:
answer = m.group("text").strip()
return _strip_string(answer)
except: # noqa: E722
except Exception: # noqa: E722
return answer


Expand All @@ -67,7 +67,7 @@ def _fix_fracs(string):
else:
try:
assert len(substr) >= 2
except: # noqa: E722
except Exception: # noqa: E722
return string
a = substr[0]
b = substr[1]
Expand Down Expand Up @@ -98,7 +98,7 @@ def _fix_a_slash_b(string):
assert string == "{}/{}".format(a, b)
new_string = "\\frac{" + str(a) + "}{" + str(b) + "}"
return new_string
except: # noqa: E722
except Exception: # noqa: E722
return string


Expand Down