Skip to content

fix: use prepared CALYPSO model by default - #378

Open
njzjz wants to merge 1 commit into
deepmodeling:masterfrom
njzjz-bot:fix/issue-352-calypso-model-command
Open

fix: use prepared CALYPSO model by default#378
njzjz wants to merge 1 commit into
deepmodeling:masterfrom
njzjz-bot:fix/issue-352-calypso-model-command

Conversation

@njzjz

@njzjz njzjz commented Aug 23, 2026

Copy link
Copy Markdown
Member

Summary

  • detect the backend-specific model filename prepared for a CALYPSO optimization task
  • build the default command with frozen_model.pb or model.ckpt.pt accordingly
  • verify the TensorFlow default command in the operator test

Tests

  • PYTHONPATH=tests python -m unittest -v tests.op.test_run_caly_dp_optim.TestRunDPOptim.test_00_success
  • git diff --check

Closes #352

Coding agent: Codex
Codex version: codex-cli 0.149.0
Model: gpt-5.6-sol
Reasoning effort: xhigh

Summary by CodeRabbit

  • New Features

    • Added support for running Calypso DP optimization tasks.
    • Automatically prepares inputs, executes optimization, and collects optimization and trajectory outputs.
    • Completed tasks are recognized and skipped without generating duplicate results.
  • Bug Fixes

    • Failed optimization runs now report transient errors for retry handling.
  • Tests

    • Added coverage for successful runs, failures, output collection, and completed-task handling.

Build the default optimization command from the TensorFlow or PyTorch model filename prepared for the task.

Closes deepmodeling#352

Coding-Agent: Codex
Codex-Version: codex-cli 0.149.0
Model: gpt-5.6-sol
Reasoning-Effort: xhigh
@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Aug 23, 2026
@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b786d987-abf9-4f5e-b036-fa11f6c890f2

📥 Commits

Reviewing files that changed from the base of the PR and between b05af11 and 6ea87da.

📒 Files selected for processing (2)
  • dpgen2/op/run_caly_dp_optim.py
  • tests/op/test_run_caly_dp_optim.py

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

Adds RunCalyDPOptim to prepare and execute Calypso DP optimization. The operation detects supported model files, handles unfinished and finished tasks, collects optimization and trajectory artifacts, returns result paths, and includes tests for success and failure paths.

Changes

Calypso DP optimization

Layer / File(s) Summary
Operation contract and command setup
dpgen2/op/run_caly_dp_optim.py
Defines operation inputs and outputs, resolves task files, detects frozen_model.pb or model.ckpt.pt, and builds the optimization command.
Optimization execution and failure handling
dpgen2/op/run_caly_dp_optim.py
Links inputs into the work directory, skips finished tasks, executes unfinished tasks, and raises TransientError on command failure.
Artifact collection and validation
dpgen2/op/run_caly_dp_optim.py, tests/op/test_run_caly_dp_optim.py
Collects optimization and trajectory outputs, creates empty result directories for finished tasks, returns artifact paths, and tests success, failure, and completed-task behavior.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 6ea87

The change selects the backend-specific prepared CALYPSO model for the default command; no actionable merge-blocking risk remains at the current head, so it is merge-ready after normal checks and review.

Sequence Diagram(s)

sequenceDiagram
  participant TaskInput
  participant RunCalyDPOptim
  participant Calypso
  participant ResultArtifacts
  TaskInput->>RunCalyDPOptim: provide configuration and task metadata
  RunCalyDPOptim->>RunCalyDPOptim: resolve model and link inputs
  RunCalyDPOptim->>Calypso: execute optimization command
  Calypso-->>RunCalyDPOptim: return status and generated files
  RunCalyDPOptim->>ResultArtifacts: copy optimization and trajectory outputs
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: using the prepared CALYPSO model as the default.
Linked Issues check ✅ Passed The implementation selects the prepared backend-specific model filename and tests the TensorFlow default command, satisfying issue #352.
Out of Scope Changes check ✅ Passed The changes are limited to the CALYPSO optimization operator and focused tests required to implement and verify issue #352.
Docstring Coverage ✅ Passed Docstring check was indeterminate for this PR — some files could not be analyzed in time. Not blocking.
✨ Finishing Touches 💡 1
⚔️ Resolve merge conflicts 💡
  • Resolve merge conflict in branch fix/issue-352-calypso-model-command

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.

wanghan-iapcm

This comment was marked as outdated.

@wanghan-iapcm
wanghan-iapcm dismissed their stale review August 27, 2026 04:11

Retracted. This review was produced without running the mandated /code-review fan-out (the loop skill's section 2); the substitute process used instead has since been shown to miss findings and, in one case, to state a verified-sounding falsehood. Re-reviewing properly.

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

Labels

size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Code scan] Align CALYPSO DP optimization default command with prepared model file

3 participants