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

check_completion command didn't work #170

Open
FariborzDaneshvar-NOAA opened this issue Aug 21, 2024 · 7 comments
Open

check_completion command didn't work #170

FariborzDaneshvar-NOAA opened this issue Aug 21, 2024 · 7 comments
Assignees

Comments

@FariborzDaneshvar-NOAA
Copy link

I have a conda environment with these packages:

coupledmodeldriver   1.7.1.post1   
ensembleperturbation 1.3.1 
stormevents          2.2.5

The check_completion command failed with this error:

[2024-08-21 08:49:18,512] /work2/noaa/nos-surge/daneshva/miniconda3/envs/stormwf_v002/lib/python3.11/site-packages/coupledmodeldriver/_depend.py WARNING : can't find the 'adcircpy' module
/work2/noaa/nos-surge/daneshva/miniconda3/envs/stormwf_v002/lib/python3.11/site-packages/pyschism/forcing/hycom/gofs.py:8: 
UserWarning: The seawater library is deprecated! Please use gsw instead.                                             
  import seawater as sw                                                                                                
[2024-08-21 08:49:21,648] /work2/noaa/nos-surge/daneshva/miniconda3/envs/stormwf_v002/lib/python3.11/site-packages/coupledmodeldriver/_depend.py WARNING : can't find the 'adcircpy' module                                                   
[2024-08-21 08:49:21,651] /work2/noaa/nos-surge/daneshva/miniconda3/envs/stormwf_v002/lib/python3.11/site-packages/coupledmodeldriver/_depend.py WARNING : can't find the 'adcircpy' module                                                   
[2024-08-21 08:49:21,654] /work2/noaa/nos-surge/daneshva/miniconda3/envs/stormwf_v002/lib/python3.11/site-packages/coupledmodeldriver/_depend.py WARNING : can't find the 'adcircpy' module                                                   
Traceback (most recent call last):                                                                                       
    File "/work2/noaa/nos-surge/daneshva/miniconda3/envs/stormwf_v002/bin/check_completion", line 8, in <module>
       sys.exit(main())                                                                                                                
                    ^^^^^^                                                                                                      
    File "/work2/noaa/nos-surge/daneshva/miniconda3/envs/stormwf_v002/lib/python3.11/site-packages/coupledmodeldriver/client/check_completion.py", line 206, in main
       completion_status = check_completion(**parse_check_completion_arguments())
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^        
    File "/work2/noaa/nos-surge/daneshva/miniconda3/envs/stormwf_v002/lib/python3.11/site-packages/coupledmodeldriver/client/check_completion.py", line 126, in check_completion
       for model_type in Model.values():                                                                                                        
                         ^^^^^^^^^^^^^^                                                                                       
    File "/work2/noaa/nos-surge/daneshva/miniconda3/envs/stormwf_v002/lib/python3.11/enum.py", line 784, in __getattr__      
       raise AttributeError(name) from None                                                                               
AttributeError: values  
@SorooshMani-NOAA SorooshMani-NOAA self-assigned this Aug 21, 2024
@SorooshMani-NOAA
Copy link
Collaborator

The issues seems to be in:

for model_type in Model.values():
if not is_model_directory(directory, model=model_type):
continue

Where we should have had something like:

-     for model_type in Model.values():
-         if not is_model_directory(directory, model=model_type): 
+     for model_type in Model:
+         if not is_model_directory(directory, model=model_type.value): 
              continue 

@FariborzDaneshvar-NOAA can you please try installing coupledmodeldriver locally and try this and see if it resolves the issue or not?

@FariborzDaneshvar-NOAA
Copy link
Author

@SorooshMani-NOAA I made these changes locally and re-installed it.

image

But now I'm getting a new error:

[2024-08-21 09:43:28,049] /work2/noaa/nos-surge/daneshva/miniconda3/envs/stormwf_v002/lib/python3.11/site-packages/coupledmodeldriver/_depend.py WARNING : can't find the 'adcircpy' module                           
/work2/noaa/nos-surge/daneshva/miniconda3/envs/stormwf_v002/lib/python3.11/site-packages/pyschism/forcing/hycom/gofs.py:8: UserWarning: The seawater library is deprecated! Please use gsw instead. 
    import seawater as sw                                                                                    
