Giter VIP home page Giter VIP logo

explanatory-agent's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

explanatory-agent's Issues

Explanatory Agent returns blank knowledge graph on example query

When given the example query provided in the apidoc, explanatory agent returns no results.

{
  "message": {
    "query_graph": {
      "edges": [
        {
          "id": "e00",
          "source_id": "n00",
          "target_id": "n01",
          "type": "associated"
        }
      ],
      "nodes": [
        {
          "curie": "EFO:0004465",
          "id": "n00",
          "type": "disease"
        },
        {
          "id": "n01",
          "type": "gene"
        }
      ]
    }
  }
}
{
  "query_graph": {
    "edges": [
      {
        "id": "e00",
        "source_id": "n00",
        "target_id": "n01",
        "type": "associated"
      }
    ],
    "nodes": [
      {
        "curie": "EFO:0004465",
        "id": "n00",
        "type": "disease"
      },
      {
        "id": "n01",
        "type": "gene"
      }
    ]
  },
  "knowledge_graph": {
    "edges": [],
    "nodes": []
  },
  "results": []
}

Thousands of requests from Explanatory agent to RTX-KG2

Recently, there appears to be thousands of requests from Explanatory Agent hitting ARAX's RTX-KG2:
Screen Shot 2022-06-01 at 5 32 27 PM

It appears that these are a ton of one-hop queries, with an example such as:

{
  "message": {
    "query_graph": {
      "edges": {
        "e00": {
          "object": "n01",
          "predicates": [
            "biolink:produces"
          ],
          "subject": "n00"
        }
      },
      "nodes": {
        "n00": {
          "categories": [
            "biolink:ChemicalEntity"
          ],
          "ids": [
            "PUBCHEM.COMPOUND:3926"
          ]
        },
        "n01": {
          "categories": [
            "biolink:NamedThing"
          ]
        }
      }
    }
  },
  "remote_address": "52.149.163.31",
  "submitter": "infores:explanatory-agent"
}

I wanted to make you aware of this in case this behavior is unintentional. Our system is currently handling the load, but we'd appreciate your:

  1. Making sure this isn't some runaway process
  2. Implementing batching/bundling to decrease the number of requests. For example, there are a bunch of one hop (drug X)-[r]-(category Y) queries where the only thing that changes is the predicate r. These can be combined since TRAPI can handle multiple predicates, so (drug X)-[r1, r2, r3]-(category Y). Similarly, the categories of the unpinned nodes can be bundled, so (drug X)-[r1, r2, r3]-(category Y1, Y2, Y3). In addition, you could try not specifying the predicate or category of the un-pinned node, and then post processing the results (equivalent to the query "get me all the neighbors of X".

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.