liflab / labpal Goto Github PK
View Code? Open in Web Editor NEWEasily run experiments on a computer
Home Page: https://liflab.github.io/labpal
License: GNU General Public License v3.0
Easily run experiments on a computer
Home Page: https://liflab.github.io/labpal
License: GNU General Public License v3.0
Add a feature in the GUI to edit the input parameters of an experiment live while the lab is running
Since experiments in a lab will likely have a high load, one should catch out of memory exceptions and gracefully deal with them (currently, LabPal simply crashes when this happens).
...i.e. groups within a group.
...it only stops the assistant from starting new experiments. The assistant should also kill the current thread.
This is a remnant from the time where experiments were serialized "by hand"; imposing experiment parameters to be a JSON map facilitated its serialization. Now that LabPal uses Azrael, there is no reason to force the user to use a JSON map for parameters; it should simply be a Map<String,Object>
.
Currently, the method is expected to return null
when everything is OK, and a string when there is a problem with the environment. That is quite an odd way of implementing it.
Suggestion:
void
EnvironmentException
when a problem is detected. The exception's message describes the problem.This requires:
EnvironmentException
Laboratory
class where isEnvironmentOk()
is called (to take into account this refactoring)It should display the warning, but still start
If you run the same experiments on multiple machines, it may become confusing to know what window corresponds to what host. One could start LabPal and, optionally, select a "color scheme" so that the GUI would display using a slightly different shade.
If it doesn't, the Azrael serialization library cannot deserialize a lab and will throw an error message like "method MyExperiment() does not exist".
When one adds an experiment to a lab, the lab should check if the class of that experiment has an empty constructor. If not, a warning should be displayed in the Status page, saying something like "Loading this lab from a file won't work".
Once its queue runs out, the total running time goes back to 0
If field m_warnings
in class Experiment
contains elements (of type Exception
), the Azrael serializer falls into an infinite loop trying to serialize these objects. The current workaround is to declare this field transient
, but this means that experiment warnings are not preserved when saving/loading.
The Remove button does not seem to work
When addding experiments to an assistant, the page reloads with the message "x experiments added; start the assistant". The "start" link in the message does lead to the assistant page, but the assistant does not start.
This is caused by the fact that the assistant page looks for the "start" parameter only in a POST HTTP request. That link loads the page with the correct parameter, but in a GET request.
Exception in thread "main" java.lang.NullPointerException
at pattheminer.MainLab.setup(MainLab.java:124)
at ca.uqac.lif.labpal.Laboratory.loadFromJson(Laboratory.java:651)
at ca.uqac.lif.labpal.Laboratory.loadFromString(Laboratory.java:634)
at ca.uqac.lif.labpal.Laboratory.loadFromZip(Laboratory.java:760)
at ca.uqac.lif.labpal.Laboratory.loadFromFilename(Laboratory.java:791)
at ca.uqac.lif.labpal.Laboratory.initialize(Laboratory.java:943)
at ca.uqac.lif.labpal.Laboratory.initialize(Laboratory.java:891)
at pattheminer.MainLab.main(MainLab.java:525)
And there should be a method for retrieving what the command sent there
When an experiment has to generate prerequisites before running, its execution time includes that process. This means that an experiment may get killed by the assistant while it is still generating the prerequisites.
An experiment should have two "start" times: the start of the whole process, and the start of the run
method. Timeout should apply to the second, not the first.
Solution is obvious ;-)
Currently, the LDI is a sequential number. This means that the same experiment may be assigned a different LDI in a lab, depending on what other experiments there are and the order in which they were added. (The same applies for a plot or a table.)
For an experiment, the LDI should rather be based on its type and the values of its input parameters. Maybe some form of hash?
What should a proper LDI be for a table or a plot?
In the progress bar of the status page, an experiment that is running is categorized in "Other". There should be a special category (and color) for the running experiments.
Defaults to 21212
Instead of manually calling Matcher.quoteReplacement()
when replacing placeholders with content in every template page (and potentially forget to do it), create a replacePlaceholder
method that would do it automatically.
Running LabPal on a phone is a bit hard. There should be a responsive GUI, or at least (using media queries) a different template for small screens.
In the GUI (or somewhere else), an author could provide its private key, and include in the saved lab an encrypted hash of the lab's results. See #4 for one possible use.
There should be a method in CommandRunner
where the contents sent to the command's standard input come from an InputStream
instead of a String
.
Suggestion:
runAndGet
into a delegate to the new method, simply wrapping the String
into a StringInputStream
When visiting the URL "assistant?start" with a GET request, the resulting page shows the message "Assistant started", but the button "Start the assistant" is also present. It should rather be the Stop button.
When viewing experiments in a group, clicking on the checkbox in the list header selects all experiments in all groups; it should select all experiments in the group only.
In the experiments page
There's something wrong with the build script. Running from Eclipse is OK, but calling the plots page when running from a compiled jar leads to:
java.lang.NoSuchMethodError: ca.uqac.lif.labpal.table.Table.getDataTable()Lca/uqac/lif/labpal/table/DataTable;
at ca.uqac.lif.labpal.plot.gnuplot.Scatterplot.toGnuplot(Scatterplot.java:130)
at ca.uqac.lif.labpal.plot.gnuplot.GnuPlot.toGnuplot(GnuPlot.java:90)
at ca.uqac.lif.labpal.plot.gnuplot.GnuPlot.getImage(GnuPlot.java:107)
at ca.uqac.lif.labpal.plot.Plot.getImage(Plot.java:321)
Should be fixed by addressing sylvainhalle/Jerrydog#2
Currently, it assumes that the experiments page has experiments with IDs 1 to the length of the list in a single contiguous interval. If you use a filter, this is no longer the case.
In the experiments page, checking the top checkbox selects all experiments. Checking it again does not unselect all experiments (it does nothing).
Enough said
Try to show the third plot in BrowserLab. You get this:
java.lang.ClassCastException: ca.uqac.lif.mtnp.table.PrimitiveValue cannot be cast to java.lang.Number
at de.erichseifert.gral.plots.PiePlot$PiePlotLegend.getEntries(SourceFile:783)
at de.erichseifert.gral.plots.legends.AbstractLegend.add(SourceFile:275)
at de.erichseifert.gral.plots.legends.ValueLegend.add(SourceFile:86)
at de.erichseifert.gral.plots.AbstractPlot.add(SourceFile:581)
at de.erichseifert.gral.plots.PiePlot.add(SourceFile:917)
at de.erichseifert.gral.plots.AbstractPlot.add(SourceFile:564)
at de.erichseifert.gral.plots.AbstractPlot.add(SourceFile:554)
at de.erichseifert.gral.plots.PiePlot.(SourceFile:854)
at ca.uqac.lif.mtnp.plot.gral.PieChart.getPlot(PieChart.java:42)
at ca.uqac.lif.mtnp.plot.gral.GralPlot.getPlot(GralPlot.java:119)
at ca.uqac.lif.mtnp.plot.gral.GralPlot.getImage(GralPlot.java:87)
at ca.uqac.lif.mtnp.plot.Plot.getImage(Plot.java:311)
at ca.uqac.lif.labpal.server.PlotImageCallback.process(PlotImageCallback.java:93)
at ca.uqac.lif.jerrydog.Server.handle(Server.java:252)
at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79)
at sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:83)
at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:82)
at sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:675)
at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79)
at sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:647)
at sun.net.httpserver.ServerImpl$DefaultExecutor.execute(ServerImpl.java:158)
at sun.net.httpserver.ServerImpl$Dispatcher.handle(ServerImpl.java:431)
at sun.net.httpserver.ServerImpl$Dispatcher.run(ServerImpl.java:396)
at java.lang.Thread.run(Thread.java:748)
The title says it all
The methods to read a file accept a path relative to the location of the class given in parameter. The method to list the contents of a directory disregards the location of the class and expects an absolute path from the root of the project.
In the text browser Lynx, the "Download all plots" button does not work. It says "Bad HTML! No form action defined". Individual plot buttons work, through.
Not straightforward, as the MacroMap
object creates multiple macros and they will not necessarily be displayed in sequence among other macros.
Elinks does not know what to do with the HTTP response. Is its Content-type
correct? Lynx does not have this problem.
When experiments are re-uploaded from a JSON file:
Containing the datapoint ID of each cell
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.