[2024-08-21 09:43:31,947] /work2/noaa/nos-surge/daneshva/miniconda3/envs/stormwf_v002/lib/python3.11/site-packages/coupledmodeldriver/_depend.py WARNING : can't find the 'adcircpy' module                           
[2024-08-21 09:43:31,950] /work2/noaa/nos-surge/daneshva/miniconda3/envs/stormwf_v002/lib/python3.11/site-packages/coupledmodeldriver/_depend.py WARNING : can't find the 'adcircpy' module                           
[2024-08-21 09:43:31,955] /work2/noaa/nos-surge/daneshva/miniconda3/envs/stormwf_v002/lib/python3.11/site-packages/coupledmodeldriver/_depend.py WARNING : can't find the 'adcircpy' module                           
Traceback (most recent call last):                                                                           
File "/work2/noaa/nos-surge/daneshva/miniconda3/envs/stormwf_v002/bin/check_completion", line 8, in <module>                                                                                                            
sys.exit(main())                                                                                                    
^^^^^^                                                                                          
    File "/work2/noaa/nos-surge/daneshva/miniconda3/envs/stormwf_v002/lib/python3.11/site-packages/coupledmodeldriver/client/check_completion.py", line 208, in main                                                        
      completion_status = check_completion(**parse_check_completion_arguments())                                                     
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                               
    File "/work2/noaa/nos-surge/daneshva/miniconda3/envs/stormwf_v002/lib/python3.11/site-packages/coupledmodeldriver/client/check_completion.py", line 127, in check_completion                                            
      if not is_model_directory(directory, model=model_type.value):                                                     
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                             
    File "/work2/noaa/nos-surge/daneshva/miniconda3/envs/stormwf_v002/lib/python3.11/site-packages/coupledmodeldriver/client/check_completion.py", line 72, in is_model_directory                                           
      raise NotImplementedError(f'model "{model}" not implemented')                                          
NotImplementedError: model "ADCIRC" not implemented   

@SorooshMani-NOAA
Copy link
Collaborator

Sorry I think we actually don't need .value for the is_model_directory argument. Can you try that as well please?

@FariborzDaneshvar-NOAA
Copy link
Author

I think we actually don't need .value for the is_model_directory argument. Can you try that as well please?

Now I'm getting this error:
image

@FariborzDaneshvar-NOAA
Copy link
Author

@SorooshMani-NOAA now I getting this error with my old (nhc_colab) environment, that doesn't have stormworkflow and was working fine a few months ago.

(nhc_colab) [Fariborz.Daneshvar@nhccolab2-22 ensemble.dir]$ check_completion 
[2024-10-10 16:06:19,232] /lustre/Fariborz.Daneshvar/miniconda3/envs/nhc_colab/lib/python3.10/site-packages/coupledmodeldriver/_depend.py WARNING : can't find the 'adcircpy' module
/lustre/Fariborz.Daneshvar/miniconda3/envs/nhc_colab/lib/python3.10/site-packages/pyschism/forcing/hycom/gofs.py:8: UserWarning: The seawater library is deprecated! Please use gsw instead.
  import seawater as sw
[2024-10-10 16:06:41,118] /lustre/Fariborz.Daneshvar/miniconda3/envs/nhc_colab/lib/python3.10/site-packages/coupledmodeldriver/_depend.py WARNING : can't find the 'adcircpy' module
[2024-10-10 16:06:41,125] /lustre/Fariborz.Daneshvar/miniconda3/envs/nhc_colab/lib/python3.10/site-packages/coupledmodeldriver/_depend.py WARNING : can't find the 'adcircpy' module
[2024-10-10 16:06:41,137] /lustre/Fariborz.Daneshvar/miniconda3/envs/nhc_colab/lib/python3.10/site-packages/coupledmodeldriver/_depend.py WARNING : can't find the 'adcircpy' module
Traceback (most recent call last):
  File "/lustre/Fariborz.Daneshvar/miniconda3/envs/nhc_colab/bin/check_completion", line 8, in <module>
    sys.exit(main())
  File "/lustre/Fariborz.Daneshvar/miniconda3/envs/nhc_colab/lib/python3.10/site-packages/coupledmodeldriver/client/check_completion.py", line 206, in main
    completion_status = check_completion(**parse_check_completion_arguments())
  File "/lustre/Fariborz.Daneshvar/miniconda3/envs/nhc_colab/lib/python3.10/site-packages/coupledmodeldriver/client/check_completion.py", line 126, in check_completion
    for model_type in Model.values():
  File "/lustre/Fariborz.Daneshvar/miniconda3/envs/nhc_colab/lib/python3.10/enum.py", line 437, in __getattr__
    raise AttributeError(name) from None
AttributeError: value

@SorooshMani-NOAA
Copy link
Collaborator

This is the same issue as #170 (comment), right? I don't think I ever fixed it

@FariborzDaneshvar-NOAA
Copy link
Author

This is the same issue as #170 (comment), right? I don't think I ever fixed it

Yes, it is.

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

No branches or pull requests

2 participants