Giter Site home page Giter Site logo

uwdata / boba Goto Github PK

View Code? Open in Web Editor NEW
61.0 61.0 4.0 389 KB

Specifying and executing multiverse analysis

License: BSD 3-Clause "New" or "Revised" License

Python 77.09% R 22.59% Shell 0.23% C 0.10%
multiverse replicability statistical-analysis

boba's People

Contributors

amethystgear avatar kalealex avatar yyyliu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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

boba's Issues

pandas warnings for example/simple/

need to update the example/simple/ template.py code to get rid of these future warnings.

/home/shiven/.local/lib/python3.7/site-packages/statsmodels/tools/_testing.py:19: FutureWarning: pandas.util.testing is deprecated. Use the functions in the public API at pandas.testing instead.
  import pandas.util.testing as tm
/home/shiven/.local/lib/python3.7/site-packages/statsmodels/compat/pandas.py:23: FutureWarning: The Panel class is removed from pandas. Accessing it from the top-level namespace will also be removed in the next version
  data_klasses = (pandas.Series, pandas.DataFrame, pandas.Panel)

boba run should run all universes even if some failed

When a universe exits with a non-zero status code, it seems the process would stop and subsequent universes will not run. But ideally we want to run every universe the user specifies even if some of the universes fail in the middle.

To reproduce:

  1. Add exit(1) on line 16 here.
  2. Run this command boba run --all --jobs 0 --batch_size 1

paths in R Scripts have to use /, not \

When trying the fertility_r example, the scripts that are generated contain
df <- read.csv2("...\boba-master\example\fertility_r\multiverse\summary.csv", sep = ",", stringsAsFactors = FALSE, check.names=FALSE)
df[1, 8] = summar$coefficients[4, 4]
write.csv(df, file="...\boba-master\example\fertility_r\multiverse\summary.csv", row.names=FALSE)

This is probably the reason for the error I get when trying to compile all scripts with boba run --all.
I cannot see, however, where I can change the paths during generation of the scripts.

Make it possible for other python code to use Parser directly

Besides the command line interface, we should make it possible for other people to use the Parser class for compiling a multiverse from within python.

Now it's possible to import and use the Parser class if they import the boba package, however, Parser prints and exits upon any error, which is undesirable.

The first step is to modify Parser to throw an exception instead of print and exit. We might think if other aspects might need improvement.

Print and log before the universe finishes running?

Currently, a universe will log/print stdout and stderr after it finishes running. Is it possible to log/print these outputs more frequently? Individual scripts can take a long time to run and it will be helpful to track its progress via these outputs (e.g. such a script may periodically print its progress, but we could not view the progress in "real-time" now).

boba compile fails on python 3.8.2

using the boba compile command fails when using python 3.8.2 but succeeds when using python 3.7.5.
to test this, I used pyenv
here is the output from running boba compile in the /example/simple/ directory when using python 3.8.2:

Creating multiverse from ./template.py
Traceback (most recent call last):
  File "/home/shiven/.local/bin/boba", line 8, in <module>
    sys.exit(main())
  File "/usr/lib/python3/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3/dist-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3/dist-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/shiven/.local/lib/python3.8/site-packages/boba/cli.py", line 29, in compile
    ps.main()
  File "/home/shiven/.local/lib/python3.8/site-packages/boba/parser.py", line 394, in main
    self._write_server_config()
  File "/home/shiven/.local/lib/python3.8/site-packages/boba/parser.py", line 334, in _write_server_config
    self.adg.create(self.code_parser.blocks)
  File "/home/shiven/.local/lib/python3.8/site-packages/boba/adg.py", line 211, in create
    self._merge()
  File "/home/shiven/.local/lib/python3.8/site-packages/boba/adg.py", line 87, in _merge
    for g in gp:
RuntimeError: dictionary keys changed during iteration

How does boba assign universes to processes?

I ran a multiverse with about 4,000 universes on 40 processes. About 30 processes were done within the first few minutes, but the remaining took longer than 2 hours to finish.

This might be because boba assigns universes at the beginning instead of dynamically. Need to investigate further.

Improve README

  1. Add a section for how to report issues
  2. Note python version, OS, and other requirements. (Some examples need requirement.txt, some needs Rscript and R dependencies)
  3. Be clear which example does not support boba-server
  4. Include a dataset to test if boba-server is installed successfully

redirect stdout and stderr to file

Each universe should redirect stdout and stderr to a separate file in the boba_logs folder. For example, the stdout and stderr of universe_1 will be in boba_logs/log_1.txt.

Fix the undefined variable issue in constraints

The current design of boba constraints has the following caveat:

"For placeholder variables, the decision is NOT made at the beginning, but until the placeholder variable first appears in the code. Any unmade decision will have option None and index -1."

This is really annoying and we should fix it.

Logo usage?

Dear Boba-team,
we are working on a manuscript about various open science tools in neuroscience, where we plan to include an overview figure with the different tools available. Therefore we wish to include a logo of boba. Do you have some, and are there any license restrictions, or can we just include the graphic into our manuscript?

Best regards,
Tina

Can't run the last universe via boba run

Suppose we have a multiverse of size 2, I should be able to run the 2nd universe with boba run 2, but it returns an error saying "There are only 2 universes."

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.