Giter Site home page Giter Site logo

Use YAML interface to myApp about next_chem HOT 6 CLOSED

stsievert avatar stsievert commented on September 9, 2024
Use YAML interface to myApp

from next_chem.

Comments (6)

stsievert avatar stsievert commented on September 9, 2024

Passing in a file as a string doesn't address my concern. Each file has a specific format: each line has a (string, string, int) or something. We have a system to pass in arguments to the app. Use it.

I don't know if this will effect the speed issues. It will certainly help diminish complication.

from next_chem.

ayonsn017 avatar ayonsn017 commented on September 9, 2024

Different algorithms take as input different types of files. The format within the file are different. Hence I cannot specify it in yaml in a single format.

from next_chem.

stsievert avatar stsievert commented on September 9, 2024

Looking in local/data I see two file types: one JSON object and many different CSVs with (almost) the same header. I'm assuming the CSV files are the different files? This can be worked around.

In the YAML file you can specify a list of dicts. In each dict you can specify the keys. Each key can be optional, which is what I think you're concerned about.

You'd want to pass something like

[{'mol1': 'HCN', 'rep1': 'SF', 'mol2': 'HCN', 'rep2': 'SF', 'same': True},
 {'mol1': 'H20', 'rep1': 'SF', 'mol2': 'H20', 'rep2': 'SF', 'same': True}
 ...
]

where each dictionary could optionally include a probability. This could be done by a YAML snippet like

questions_to_ask:
  type: list
  values:
    type: dict
    values:
      mol1:
        type: str
      rep1:
        type: str
      mol2:
        type: str
      rep2:
        type: str
      same:
        type: bool
      prob:
        type: num
        optional: true  

(untested, but it's something like this).

from next_chem.

ayonsn017 avatar ayonsn017 commented on September 9, 2024

Those are the two types right now which can be solved by an optional argument. In future, we expect a few more types of inputs which will not be similar to these two.

from next_chem.

stsievert avatar stsievert commented on September 9, 2024

we expect a few more types of inputs which will not be similar to these two.

We can specify that we expect one of several input types, or we can introduce other keys to expect all input types. We can find a workaround for that when it comes up – this issue isn't blocking.

from next_chem.

ayonsn017 avatar ayonsn017 commented on September 9, 2024

Changed the input from string to a list of dictionaries.

from next_chem.

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.