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
1 change: 0 additions & 1 deletion OpenMLE-ERL/RL/generate_mle.py
Original file line number Diff line number Diff line change
Expand Up @@ -1053,7 +1053,6 @@ async def generate(args, sample: Sample, sampling_params, evaluation) -> Sample:
# )

# Check if we already have a cached parent selection for this group
global _parent_selection_cache
cache_key = None if evaluation else group_index
secondary_parent_program = None
selection_metadata = {}
Expand Down
2 changes: 0 additions & 2 deletions OpenMLE-ERL/SFT/slime/slime/rollout/sglang_rollout.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,8 +491,6 @@ async def eval_rollout_single_dataset(
"""
assert not args.group_rm, "Group RM is not supported for eval rollout"

global EVAL_PROMPT_DATASET

cache_key = dataset_cfg.cache_key + (args.hf_checkpoint, args.apply_chat_template)
if cache_key not in EVAL_PROMPT_DATASET:
tokenizer = load_tokenizer(args.hf_checkpoint, trust_remote_code=True)
Expand Down
1 change: 0 additions & 1 deletion OpenMLE-ERL/SFT/slime/slime/utils/distributed_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ def init_gloo_group():

def get_gloo_group():
"""Get the Gloo group for distributed communication."""
global GLOO_GROUP
if GLOO_GROUP is None:
raise RuntimeError("Gloo group has not been initialized. Call _init_gloo_group() first.")
return GLOO_GROUP
Expand Down
3 changes: 1 addition & 2 deletions OpenMLE-ERL/SFT/tts_search/reward_func_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -585,5 +585,4 @@ def format_sandbox_feedback(status_code: int, payload: dict) -> str:


if __name__ == "__main__":
# Test score2reward for all tasks
test_score2reward()
pass
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,8 @@ def get_db_connection():
try:
if not conn.closed:
conn.rollback()
except Exception:
pass
except Exception as e:
logger.warning(f"Error rolling back connection: {e}")
_DB_POOL.putconn(conn)


Expand Down Expand Up @@ -842,8 +842,8 @@ def cancel_job(job_id: str, api_key: str = Depends(verify_api_key)):
if removed:
break
redis_client.setex(f"job:{job_id}:cancelled", 3600, "1")
except Exception:
pass
except Exception as e:
logger.error(f"Error cancelling job {job_id} in Redis: {e}")

return {"message": "Job cancelled successfully", "removed_from_queue": removed}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -626,13 +626,13 @@ def to_builtin(value):
if hasattr(value, "model_dump"):
try:
return to_builtin(value.model_dump())
except Exception:
pass
except Exception as e:
print(f"Warning: Failed to convert model_dump for {type(value)}: {e}")
if hasattr(value, "dict"):
try:
return to_builtin(value.dict())
except Exception:
pass
except Exception as e:
print(f"Warning: Failed to convert dict for {type(value)}: {e}")
if hasattr(value, "__dict__"):
return {
k: to_builtin(v)
Expand Down