autonlab / auviewer Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Rename api.listAvailableProjects to api.listProjects, and add a deprecation warning to the original function handle. This aligns better with user expectations and method naming patterns used elsewhere in the API.
Create an example Jupyter notebook which demonstrates a typical usage pattern such as inspecting projects & files, creating pattern sets, creating assignments, inspecting pattern sets & assignments, and retrieving & assembling annotation data for modeling.
The Flask server implementation is currently in development mode. Change this to production mode.
Four main tasks here:
Implement a task queue for downsampling files (in future, it may be used for other jobs such as featurization).
Refer to #14 for the processes which will use the task queue.
Ideally, the task queue will create no new dependencies outside of Python, such that the viewer may still be installed with only the pip install command and run as a pure python module.
Optionally, we may add instructions for additional installation/configuration outside of Python for better performance or robustness (e.g. Redis).
A single annotation form structure is currently hard-coded into the viewer. Generalize this such that any annotation template structure can be specified (i.e. make it possible to specify any set of field names, types, and value options).
The current implementation is:
And also, there is obviousy the corresponding requisite functionality for annotation retrieval, rendering, and updating.
Because the backend treats the label (all form data) as a single json string and has no specific functionality (to my recollection) for what is inside the label (the form structure), it is only the client-side javascript code which needs to be generalized.
Leaving this here as a nice-to-have for future:
auv -df somefile.h5
We've incurred some regressions, and some functionality has also changed. Therefore, we wish to set the functionality of File.f and File.pf to the following:
After changes, please test that the following still works:
One caveat:
The projects list on the index page is displaying an incorrect file count for a project. Reproduction details available internally.
Some Python documentation is no longer being generated:
The viewer currently takes too long to startup. Please improve the startup time. Possible strategies include:
Currently, new projects and/or new files within projects are detected only upon initial launch of the viewer. Make it possible to create, load, and reload projects while the viewer is running.
Currently, a project is defined by a folder within the projects folder in the viewer's data directory on disk, and its files (original & processed) are contained therein. However, sometimes a user may want to create a virtual project, e.g. a project which consists of files already contained in another project. A common example would be where multiple studies are occurring on a single set of files (or different subsets of a single master set of files).
Please add the ability to create virtual projects in the viewer such that the virtual project contains all or some of the files of a different project.
Currently, the downsample parameters (M and stepMultiplier, see here) are configured at the application level, and the processed files which contain the downsample data are assumed to be in sync with these parameters.
Please change this so that these parameters are configured per-file and embedded as metadata in the processed files, such that the parameters can vary between files.
On the canvas underlay renderer, the current assignment alert is set to overlay most other things. However, if there is a previously annotated assignment, it might overlay the current assignment. Change this so that the current assignment is rendered above all other underlay items.
Takes ~20 minutes to open with ~20K files.
If you modify auviewer/file.py line 291 (link) to 'clinical/medications'
instead of 'ehr/medications'
and then run the viewer against the sample file (as outlined in the Getting Started with Development documentation), you will see a hard-coded display of this specific events series:
The relevant places in code where this is done are:
You can see where the events data comes through from the initial_file_payload method in the browser console:
We need to generalize this behavior to handle any event series. Actually, the js code may already be fully generalized or mostly so. The backend code needs to be changed, however, to identify and assemble all series which can be rendered as events.
The viewer uses the audata library to read from the audata file format (audata is basically a file format superimposed on hdf5). One good place to start here is by familiarizing yourself with using the audata library to open the sample file. From the auviewer (outer) directory, try this Python (I have not checked this, but it should be something like this):
import audata as aud
af = aud.File.open('examples/sample_patient.h5')
# print the default representation of the medications dataset
print(af['/clinical/medications'])
# pull the entire medications series as a pandas dataframe, and then print it
df = af['/clinical/medications']).get()
print(df)
So, generally the proof-of-concept code in the viewer which renders the medications event series treats each row in the medications table as a medication.
My suggestion for now would be to start by adding a way to specify a list of series to treat as events in the template.
Later, we can do fancier things like:
Hitting escape to close a new annotation dialog results in the annotation appearing to have been created w.r.t. the canvas coloring. Make hitting escape equivalent to clicking Cancel.
In the annotation dialog, when a user clicks the Create or Save button, disable the button and show a loading indicator in order to suppress repeated clicks.
Use cases:
Related functionality, to-be state:
There is currently a hard-coded default username & password. Please change this to prompt on first load for a default username & password.
Now that we're implementing a task queue, let's modify the downsampling workflow to the following:
Effectively, when the viewer starts up, it should not load any files, however it should check whether each file has been downsampled and, if not, add a downsampling job for the file to the task queue.
Let's implement this as follows:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.