MilesCranmer / PySR

High-Performance Symbolic Regression in Python and Julia

Home Page:https://astroautomata.com/PySR

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Quiet install option

patrick-kidger opened this issue · comments

Something I'd like to use when autogenerating examples in documentation is the ability to pass quiet=True to this julia.install.

julia.install()

Partly fixed for install and activate, but apparently Pkg.update has no quiet option. Any idea to hack in a quiet mode?

Hmm, I'm not sure either.

One other thing I can mention is that this line needs gating with an if not quiet though:

warnings.warn(

Using Julia 1.7.1 then julia> Pkg.update(io=devnull) seems to work for me.

Thanks! Seems to be working on 0ef4d05

Similarly, what about a quiet runtime option? I'm already passing verbosity=0 but still getting

Activating project at `/tmp/tmpru35511c`
    Updating `/tmp/tmpru35511c/Project.toml`
  [8254be44] + SymbolicRegression v0.7.5
    Updating `/tmp/tmpru35511c/Manifest.toml`
  [c3fe647b] + AbstractAlgebra v0.12.0
  [4fba245c] + ArrayInterface v4.0.2
  [d360d2e6] + ChainRulesCore v1.12.0
  [9e997f8a] + ChangesOfVariables v0.1.2
  [861a8166] + Combinatorics v1.0.2
  [bbf7d656] + CommonSubexpressions v0.3.0
  [34da2185] + Compat v3.41.0
  [9a962f9c] + DataAPI v1.9.0
  [864edb3b] + DataStructures v0.18.11
  [163ba53b] + DiffResults v1.0.3
  [b552c78f] + DiffRules v1.9.1
  [ffbed154] + DocStringExtensions v0.8.6
  [e2ba6199] + ExprTools v0.1.8
...

outputted to stderr.

Done!

Actually it looks like this breaks julia 1.5: https://github.com/MilesCranmer/PySR/runs/5034798763.

Not sure we need to support it still but maybe we could just turn off the argument for julia<=1.5.

^ I turned this off for 1.5 by checking versions with the new function is_julia_version_greater(Main, "1.5"). Should be good now.