Skip to content

Conda Environment#17

Open
halil-erdogan wants to merge 5 commits intomasterfrom
conda-test
Open

Conda Environment#17
halil-erdogan wants to merge 5 commits intomasterfrom
conda-test

Conversation

@halil-erdogan
Copy link
Owner

@halil-erdogan halil-erdogan commented Jan 26, 2019

I have added spec-file to get same environment and reproduce results easily. @sertansenturk May you check it?

Instruction

To use the spec file to create an identical environment on the same machine or another machine:
conda create --name myenv --file spec-file.txt

After that, you can check this pull request which is about mock training and accept my pull request.

Copy link
Collaborator

@sertansenturk sertansenturk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a few issues with this request:

  1. You should add an "installation instructions" to the README. It should include:
    1.1. installing conda (even if it's following the instructions on their website)
    1.2. creating the environment (basically what you have written above)
    1.3 activating/running/deactivating the conda environment

  2. Could you export the environment to yml instead of txt for the sake of readability and convenience? (instructions: https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#sharing-an-environment)

  3. We do not have any code using these packages at the moment (in fact we don't have any code in the repo yet).
    At this stage, we should simply create a conda environment with the bare minimum (i.e. the correct Python version with no external dependencies). The environment should be populated later with the appropriate packages, when an additional feature requires them.

  4. Also see the inline comments in the added file.

@halil-erdogan
Copy link
Owner Author

Thanks for clarification.

I have change my pull request according to your requests. Now, you can find followings in the Readme:

  • How to install conda
  • How to get same environment
  • Activate and deactivate environment

Also, I have added environment.yml instead of spec-file.txt

source dectivate
```

- How to update our environment with new(or updated) .yml file ([source1](https://stackoverflow.com/questions/42352841/how-to-update-an-existing-conda-environment-with-a-yml-file), [source2](https://stackoverflow.com/questions/45510430/install-packages-into-existing-conda-environment-specified-in-environment-yml)):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to refer to the original sources. Let's keep the README focused.

```

- How to update our environment with new(or updated) .yml file ([source1](https://stackoverflow.com/questions/42352841/how-to-update-an-existing-conda-environment-with-a-yml-file), [source2](https://stackoverflow.com/questions/45510430/install-packages-into-existing-conda-environment-specified-in-environment-yml)):
``` sh
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these two options identical in function? If yes, we can use one of them, that would be enough.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, both of them worked for me. I have added both of them, if people get error from one of them. But, we can remove one of them.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove one...


- To use same conda environment:
``` sh
conda env create -f environment.yml
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I run this command I get:

Collecting package metadata: done
Solving environment: failed

ResolvePackageNotFound: 
  - ncurses==6.1=h0a44026_1
  - sqlite==3.26.0=ha441bb4_0
  - xz==5.2.4=h1de35cc_4
  - zlib==1.2.11=h1de35cc_3
  - python==3.7.2=haf84260_0
  - openssl==1.1.1a=h1de35cc_0
  - libedit==3.1.20181209=hb402a30_0
  - libcxx==4.0.1=hcfea43d_1
  - tk==8.6.8=ha441bb4_0
  - libcxxabi==4.0.1=hcfea43d_1
  - libffi==3.2.1=h475c297_4
  - readline==7.0=h1de35cc_5

I have Ubuntu 16.04.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I remove the hashes after second equals sign each line, i.e.:

name: turkishMusicGen
channels:
  - defaults
dependencies:
  - ca-certificates=2018.12.5
  - certifi=2018.11.29
  - libcxx=4.0.1
  - libcxxabi=4.0.1
  - libedit=3.1.20181209
  - libffi=3.2.1
  - ncurses=6.1
  - openssl=1.1.1a
  - pip=18.1
  - python=3.7.2
  - readline=7.0
  - setuptools=40.6.3
  - sqlite=3.26.0
  - tk=8.6.8
  - wheel=0.32.3
  - xz=5.2.4
  - zlib=1.2.11
prefix: /Users/herdogan/anaconda3/envs/turkishMusicGen

I get rid of most errors. The remaining errors are:

Collecting package metadata: done
Solving environment: failed

ResolvePackageNotFound: 
  - libcxxabi=4.0.1
  - libcxx=4.0.1

When I removed these two packages the environment was created successfully. The environment.yml file that worked in my case is:

name: turkishMusicGen
channels:
  - defaults
dependencies:
  - ca-certificates=2019.1.23-0
  - certifi=2018.11.29
  - libedit=3.1.20181209
  - libffi=3.2.1
  - ncurses=6.1
  - openssl=1.1.1a
  - pip=18.1
  - python=3.7.2
  - readline=7.0
  - setuptools=40.6.3
  - sqlite=3.26.0
  - tk=8.6.8
  - wheel=0.32.3
  - xz=5.2.4
  - zlib=1.2.11
prefix: /Users/herdogan/anaconda3/envs/turkishMusicGen

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems conda is not as OS-agnostic as it looks from outside. See the Github issue here: conda/conda#6073

I am getting inclined to switch to Docker, but

  1. it is outside the scope of this ticket
  2. You are not familiar with Docker for the time being so I am not in favor of increasing the complexity of our setup. We need to spend our time on the models.

so let's take care of the reviews, and then make sure that the environment works in Magdalena's computer & cluster.

@sertansenturk
Copy link
Collaborator

sertansenturk commented Feb 7, 2019

I have given out some reviews. It seems that conda may not be the ideal solution in the long run (see: this comment).

In addition, we should have considered that the code of the state-of-the-art music generation methods was built using different libraries and potentially different versions. It's also not a secret that both the numerical stability and the behavior of DL libraries have changed throughout versions. I'm afraid we may need to have an environment per method for the sake of reproducibility.

For this reason, I'm inclined to close this ticket once the reviews are done and we make sure we get an expected behavior on Magdalena's side.

To reflect the reproducibility concerns, I'm adding a criterion to the evaluation of open source models #19.

@halil-erdogan
Copy link
Owner Author

halil-erdogan commented Feb 7, 2019

I agree with you. If I have time, I will try to use Docker. If we can use directly Docker, it would be perfect. Otherwise, as you said, we will provide different .yml file for each methods-architectures, however, our problem with conda (non-os-agnostic .yml) will continue.

@sertansenturk
Copy link
Collaborator

I agree with you. If I have time, I will try to use Docker. If we can use directly Docker, it would be perfect. Otherwise, as you said, we will provide different .yml file for each methods-architectures, however, our problem with conda (non-os-agnostic .yml) will continue.

Let's keep Docker out of the scope for the time being. It's a vast area, and without guidance, it will distract you from working on the actual problem -> music generation.

@halil-erdogan
Copy link
Owner Author

@sertansenturk Hocam, should we delete this branch? I think, we won't go with conda at that point.

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

Successfully merging this pull request may close these issues.

2 participants