Skip to content

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

Open

Description

@njzjz

Source: Codex global repository scan of deepmodeling/dpti at commit b719828.
Project: DeepModeling Agent Code Scan

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

with open(os.path.join(job, 'in.json')) as f:

jdata = json.load(open(args.PARAM))

fe = free_energy(jdata)

Reproduction
Run:

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.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions