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

Add elixir #117

Merged
merged 8 commits into from
Nov 17, 2023
Merged

Add elixir #117

merged 8 commits into from
Nov 17, 2023

Conversation

mvkvc
Copy link
Contributor

@mvkvc mvkvc commented Nov 8, 2023

No description provided.

@mvkvc mvkvc marked this pull request as ready for review November 9, 2023 04:39
@@ -38,7 +38,8 @@ def path(self) -> Path:
"swift",
"rkt",
"ml",
"hs"
"hs",
"elixir",

Choose a reason for hiding this comment

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

Maybe use ex?

Suggested change
"elixir",
"ex",

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense

@mvkvc
Copy link
Contributor Author

mvkvc commented Nov 9, 2023

Currently for the results file I checked everything was timing out even though when I wrote one program to a file and ran locally it worked. Working on fixing that and renaming to ex from elixir.

@arjunguha
Copy link
Member

Awesome! Thanks for writing this. I am happy to merge when you say its ready. Two comments:

  1. Do you have a GPU available to run generations? (If not, we can help)
  2. Would you edit the evaluator to use this as a template: https://github.com/nuprl/MultiPL-E/blob/main/evaluation/src/eval_lua.py it uses a different library that is a little more robust. (Uses Linux sessions.) We should really refactor the older generic_eval evaluators to use it.

@mvkvc
Copy link
Contributor Author

mvkvc commented Nov 13, 2023

Thank you for taking the time to review.

  1. Yes, I ran it with Llama7B on a cloud GPU and the generation seems to work fine. Will upload the results here.
  2. Sure not a problem. Currently having issues where everything seems to timeout even though when I write the program to a string and run myself it works. Hopefully this fixes that.

@mvkvc
Copy link
Contributor Author

mvkvc commented Nov 13, 2023

Here are the generations and results: results.zip. Happy with the generation for now and will rerun with the refactored eval on a faster machine.

@mvkvc mvkvc closed this Nov 13, 2023
@mvkvc mvkvc reopened this Nov 13, 2023
@mvkvc
Copy link
Contributor Author

mvkvc commented Nov 13, 2023

Sorry misclick on the close.

@arjunguha
Copy link
Member

Wonderful! Happy to merge. :)

@arjunguha arjunguha merged commit 51e95bb into nuprl:main Nov 17, 2023
@mvkvc mvkvc deleted the add_elixir branch November 20, 2023 21:14
@arjunguha
Copy link
Member

@mvkvc I'm trying to put out a release with Elixir support. I am getting this error:

/usr/bin/elixir: 247: exec: erl: not found

This is how Elixir is installed:

https://github.com/nuprl/MultiPL-E/blob/main/evaluation/Dockerfile#L61

@jonatanklosko
Copy link

jonatanklosko commented Jul 8, 2024

The following installs Erlang 26.2.3 and Elixir 1.16.2:

# Erlang
RUN wget https://binaries2.erlang-solutions.com/ubuntu/pool/contrib/e/esl-erlang/esl-erlang_26.2.3-1~ubuntu~jammy_amd64.deb -O /tmp/erlang.deb && dpkg -i /tmp/erlang.deb

# Elixir
RUN wget https://binaries2.erlang-solutions.com/ubuntu/pool/contrib/e/elixir/elixir_1.16.2_1_otp_26.2.3~ubuntu~jammy_all.deb -O /tmp/elixir.deb && dpkg -i /tmp/elixir.deb

@jonatanklosko
Copy link

Just for reference, here are instructions for installing the latest versions (Erlang 27.0 and Elixir 1.17.2):

# Install Erlang
RUN mkdir -p /erlang && \
  cd /erlang && \
  wget -nv -O erlang.tar.gz https://builds.hex.pm/builds/otp/ubuntu-22.04/OTP-27.0.tar.gz && \
  tar xzf erlang.tar.gz --strip-components=1 && \
  ./Install -minimal "$(pwd)"

# Erlang runtime dependencies, see https://github.com/hexpm/bob/blob/4fe43eb9853bb95dbfe276957bd7d3f931a451b3/priv/scripts/docker/erlang-ubuntu-jammy.dockerfile
RUN apt-get update && \
  apt-get -y --no-install-recommends install \
    ca-certificates \
    libodbc1 \
    libssl3 \
    libsctp1

# Install Elixir
RUN mkdir -p /elixir && \
  cd /elixir && \
  wget -nv -O elixir.zip https://builds.hex.pm/builds/elixir/v1.17.2-otp-27.zip && \
  unzip -q elixir.zip

ENV PATH="/erlang/bin:/elixir/bin:${PATH}"
ENV LANG=C.UTF-8

These are more verbose, but allow for installing latest versions, because the upstream builds are automated.

@josevalim
Copy link

I have deleted my comment because @jonatanklosko's recommendations are better. :)

@mvkvc
Copy link
Contributor Author

mvkvc commented Jul 8, 2024

Thank you @jonatanklosko @josevalim!

@mvkvc mvkvc mentioned this pull request Jul 8, 2024
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.

4 participants