You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a bash job is submitted through anaconda (powershell prompt) on a windows machine, anaconda opens an external application called Git Bash which is a bash environment that is used to execute the bash job. Git Bash basically enables bash and git operations with the command line of a Windows operating system. The nice thing about using anaconda is that you can easily specify which python environment you want the job to be executed under and make changes to that environment as needed. However, the Git Bash interface which logs what is going on as the model runs, is only open for as long as the model runs, and then it automatically closes. Whether a run is successful or not, it is important to have access to the output log. Therefore, one must manually open Git Bash and submit the job directly through Git Bash so that there is no issue of the output log disappearing. However, this presents the following error: When the 'test_run.sh' file is submitted through anaconda, the line "python main.py --datapath=$DATADIR --lca_config_file=$DATADIR/$yaml.yaml" gives no issues because anaconda knows where the python executable is stored based on the active python environment. However, this line throws an error when 'test_run.sh' is submitted directly through Git Bash because there is no active python environment specified in Git Bash. An active python environment cannot be specified in Git Bash because Git Bash is not fundamentally tied to python. This means that the 'test_run.sh' file has to be adjusted so that the computer knows which python environment to use and execute the job under when using Git Bash directly on a Windows Machine. This is what the file looks for me (note 'python' was changed to the specific local directory of the python executable file associated with my liaison python environment):
The text was updated successfully, but these errors were encountered:
This is great feedback. The primary reason for using bash commands over here was that users do not have to manually mention
CODEDIR
and DATADIR.
What is CODEDIR?
path_to_LiAISON_folder/code
What is DATADIR? path_to_LiAISON_folder/data
I used the bash method so that users do not have to enter the path_to_LiAISON_folder manually in the test_run, run and run_all sh files.
However, it seems its not working.
Resolution 1: As @i- suggested, point to the Anaconda python which is again an issue.
Resolution 2: Do not use bash capture of PATH_DIR. Make the user enter the proper path by giving examples in the run.sh file.
I honestly do not know which resolution is best. I just know that the resolution I provided solves the issue for windows users who do python coding and have to submit bash jobs on their internal machine (assuming they use Git Bash for this which I believe all windows machines have installed but this we would need to confirm to make sure the solution we implement works ideally for all windows users)
When a bash job is submitted through anaconda (powershell prompt) on a windows machine, anaconda opens an external application called Git Bash which is a bash environment that is used to execute the bash job. Git Bash basically enables bash and git operations with the command line of a Windows operating system. The nice thing about using anaconda is that you can easily specify which python environment you want the job to be executed under and make changes to that environment as needed. However, the Git Bash interface which logs what is going on as the model runs, is only open for as long as the model runs, and then it automatically closes. Whether a run is successful or not, it is important to have access to the output log. Therefore, one must manually open Git Bash and submit the job directly through Git Bash so that there is no issue of the output log disappearing. However, this presents the following error: When the 'test_run.sh' file is submitted through anaconda, the line "python main.py --datapath=$DATADIR --lca_config_file=$DATADIR/$yaml.yaml" gives no issues because anaconda knows where the python executable is stored based on the active python environment. However, this line throws an error when 'test_run.sh' is submitted directly through Git Bash because there is no active python environment specified in Git Bash. An active python environment cannot be specified in Git Bash because Git Bash is not fundamentally tied to python. This means that the 'test_run.sh' file has to be adjusted so that the computer knows which python environment to use and execute the job under when using Git Bash directly on a Windows Machine. This is what the file looks for me (note 'python' was changed to the specific local directory of the python executable file associated with my liaison python environment):
The text was updated successfully, but these errors were encountered: