Comments (6)
That was fast! First class support, right there. :D
from pysr.
Ah, I see; in particular the Python-Julia interop. (Which sounds like no fun at all, I don't envy you.) I think my preferred option would be for a flag that puts the optional file in the same temporary directory.
from pysr.
Great question; I should add a temporary file option. Note generally you can set the filename of this csv file to whatever you like with the equation_file
argument (overwrites by default). Here are some notes on this behaviour:
- I completely de-couple Python and Julia. Their only communication is via writing files to disk. This is because I found that PyJulia made distributed compute difficult to set up (and perhaps impossible for multi-node), so instead I just have Python basically meta-program a SymbolicRegression.jl program and run Julia on it. (also much easier to sort out
PATH
issues this way). - Because of this, the Python actually requires the hall of fame csv file to read back the best equations from Julia.
- For all temporary files other than the equations file, I write to a temp directory that is deleted at the end of training (can turn this off with
delete_tempfiles=False
). This is made system independent with thetempfile
module.
However, for the hall of fame file, I use the current directory by default, and append the datetime so there is a new file for each run. But one can manually set the location with eg equation_file="equations.csv"
. This will overwrite whatever file is there. You could use Sacred on that filename, maybe?
So that's one option. The other option, which I don't have yet, is to make an optional flag to just put the equations file into the same temporary directory so it gets deleted after training.
Thoughts?
Cheers,
Miles
from pysr.
Sounds good, will add it!
from pysr.
Okay, pushed to master! Will update PyPI soon. Setting temp_equation_file=True
will now put the hall of fame file into the temporary directory. It will be deleted by default, or you can choose to keep the temp directory with delete_tempfiles=False
.
Cheers,
Miles
from pysr.
Thanks! 😄 🚀
from pysr.
Related Issues (20)
- [BUG]: Julia interface fails on conda environments HOT 12
- [BUG]: PySR currently incompatible with Python 3.12 HOT 4
- [Feature]: Adding linting to pre-commit hooks HOT 1
- [Feature]: How can I use GPU to accelerate training, like deep learning? HOT 5
- [BUG]: runtime grows to infinity HOT 5
- [Feature]: Self-contained install/user interface HOT 1
- [Feature]: Big Data and partial differential operator
- Understanding accuracy of expressions HOT 5
- Rethinking default behavior for number of iterations
- [Feature]: fixsize HOT 2
- [BUG]: Small typo in documentation HOT 1
- [BUG]: Possible memory leakage & best practices for memory scaling? HOT 5
- [Feature]: Add priori of equation form HOT 1
- [BUG]: PySR can not rediscover X^2 HOT 3
- [Feature]: Composite regressors
- [Feature]: Warn if better linear model available HOT 4
- [BUG]: Using dimensional constraints result in "UndefVarError: `k` not defined" error HOT 4
- Update Head Worker Occupation Warning HOT 3
- Command '['julia', '-e', '...']' returned non-zero exit status 1 HOT 2
- [BUG]: Encounter segmentation faults in running the toy example on RHEL machines HOT 14
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pysr.