Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RssMaker does not work as expected #329

Open
naik-aakash opened this issue Jan 10, 2025 · 6 comments
Open

RssMaker does not work as expected #329

naik-aakash opened this issue Jan 10, 2025 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@naik-aakash
Copy link
Collaborator

Steps to reproduce

Note: The config file used for this example is from our recent RSS preprint

from autoplex.auto.rss.flows import RssMaker
from jobflow import run_locally

rss_job = RssMaker(name="test rss").make(config_file="/home/anaik/Work/Dev_Codes/autoplex/tests/test_data/rss/si.yaml")

run_locally(rss_job)

Error Traceback

/home/anaik/miniconda3/envs/autoplex_dev/bin/python /home/anaik/Work/Dev_Codes/autoplex/rss_wf.py 
/home/anaik/miniconda3/envs/autoplex_dev/lib/python3.10/site-packages/nequip/__init__.py:20: UserWarning:

!! PyTorch version 2.2.1+cu121 found. Upstream issues in PyTorch versions 1.13.* and 2.* have been seen to cause unusual performance degredations on some CUDA systems that become worse over time; see https://github.com/mir-group/nequip/discussions/311. The best tested PyTorch version to use with CUDA devices is 1.11; while using other versions if you observe this problem, an unexpected lack of this problem, or other strange behavior, please post in the linked GitHub issue.

2025-01-10 20:24:57,918 - INFO - Started executing jobs locally
2025-01-10 20:24:57,925 - INFO - Starting job - test rss (c560d438-d381-429d-9bcf-d317e51c4797)
2025-01-10 20:24:57,918 INFO Started executing jobs locally
2025-01-10 20:24:57,925 INFO Starting job - test rss (c560d438-d381-429d-9bcf-d317e51c4797)
2025-01-10 20:24:58,141 - INFO - Finished job - test rss (c560d438-d381-429d-9bcf-d317e51c4797)
2025-01-10 20:24:58,143 - INFO - Starting job - initial_rss (d202bb3c-4bcd-47a5-b721-4706ee0c8149)
2025-01-10 20:24:58,148 - INFO - initial_rss failed with exception:
Traceback (most recent call last):
  File "/home/anaik/miniconda3/envs/autoplex_dev/lib/python3.10/site-packages/jobflow/managers/local.py", line 114, in _run_job
    response = job.run(store=store)
  File "/home/anaik/miniconda3/envs/autoplex_dev/lib/python3.10/site-packages/jobflow/core/job.py", line 600, in run
    response = function(*self.function_args, **self.function_kwargs)
  File "/home/anaik/Work/Dev_Codes/autoplex/src/autoplex/auto/rss/jobs.py", line 215, in initial_rss
    do_mlip_fit = MLIPFitMaker(
  File "/home/anaik/Work/Dev_Codes/autoplex/src/autoplex/fitting/common/flows.py", line 205, in make
    mlip_fit_job = machine_learning_fit(
TypeError: autoplex.fitting.common.jobs.machine_learning_fit() got multiple values for keyword argument 'database_dir'

2025-01-10 20:24:58,148 - INFO - Finished executing jobs locally
2025-01-10 20:24:58,141 INFO Finished job - test rss (c560d438-d381-429d-9bcf-d317e51c4797)
2025-01-10 20:24:58,143 INFO Starting job - initial_rss (d202bb3c-4bcd-47a5-b721-4706ee0c8149)
2025-01-10 20:24:58,148 INFO initial_rss failed with exception:
Traceback (most recent call last):
  File "/home/anaik/miniconda3/envs/autoplex_dev/lib/python3.10/site-packages/jobflow/managers/local.py", line 114, in _run_job
    response = job.run(store=store)
  File "/home/anaik/miniconda3/envs/autoplex_dev/lib/python3.10/site-packages/jobflow/core/job.py", line 600, in run
    response = function(*self.function_args, **self.function_kwargs)
  File "/home/anaik/Work/Dev_Codes/autoplex/src/autoplex/auto/rss/jobs.py", line 215, in initial_rss
    do_mlip_fit = MLIPFitMaker(
  File "/home/anaik/Work/Dev_Codes/autoplex/src/autoplex/fitting/common/flows.py", line 205, in make
    mlip_fit_job = machine_learning_fit(
TypeError: autoplex.fitting.common.jobs.machine_learning_fit() got multiple values for keyword argument 'database_dir'

2025-01-10 20:24:58,148 INFO Finished executing jobs locally

Process finished with exit code 0
@naik-aakash naik-aakash added the bug Something isn't working label Jan 10, 2025
@naik-aakash
Copy link
Collaborator Author

naik-aakash commented Jan 10, 2025

Seems this change on main branch is the issue. The argument is now a class attribute rather than arg to Make

database_dir: Path | str | None = None,

@JaGeo
Copy link
Collaborator

JaGeo commented Jan 12, 2025

Independent of the bug, I think it makes sense to keep it as a part of the make to easily reuse this maker.

@QuantumChemist
Copy link
Collaborator

I guess this went under my radar when I made the changes because the RssMaker is not properly included in the unit tests and we are using mock_rss instead.

@JaGeo
Copy link
Collaborator

JaGeo commented Jan 13, 2025

@QuantumChemist yes, this can surely happen. Thus, tests for this specific Maker are needed.

@YuanbinLiu
Copy link
Collaborator

Some new users have also encountered this issue, and I will check it as soon as possible. We may also need to find a way to fix the random seed in buildcell, otherwise it's impossible to provide a complete unit test for RssMaker.

@JaGeo
Copy link
Collaborator

JaGeo commented Jan 15, 2025

As mentioned previously, we can ommit the test of the POSCAR. Then, we can provide a test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants