-
Notifications
You must be signed in to change notification settings - Fork 211
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
Install SymbolicRegression directly from GitHub repo #107
Conversation
url="https://github.com/MilesCranmer/SymbolicRegression.jl", | ||
rev="v0.7.8", | ||
) | ||
Main.eval(f"Pkg.add(spec, {io_arg})") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This confuses me. What is this second io_arg
argument?
https://pkgdocs.julialang.org/v1/api/#Pkg.add
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to add: the reason I have to do the Main.eval
here is because the PyObject wrapper for IOStreams doesn't seem to pass correctly from Python. It's a bit ugly but works for now. The reason I pass the full io_arg
instead of something like io={io}
is because the IO redirection was only implemented in Julia 1.5+, so I set io_arg=""
for earlier versions.
Next question: Why does this environment need to be temporary? You could create one in the environments directory of the Julia depot. The short hand for this starts with an Support for |
I did not know you could do that, thanks! I will switch to using that instead. Any idea how to pass this to with (@v1.8) pkg> activate @pysr
Activating new project at `~/.julia/environments/pysr` and manual call: julia> Pkg.activate("@pysr")
Activating new project at `~/Documents/PySR/@pysr` |
This seems like it shouldn't be the expected behavior so opened an issue on Pkg.jl: JuliaLang/Pkg.jl#2983 |
a4aa7e2
to
25e2bc3
Compare
Nevermind, it's literally just |
Okay, the environment is now given by |
With the conda-forge version, |
Great! I think the |
Yes, it should. We set it up for that purpose. |
This would finally eliminate #27, as PySR would install the backend directly from GitHub, rather than through the Julia registry. No need to wait for the registry to update.
@mkitti does this look like what you had in mind?
(note that I use the temp dir for other files, so create it manually, rather than using the
temp
argument to Pkg.)