Comments (7)
Thanks for the gist example! Based on it I was able to get the new style code working without a plangym dependency! π
I had to open a PR to fragile because it was pulling in the plangym
dependency in the core library (and with it pillow-simd
)
Here's the PR that implements your gist: #39
from mathy.
@all-contributors please add @Guillemdb for code
from mathy.
I've put up a pull request to add @Guillemdb! π
from mathy.
Thanks for your help @Guillemdb!
I had some trouble with the ParallelEnv wrapper, so I removed it for now. When I used it I got an error about FragileEnvironment doesn't have a __call__
method:
def swarm_solve(problem: str, config: SwarmConfig):
env_callable = lambda: FragileMathyEnv(
name="mathy_v0", problem=problem, repeat_problem=True
)
mathy_env: MathyEnv = env_callable()._env._env.mathy
if config.use_mp:
env_callable = ParallelEnv(env_callable=env_callable)
swarm = Swarm(
model=lambda env: DiscreteMasked(env=env),
env=env_callable,
reward_limit=EnvRewards.WIN,
n_walkers=config.n_walkers,
max_epochs=config.max_iters,
reward_scale=1,
distance_scale=3,
distance_function=mathy_dist,
show_pbar=False,
)
If it's helpful for you I can reproduce the error again, otherwise, I'll just leave the Parallel runner out for the moment since I'm short on time.
I also had the all-contributors bot add you to the contributor list because of your fragile and gist contributions. This means you'll show up on the site and in the GitHub readme:
from mathy.
π This issue has been resolved in version 0.7.9 π
The release is available on GitHub release
Your semantic-release bot π¦π
from mathy.
@justindujardin this is my fault, I made a mistake gist where I showed you how to define the parallel environment.
It should also be passed as an env_callable
just like a regular environment with lambda: ParallelEnv(env_callable=env_callable)
, but I will be adding a __call__
method to avoid having to create a lambda function. Thanks fot the idea.
I've put up a pull request to add @Guillemdb! tada
Thank you man! I really appreciate it. I am sorry I couldn't help you more this weekend.
from mathy.
Thanks for the mp fix! I restored the functionality in #42 π
from mathy.
Related Issues (12)
- use underscore_case for python code consistently through API HOT 1
- Update API doc generation script to run with lint-staged
- Error when installing the package HOT 7
- Division not working properly HOT 2
- Adding new mathematical methods to mathy HOT 1
- Broken link HOT 1
- math problem
- Lim. Xln(x-2)/(x+3) X->+βΒ
- Cannot install mathy HOT 1
- How to use in code? HOT 1
- Can you provide some code examplesοΌ HOT 9
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 mathy.