alphageometry icon indicating copy to clipboard operation
alphageometry copied to clipboard

run.sh fails (permission error on gdrive folder)

Open p-i- opened this issue 1 year ago • 7 comments

In run.sh, this line fails:

gdown --folder https://bit.ly/alphageometry

Maybe a perms fail on the gdrive folder?

(.venv) (base) ubuntu@cog1:~/pi/alphageometry$ ./run.sh 
+ . .venv/bin/activate
++ deactivate nondestructive
++ '[' -n '' ']'
++ '[' -n '' ']'
++ '[' -n /bin/bash -o -n '' ']'
++ hash -r
++ '[' -n '' ']'
++ unset VIRTUAL_ENV
++ unset VIRTUAL_ENV_PROMPT
++ '[' '!' nondestructive = nondestructive ']'
++ VIRTUAL_ENV=/home/ubuntu/pi/alphageometry/.venv
++ export VIRTUAL_ENV
++ _OLD_VIRTUAL_PATH=/home/ubuntu/.vscode-server/extensions/ms-python.python-2023.22.1/pythonFiles/deactivate/bash:/home/ubuntu/pi/.venv/bin:/home/ubuntu/.vscode-server/bin/0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2/bin/remote-cli:/home/ubuntu/miniforge3/bin:/home/ubuntu/miniforge3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
++ PATH=/home/ubuntu/pi/alphageometry/.venv/bin:/home/ubuntu/.vscode-server/extensions/ms-python.python-2023.22.1/pythonFiles/deactivate/bash:/home/ubuntu/pi/.venv/bin:/home/ubuntu/.vscode-server/bin/0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2/bin/remote-cli:/home/ubuntu/miniforge3/bin:/home/ubuntu/miniforge3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
++ export PATH
++ '[' -n '' ']'
++ '[' -z '' ']'
++ _OLD_VIRTUAL_PS1=
++ PS1='(.venv) '
++ export PS1
++ VIRTUAL_ENV_PROMPT='(.venv) '
++ export VIRTUAL_ENV_PROMPT
++ '[' -n /bin/bash -o -n '' ']'
++ hash -r
+ gdown --folder https://bit.ly/alphageometry
Retrieving folder list
Processing file 1qXkmmgoJ8oTYJdFV1xw0xGPpQj6SyOYA checkpoint_10999999
Processing file 1t-r3KfU8aDbS1UHpdyM3LH21rwSCIXTz geometry.757.model
Processing file 1mRd6J0UkeWoFUjeVB7BQi5lVNLvPBe31 geometry.757.vocab
Retrieving folder list completed
Building directory structure
Building directory structure completed
Access denied with the following error:

        Cannot retrieve the public link of the file. You may need to change
        the permission to 'Anyone with the link', or have had many accesses. 

You may still be able to access the file from the browser:

         https://drive.google.com/uc?id=1qXkmmgoJ8oTYJdFV1xw0xGPpQj6SyOYA 

Download ended unsuccessfully

p-i- avatar Jan 17 '24 23:01 p-i-

upgrading gdown to 4.7.3 fixed this for me

zhangir-azerbayev avatar Jan 18 '24 03:01 zhangir-azerbayev

I am running bash download.sh in a remote server after installing all dependencies inside a conda environment. I am getting the following error output due to gdown:

Retrieving folder contents
Error:

        file/folder name cannot be extracted from: ag_ckpt_vocab – Google
        Drive

To report issues, please visit https://github.com/wkentaro/gdown/issues.

I manually upgraded gdown to 4.7.3 but the same error persists. Any ideas?

aranjan25 avatar Jan 18 '24 12:01 aranjan25

Alright, https://bit.ly/alphageometry redirects to a Google Drive URL, I did gdown --folder <drive url> and it seems to be working. Though, still can't retrieve it due to many people downloading it at the same time. I'll get my bite when the crowd calms down.

aranjan25 avatar Jan 18 '24 12:01 aranjan25

Note that you can manually point your browser at the gdrive URL, download a zip for the folder and decompress it into the project folder.

p-i- avatar Jan 18 '24 12:01 p-i-

thanks, that works

aranjan25 avatar Jan 18 '24 12:01 aranjan25

In case the Google drive folder link is still throwing an error I've Created a hugging face repo with the weights and Voccab for alphageometry , here's the link : https://huggingface.co/abrahamabelboodala/ALPHAGEOMETRY_ag_ckpt_vocab/tree/main/ag_ckpt_vocab

Install from hugging face repo

Common Error

When running the download.sh script, you may encounter the following error:

bash download.sh
# Error Output:
DATA=ag_ckpt_vocab
Retrieving folder list
Failed to retrieve folder contents:
file/folder name cannot be extracted from: ag_ckpt_vocab – Google Drive

Resolution Steps

  1. Create a Folder:

    • At the root of your alphageometry folder, create a new folder named ag_ckpt_vocab. Example: alphageometry/ag_ckpt_vocab
  2. Download Required Files:

    • from this link https://huggingface.co/abrahamabelboodala/ALPHAGEOMETRY_ag_ckpt_vocab/tree/main/ag_ckpt_vocab
    • Download and place the following three files inside your ag_ckpt_vocab folder:
      1. geometry.757.vocab
      2. geometry.757.model
      3. checkpoint_10999999
  3. Set Environment Variable:

    • Open a bash shell at the root of your alphageometry folder.

    • Execute the following command:

      export DATA=ag_ckpt_vocab
      

Alternative to Step 3

Alternatively, you can automate the environment variable setup:

  1. Create a file named extrasetup.sh in the root of your alphageometry folder.

  2. Add the following line to extrasetup.sh:

    export DATA=ag_ckpt_vocab
    
  3. In a bash shell at the root of your alphageometry folder, execute:

    bash extrasetup.sh
    

abrahamabel avatar Jan 27 '24 02:01 abrahamabel

I made some improvements to AlphaGeometry in a fork repository and have some ideas to further improve its performance, check out AG4Masses and issue 110. In it I gave a more streamlined setup process.

tpgh24 avatar Apr 27 '24 15:04 tpgh24