Giter VIP home page Giter VIP logo

Comments (5)

brendenpetersen avatar brendenpetersen commented on June 10, 2024 1

Hi @Sean-Reilly , thanks for the config! I am able to reproduce the bug. Looks like an issue when using n_cores_batch > 1 and the const token. I can reproduce the bug with a simplified config:

{
"task" : {
    "function_set" : ["add", "mul", "div", "sub", "const"]
},
"training" : {
        "n_samples" : 100,
        "batch_size" : 10,
        "n_cores_batch" : 2
    }
}

I will look into this and report back! Thanks.

from deep-symbolic-optimization.

brendenpetersen avatar brendenpetersen commented on June 10, 2024 1

Hi @Sean-Reilly, as a temporary hack, you can add pool = None in train.py at the beginning of the learn() function. That will break some other use cases (namely, the control task when using PyBullet envs), but should be just fine for regression.

A real fix will be incoming.

from deep-symbolic-optimization.

brendenpetersen avatar brendenpetersen commented on June 10, 2024

Hi @Sean-Reilly , can you send me the full config you're using and the method to run (CLI vs Python interface)?

from deep-symbolic-optimization.

Sean-Reilly avatar Sean-Reilly commented on June 10, 2024

I tried in both CLI and Python interface and got the same error as above. Below is the full config.json of a failed run.

{
   "experiment": {
      "logdir": "./log",
      "seed": 0,
      "timestamp": "2021-08-18-142149",
      "task_name": "~_nas_rism-symbolic-regression_dso_data_hs_dens_0.1",
      "save_path": "./log/~_nas_rism-symbolic-regression_dso_data_hs_dens_0.1_2021-08-18-142149"
   },
   "task": {
      "task_type": "regression",
      "dataset": "~/nas/rism-symbolic-regression/dso/data/hs_dens_0.1.csv",
      "function_set": [
         "add",
         "mul",
         "div",
         "sub",
         "const"
      ],
      "metric": "inv_nrmse",
      "metric_params": [
         1.0
      ],
      "extra_metric_test": null,
      "extra_metric_test_params": [],
      "threshold": 1e-20,
      "protected": false,
      "reward_noise": 0.0,
      "reward_noise_type": "r",
      "normalize_variance": false
   },
   "training": {
      "n_epochs": null,
      "n_samples": 100000,
      "batch_size": 100,
      "epsilon": 0.05,
      "baseline": "R_e",
      "alpha": 0.5,
      "b_jumpstart": false,
      "n_cores_batch": 4,
      "complexity": "token",
      "const_optimizer": "scipy",
      "const_params": {},
      "verbose": true,
      "debug": 0,
      "early_stopping": true,
      "hof": 5,
      "use_memory": false,
      "memory_capacity": 1000.0,
      "warm_start": null,
      "memory_threshold": null,
      "save_all_epoch": false,
      "save_summary": false,
      "save_positional_entropy": false,
      "save_pareto_front": true,
      "save_cache": false,
      "save_cache_r_min": 0.9,
      "save_freq": 1,
      "runs": 100
   },
   "controller": {
     "max_length": 30,
      "cell": "lstm",
      "num_layers": 1,
      "num_units": 32,
      "initializer": "zeros",
      "embedding": false,
      "embedding_size": 8,
      "learning_rate": 0.0005,
      "optimizer": "adam",
      "observe_action": false,
      "observe_parent": true,
      "observe_sibling": true,
      "entropy_weight": 0.03,
      "entropy_gamma": 0.7,
      "ppo": false,
      "ppo_clip_ratio": 0.2,
      "ppo_n_iters": 10,
      "ppo_n_mb": 4,
      "pqt": false,
      "pqt_k": 10,
      "pqt_batch_size": 1,
      "pqt_weight": 200.0,
      "pqt_use_pg": false,
      "summary": false
   },
   "prior": {
      "relational": {
         "targets": [],
         "effectors": [],
         "relationship": null
      },
      "length": {
         "min_": 4,
         "max_": 30
      },
      "repeat": {
         "tokens": "const",
         "min_": null,
         "max_": 3
      },
      "inverse": {},
      "trig": {},
      "const": {},
      "no_inputs": {},
      "uniform_arity": {},
      "soft_length": {
         "loc": 10,
         "scale": 5
      },
      "language_model": {
         "weight": null
      }
   },
   "postprocess": {
      "show_count": 5,
      "save_plots": true
   }
}

from deep-symbolic-optimization.

brendenpetersen avatar brendenpetersen commented on June 10, 2024

This should be fixed in the newest release.

from deep-symbolic-optimization.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.