Giter VIP home page Giter VIP logo

Comments (10)

famulare avatar famulare commented on July 19, 2024 2

This works too:

{
  "model_type": "inla",
  "observed": [
    "residence_cra_name",
    "site_type",
    "pathogen",
    "flu_shot",
    "sex",
    "encountered_week"
  ],
  "pathogen": [
    "all"
  ]
}

from incidence-mapper.

jameshadfield avatar jameshadfield commented on July 19, 2024 1

@devclinton -- thanks for setting up the swagger page :)

Just a heads up that the provided example query_model is currently broken

{
  "model_type": "inla",
  "observed": [
    "encountered_week",
    "flu_shot",
    "PUMA5CE",
    "sampling_location"
  ],
  "pathogen": [
    "all"
  ]
}
{   "error": "Could not find the specified id" }

from incidence-mapper.

famulare avatar famulare commented on July 19, 2024

But this query returns valid csv and json

{
  "model_type": "inla",
  "observed": [
    "residence_puma",
    "site_type",
    "pathogen",
    "flu_shot",
    "sex",
    "encountered_week"
  ],
  "pathogen": [
    "all"
  ]
}

from incidence-mapper.

famulare avatar famulare commented on July 19, 2024

The one that failed is the biggest CSV, (and also most likely to have a nan or inf value, which shouldn't matter, but still).

from incidence-mapper.

famulare avatar famulare commented on July 19, 2024

I also haven't found an inla_latent call that works. I believe each of the above models should have a latent partner, and I've tried to reproduce what I can see from within the modelDB.tsv, but haven't gotten an inla_latent query to work yet.

Example I think should work:

{
  "model_type": "inla_latent",
  "observed": [
    "residence_cra_name",
    "pathogen",
    "encountered_week"
  ],
  "pathogen": [
    "all"
  ]
}

possibly without "observed":"pathogen"

Returns

  "error": "Could not find the model with the id dcf443667ceb4909a3163864f720309d from query string: {\"model_type\": \"inla_latent\", \"observed\": [\"residence_cra_name\", \"pathogen\", \"encountered_week\"], \"pathogen\": [\"all\"]}"

from incidence-mapper.

devclinton avatar devclinton commented on July 19, 2024

I am going to take a look at this evening/ tomorrow. I suspect this is partially some of the error handling. My guess is I stream the model output before it is ready. That would make it appear successful but possible empty or truncated. I have an idea how to handle this.

On the human readable name, I need to make some updates. I think now the pathogen is most likely missing.

I will first start with latent. I know I had tested an older model that was a latent but that is before the recent updates

from incidence-mapper.

devclinton avatar devclinton commented on July 19, 2024

Also, as a side note, thanks for this list. If we can possibly maintain a list of models I would like to add a production system sanity test to catch any issues that arise can be caught early once all this is resolved

from incidence-mapper.

jotasolano avatar jotasolano commented on July 19, 2024

Adding to this, (unless I'm doing something wrong), this query is also returning an error:

{
  "model_type": "inla",
  "observed": [
    "residence_puma",
    "encountered_week"
  ],
  "pathogen": [
    "all"
  ]
}

{ "error": "Could not find the model with the id c1ccad065fb9028d502f42bfc3c65974 from query string: {\"model_type\": \"inla\", \"observed\": [\"residence_puma\", \"encountered_week\"], \"pathogen\": [\"all\"]}" }

from incidence-mapper.

devclinton avatar devclinton commented on July 19, 2024

I have tested the following models and they are working now

{
  "model_type": "inla_latent",
  "observed": [
    "residence_cra_name",
    "pathogen",
    "encountered_week"
  ],
  "pathogen": [
    "all"
  ]
}
{
  "model_type": "inla_observed",
  "observed": [
    "residence_puma",
    "encountered_week"
  ],
  "pathogen": [
    "all"
  ]
}
{
  "model_type": "inla_observed",
  "observed": [
    "residence_cra_name",
    "site_type",
    "pathogen",
    "flu_shot",
    "sex",
    "encountered_week"
  ],
  "pathogen": [
    "all"
  ]
}

I am tested other models
You can check available models at

http://40.112.165.255/v1/ui/#!/generic95model/seattle_flu_incidence_mapper_generic_models_read_all

I still need to update example. Next public update the Swagger will have a working default example as well

from incidence-mapper.

devclinton avatar devclinton commented on July 19, 2024

I believe this is resolved. Closing now after the last API update

from incidence-mapper.

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.