Skip to content

Skip completed LAMMPS tasks in hti/ti run#98

Closed
Yi-FanLi wants to merge 2 commits intodeepmodeling:develfrom
Yi-FanLi:skip-completed-lammps-tasks
Closed

Skip completed LAMMPS tasks in hti/ti run#98
Yi-FanLi wants to merge 2 commits intodeepmodeling:develfrom
Yi-FanLi:skip-completed-lammps-tasks

Conversation

@Yi-FanLi
Copy link
Copy Markdown
Collaborator

@Yi-FanLi Yi-FanLi commented Apr 15, 2026

Summary

  • skip tasks that already have a completed log.lammps in hti.run_task
  • skip tasks that already have a completed log.lammps in ti.run_task
  • print a short message when nothing remains to submit

Completion criterion

A task is treated as complete when log.lammps exists and:

  • the first non-empty line starts with LAMMPS
  • the last non-empty line starts with Total wall time

This avoids resubmitting tasks that have already finished successfully.

Summary by CodeRabbit

  • New Features
    • Runner now automatically detects and excludes completed LAMMPS simulation tasks from processing
    • Determines completion by inspecting each task's log for expected start and end markers
    • If all discovered tasks are already complete, displays a notice and exits early without submitting work

@Yi-FanLi Yi-FanLi closed this Apr 15, 2026
@Yi-FanLi Yi-FanLi deleted the skip-completed-lammps-tasks branch April 15, 2026 15:43
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 15, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 98fc729a-af97-488d-b331-9f96efeeda6f

📥 Commits

Reviewing files that changed from the base of the PR and between 9581c16 and 08b79f2.

📒 Files selected for processing (2)
  • dpti/hti.py
  • dpti/ti.py

📝 Walkthrough

Walkthrough

Both dpti/hti.py and dpti/ti.py now include a helper that detects completed LAMMPS tasks by inspecting log.lammps. Each module's run_task() filters out completed task directories and returns early with a message when no tasks remain to submit.

Changes

Cohort / File(s) Summary
LAMMPS Task Completion Detection
dpti/hti.py, dpti/ti.py
Added _is_completed_lammps_task(task_work_path) which reads log.lammps and returns true only if the file exists, has non-empty lines, the first non-empty line starts with LAMMPS, and the last non-empty line starts with Total wall time. Updated run_task() in both modules to skip directories identified as completed and to print # all tasks already completed; nothing to submit and return early when no tasks remain.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding logic to skip already-completed LAMMPS tasks in both hti and ti run functions.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant