Comments (7)
@tjjarvinen and @wcwitt -- I just ran into this again. Have you used @require
before? James Gardner once showed me how to use it to load some Julia code only if some package has been imported elsewhere already. Or at least I think that's how it works.
I wonder whether to bring this to ACEfit so that anything PyCall related will only be loaded if PyCall has already been loaded outside? What do you think?
from acefit.jl.
I'm trying to understand the precise issue. Is it that ACEfit has PyCall as a dependency in its Project.toml? And this is a problem because someone without Python would have trouble installing PyCall?
Looking at Requires.jl
, I could imagine us putting a @require
in front of all the functions that use sklearn
. But what does that achieve exactly ... wouldn't ACEfit still need to depend on PyCall?
https://github.com/JuliaPackaging/Requires.jl
I might be missing the point still.
from acefit.jl.
I have used Requires.jl
.
In short you can use it, by adding __init__()
to main file of the package. Here is an example that I used.
function __init__()
@require CUDA="052768ef-5323-5732-b1bb-66c8b64840ba" include("cuda_additions.jl")
end
TensorOperations.jl has a more complicated example.
You need to explicitly load the package before for it to trigger @require
. In this case it would be (e.g.)
using PyCall
using ACEfit # now triggers @require
from acefit.jl.
I think I understand that - and if it will solve @cortner's problem, great - but what confuses me is that TensorOperations.jl
still has CUDA in its Project.toml dependencies.
So if we did that, wouldn't
]add ACEfit
still trigger installation of PyCall
?
from acefit.jl.
Okay, from the Requires.jl readme:
@required packages can be added to the test environment of a Julia project for integration tests, or directly to the project to document compatible versions in the [compat] section of Project.toml.
which seems to imply that we wouldn't actually need PyCall
in the ACEfit
dependencies (although we could have it if we wanted to).
So this does seem like it would solve the issue.
from acefit.jl.
I hope this will be addressed by 558adeb.
from acefit.jl.
I think this is addressed by the PythonCall and MLJ extensions.
from acefit.jl.
Related Issues (20)
- v0.0.4 HOT 2
- BayesianLinearRegressors.jl HOT 1
- Maxiter for Bayesian Solvers HOT 3
- Thin SVD for BayesianRidge HOT 2
- Progressmeters are not representative of progress
- Processes are mostly idle HOT 4
- Multi-threaded parameter estimation HOT 31
- Tagging 0.1.0
- PyCall HOT 8
- Sendto of some models fails HOT 5
- Alternative Assembly Routine HOT 8
- Lazy LSQ System
- Problem with distributed assembly HOT 19
- Show progress in assembly HOT 4
- Tag new version HOT 3
- Extend the MLJ.jl HOT 3
- BLR and committees HOT 1
- Verbosity levels
- Catch Exception in BLR HOT 2
- Bayesian regression with `:cholesky` not returning committee HOT 1
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 acefit.jl.