MilesCranmer commited on
Commit
db7e681
·
1 Parent(s): fad8a86

Force update and precompile on all launches

Browse files
Files changed (1) hide show
  1. pysr/sr.py +1 -13
pysr/sr.py CHANGED
@@ -396,16 +396,6 @@ def pysr(
396
  manifest_filepath = Path(julia_project) / "Manifest.toml"
397
  julia_project = Path(julia_project)
398
 
399
- need_install = False
400
-
401
- if not (manifest_filepath).is_file() and not pyjulia:
402
- need_install = (not user_input) or _yesno(
403
- "I will install Julia packages using PySR's Project.toml file. OK?"
404
- )
405
- if need_install:
406
- print("OK. I will install at launch.")
407
- assert update
408
-
409
  _create_inline_operators(
410
  binary_operators=binary_operators, unary_operators=unary_operators
411
  )
@@ -427,12 +417,10 @@ def pysr(
427
  from julia import Pkg
428
 
429
  Pkg.activate(f"{_escape_filename(julia_project)}")
430
- if need_install:
431
  Pkg.instantiate()
432
  Pkg.update()
433
  Pkg.precompile()
434
- elif update:
435
- Pkg.update()
436
 
437
  Main.eval("using SymbolicRegression")
438
 
 
396
  manifest_filepath = Path(julia_project) / "Manifest.toml"
397
  julia_project = Path(julia_project)
398
 
 
 
 
 
 
 
 
 
 
 
399
  _create_inline_operators(
400
  binary_operators=binary_operators, unary_operators=unary_operators
401
  )
 
417
  from julia import Pkg
418
 
419
  Pkg.activate(f"{_escape_filename(julia_project)}")
420
+ if update is not False:
421
  Pkg.instantiate()
422
  Pkg.update()
423
  Pkg.precompile()
 
 
424
 
425
  Main.eval("using SymbolicRegression")
426