deepmodeling / deepmodeling/dpti

[Code scan] einstein CLI passes the wrong type to free_energy

Open Beginner friendly
#131 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
42
Forks
27
PR merge metrics
No merged PRs in 30d

Description

Source: Codex global repository scan of deepmodeling/dpti at commit b719828e7eeb571bd26411430197cd74ea78e38c.
Project: https://github.com/orgs/deepmodeling/projects/27

Problem
The `dpti.einstein` CLI loads the input JSON into a dict and passes that dict to `free_energy()`. The `free_energy()` API expects a job directory path and immediately calls `os.path.join(job, 'in.json')`, so the CLI path is broken.

Code references
https://github.com/deepmodeling/dpti/blob/b719828e7eeb571bd26411430197cd74ea78e38c/dpti/einstein.py#L58
https://github.com/deepmodeling/dpti/blob/b719828e7eeb571bd26411430197cd74ea78e38c/dpti/einstein.py#L192
https://github.com/deepmodeling/dpti/blob/b719828e7eeb571bd26411430197cd74ea78e38c/dpti/einstein.py#L193

Reproduction
Run:

```bash
python -m dpti.einstein some_input.json
```

Expected result
The CLI should either accept a job directory and pass it through to `free_energy()`, or the API should be changed to accept the loaded JSON consistently.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in dpti/einstein.py at the CLI handling around lines 58, 192, and 193, then inspect free_energy() to confirm its expected argument. Reproduce the failure with `python -m dpti.einstein some_input.json`. Done means the CLI and API agree on the input type and this command no longer passes an incompatible value.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.