facebookresearch / CodeGen

Reference implementation of code generation projects from Facebook AI Research. General toolkit to apply machine learning to code, from dataset creation to model training and evaluation. Comes with pretrained models.
MIT License
710 stars 144 forks source link

Conda Environment #20

Closed akshitdewan closed 3 years ago

akshitdewan commented 3 years ago

Hi,

Having some dependency issues with the environment setup. Would someone be able to share a working Conda environment export on Mac and/or Linux?

I believe you just need to run conda env export > environment.yml.

In particular, the main issue I'm having seems to be with finding cudatools=11.0, and often conda is not able to solve the environment when I run the line in the setup script: conda install pytorch torchvision torchaudio cudatoolkit=11.0 six scikit-learn stringcase transformers ply slimit astunparse submitit

mxl1n commented 3 years ago

Here's mine (for linux). I don't think cuda works on most Macs since they don't have NVIDIA graphics cards.

environment.yml

``` name: cg_env channels: - pytorch - conda-forge - defaults dependencies: - _libgcc_mutex=0.1=conda_forge - _openmp_mutex=4.5=1_gnu - astunparse=1.6.3=pyhd8ed1ab_0 - blas=1.0=mkl - brotlipy=0.7.0=py39h3811e60_1001 - bzip2=1.0.8=h7f98852_4 - ca-certificates=2021.5.30=ha878542_0 - certifi=2021.5.30=py39hf3d152e_0 - cffi=1.14.6=py39h4bc2ebd_1 - chardet=4.0.0=py39hf3d152e_1 - charset-normalizer=2.0.0=pyhd8ed1ab_0 - click=8.0.1=py39hf3d152e_0 - cloudpickle=2.0.0=pyhd8ed1ab_0 - colorama=0.4.4=pyh9f0ad1d_0 - cryptography=3.4.7=py39hbca0aa6_0 - cudatoolkit=10.1.243=h036e899_8 - dataclasses=0.8=pyhc8e2a94_3 - ffmpeg=4.3=hf484d3e_0 - filelock=3.0.12=pyh9f0ad1d_0 - freetype=2.10.4=h0708190_1 - gmp=6.2.1=h58526e2_0 - gnutls=3.6.13=h85f3911_1 - huggingface_hub=0.0.17=pyhd8ed1ab_0 - idna=3.1=pyhd3deb0d_0 - importlib-metadata=4.8.1=py39hf3d152e_0 - importlib_metadata=4.8.1=hd8ed1ab_0 - intel-openmp=2021.3.0=h06a4308_3350 - joblib=1.0.1=pyhd8ed1ab_0 - jpeg=9b=h024ee3a_2 - lame=3.100=h7f98852_1001 - lcms2=2.12=h3be6417_0 - ld_impl_linux-64=2.36.1=hea4e1c9_2 - libblas=3.9.0=11_linux64_mkl - libcblas=3.9.0=11_linux64_mkl - libffi=3.4.2=h9c3ff4c_2 - libgcc-ng=11.2.0=h1d223b6_8 - libgfortran-ng=11.2.0=h69a702a_8 - libgfortran5=11.2.0=h5c6108e_8 - libgomp=11.2.0=h1d223b6_8 - libiconv=1.16=h516909a_0 - liblapack=3.9.0=11_linux64_mkl - libpng=1.6.37=h21135ba_2 - libstdcxx-ng=11.2.0=he4da1e4_8 - libtiff=4.2.0=h85742a9_0 - libuv=1.42.0=h7f98852_0 - libwebp-base=1.2.1=h7f98852_0 - lz4-c=1.9.3=h9c3ff4c_1 - mkl=2021.3.0=h06a4308_520 - ncurses=6.2=h58526e2_4 - nettle=3.6=he412f7d_0 - ninja=1.10.2=h4bd325d_0 - numpy=1.21.2=py39hdbf815f_0 - olefile=0.46=pyh9f0ad1d_1 - openh264=2.1.1=h780b84a_0 - openjpeg=2.4.0=hb52868f_1 - openssl=1.1.1l=h7f98852_0 - packaging=21.0=pyhd8ed1ab_0 - pillow=8.3.1=py39h2c7a002_0 - pip=21.2.4=pyhd8ed1ab_0 - ply=3.11=py_1 - pycparser=2.20=pyh9f0ad1d_2 - pyopenssl=20.0.1=pyhd8ed1ab_0 - pyparsing=2.4.7=pyh9f0ad1d_0 - pysocks=1.7.1=py39hf3d152e_3 - python=3.9.7=hb7a2778_1_cpython - python_abi=3.9=2_cp39 - pytorch=1.8.1=py3.9_cuda10.1_cudnn7.6.3_0 - pyyaml=5.4.1=py39h3811e60_1 - readline=8.1=h46c0cb4_0 - regex=2021.8.28=py39h3811e60_0 - requests=2.26.0=pyhd8ed1ab_0 - sacremoses=0.0.43=pyh9f0ad1d_0 - scikit-learn=0.24.2=py39h7c5d8c9_1 - scipy=1.7.1=py39hee8e79c_0 - setuptools=58.0.4=py39hf3d152e_1 - six=1.16.0=pyh6c4a22f_0 - slimit=0.8.1=py39hde42818_2 - sqlite=3.36.0=h9cd32fc_1 - stringcase=1.2.0=py_0 - submitit=1.2.1=pyh44b312d_0 - threadpoolctl=2.2.0=pyh8a188c0_0 - tk=8.6.11=h27826a3_1 - tokenizers=0.10.3=py39hd6d55de_0 - torchaudio=0.8.1=py39 - torchvision=0.9.1=py39_cu101 - tqdm=4.62.3=pyhd8ed1ab_0 - transformers=4.10.2=pyhd8ed1ab_0 - typing-extensions=3.10.0.0=hd8ed1ab_0 - typing_extensions=3.10.0.0=pyha770c72_0 - tzdata=2021a=he74cb21_1 - urllib3=1.26.6=pyhd8ed1ab_0 - wheel=0.37.0=pyhd8ed1ab_1 - xz=5.2.5=h516909a_1 - yaml=0.2.5=h516909a_0 - zipp=3.5.0=pyhd8ed1ab_0 - zlib=1.2.11=h516909a_1010 - zstd=1.4.9=ha95c52a_0 - pip: - antlr4-python3-runtime==4.8 - apex==0.1 - appdirs==1.4.4 - attrs==21.2.0 - black==19.10b0 - cython==0.29.24 - fastbpe==0.1.1 - hydra-core==1.1.1 - javalang==0.13.0 - omegaconf==2.1.1 - pathspec==0.9.0 - psutil==5.8.0 - sacrebleu==1.2.11 - toml==0.10.2 - tree-sitter==0.19.0 - typed-ast==1.4.3 - typing==3.7.4.3 prefix: /home//miniconda3/envs/cg_env ```

akshitdewan commented 3 years ago

thanks!