Code Monkey home page Code Monkey logo

extraction-gym's People

Contributors

bastacyclop avatar cowardsa avatar ezrosent avatar mwillsey avatar oflatt avatar philzook58 avatar trevorhansen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

extraction-gym's Issues

ILP cost larger than greedy cost

Thank you for making this repo open-source. It is a really neat and helpful tool for egraph extraction research.

While executing the code, I've noticed an inconsistency in the results produced by different extraction methods. The cost outcomes derived from the ilp-cbc method consistently surpass those from both the greedy-dag and faster-greedy-dag methods. Theoretically, given that ILP aims for the optimal cost, it should always yield a result less than or equal to the greedy methods.

Specifically, here are some examples:

tensat/nasrnn_acyclic.json

{
    "name": "data/tensat/nasrnn_acyclic.json",
    "extractor": "greedy-dag",
    "tree": 1021.1320661730861,
    "dag": 1.0898100023314328,
    "micros": 3009220
}
{
    "name": "data/tensat/nasrnn_acyclic.json",
    "extractor": "ilp-cbc",
    "tree": 1697.1535464829212,
    "dag": 1.5102849980721658,
    "micros": 6817584
}

data/babble/list_list_hard_test_ellisk_2019-02-15T11.26.41--bench010_it15.json

{
    "name": "data/babble/list_list_hard_test_ellisk_2019-02-15T11.26.41--bench010_it15.json",
    "extractor": "greedy-dag",
    "tree": 915,
    "dag": 425,
    "micros": 13953
}
{
    "name": "data/babble/list_list_hard_test_ellisk_2019-02-15T11.26.41--bench010_it15.json",
    "extractor": "ilp-cbc",
    "tree": 1862,
    "dag": 813,
    "micros": 235790
}

Any insights or clarifications you can offer would be greatly appreciated.

faster-greedy-dag extractor sometimes returns cycles.

Using the tests in #26

target/release/extraction-gym data/fuzz/8.json --extractor=faster-greedy-dag --out=output/fuzz/8.json-faster-greedy-dag.json

Get this error:

thread 'main' panicked at 'assertion failed: self.find_cycles(&egraph, &egraph.root_eclasses).is_empty()', src/extract/mod.rs:79:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

global-greedy-dag sometimes extracts nodes from the wrong class

With the extra checking in #26, global-greedy-dag now fails because it selects nodes from the wrong class:

target/release/extraction-gym data/eggcc-bril/duplicate_branch.bril.json --extractor=global-greedy-dag --out=output/eggcc-bril/duplicate_branch.bril.json-global-greedy-dag.json
iteration 1
iteration 2
iteration 3
iteration 4
iteration 5
iteration 6
thread 'main' panicked at 'assertion failed: node.eclass == *cid', src/extract/mod.rs:84:13

Previously this wasn't detected. I realised when global-greedy-dag has some extractions with a lower dag-cost than the optimal.

Cycles found in tensat acyclic egraphs

If I understand correctly, the egraphs end with acyclic in tensat dataset are egraphs that are pruned ahead of time. However, I found there are cycles existing in some of these acyclic egraphs.

For example, in bert_acyclic.json, one can easily verify that enodes 553__1, 475__1, 7680__0 form a cycle. And there the number of cycles in some acyclic tensat egraphs is not small. According to my analysis, here is the number of cycles for each of the tensat acyclic egraphs:

  • bert_acyclic: 915
  • nasneta_acyclic: 30
  • nasrnn_acyclic: 10
  • vgg_acyclic: 0
  • resnet50_acyclic: 0

I am wondering if this is because my understanding is not correct or any other potential bugs?

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.