Skip to content

Commit 8a95971

Browse files
author
AlvarBer
committed
Release 0.9.0-β
Big release with the smart bubble, and much more. Required kivy version is bumped to kivy 1.10 for recycler view. Features * Added a context menu (aka Smart Bubble) that suggest suitable blocks. * Smart Bubble has a search bar. * Execute button now it's a play button. * Added right click hint when no block is present. * Added STR type (represents string/results). * Blocks can now be selected and removed pressing delete. * Added info about what is going to happen when dragging. Bug Fixes * Print block could be spawned more than once through Smart Bubble. * Right click when there is a Smart Bubble present it reset position. * Focus on Smart Bubble search box now remains after creation. * Removed coloredlogs dependency. Refactoring * Notification is now used static instead of as a field of blackboard. * Pins now have their own sub-package. * Blocks now don't need as much boilerplate as before. Docs * Polished academic objectives. * Polished postmortem.
2 parents 4e964aa + f23e0da commit 8a95971

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+880
-550
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ and type safety is enforced when the connection is being made.
1212

1313
![Type safety](docs/images/type_safety.gif)
1414

15+
A smart bubble helps suggesting suitable context-sensitive blocks when making
16+
a connection, showing only the blocks which are type safe.
17+
There is also a search box that can be used for finding a particular block.
18+
19+
![Smart bubble](docs/images/smubble.gif)
20+
21+
1522
How to install?
1623
---------------
1724
If you have pip (Python 3.5+) you can simply type

docs/images/china.png

79.5 KB
Loading

docs/images/final_aspect.png

-2.31 KB
Loading

docs/images/full_use.gif

135 KB
Loading

docs/images/smubble.gif

386 KB
Loading

docs/images/type_safety.gif

159 KB
Loading

docs/src/introduction.md

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ overcome the difficulties of learning the algorithms themselves.
112112

113113
Objectives
114114
----------
115+
<!--
115116
Research:
116117
117118
: On terms of research this project touches on a multitude of topics, from
@@ -127,44 +128,49 @@ Requirements:
127128
A good risk analysis can also prevent failures in a multitude of areas
128129
such as time management or technical debt.
129130
130-
Design:
131-
132-
: The system has to be designed in accordance to those requirements, both
133-
in terms of making it easy to progress through the milestones as well as
134-
producing a usable software at each stage.
135-
136-
Implementation:
137-
138-
: There are some **non-functional requirements**, such as the project running
139-
on the desktop platform, being able to pack it into a executable (to make
140-
evaluation easier for participants), have a framerate good enough for
141-
pleasant use (minimum 30 FPS), or support multithreading (as to not block
142-
the main/UI thread from running when executing the backend),
143-
144131
Testing:
145132
146133
: The software needs to be testable, as to allow for the automation of
147134
testing on the source repository, caching bugs faster in the process.
135+
-->
136+
137+
Feasibility:
138+
: The project has to explore the space of possible solutions on visual
139+
machine learning approaches, trying different estrategies for both the
140+
front and backend of the application (Flow based programming, Dataflow
141+
programming, etc).
142+
143+
Design and Usability:
144+
: The system has to be designed in accordance to requirements, both
145+
in terms of making it easy to progress through the milestones, as well as
146+
producing usable software at each stage.
147+
In all cases it must balance complexity against expresivity, trying to
148+
provide the user with a powerful tool while avoiding complex and
149+
unusable interface.
148150

149151
Evaluation:
150-
151152
: The software will be evaluated by participants that belong to the intended
152153
audience of the system, a form must be prepared detailing the task they
153154
will have to perform, as well as how their data will be treated.
154155

155-
Learning:
156-
156+
Learning Tool:
157157
: The software will help both with the programming barrier, easing the
158158
learning curve of Machine Learning as to allow the learner to focus on the
159159
connections, intuitions and mathematical basis of the algorithms and not on
160160
the implementation details and the quirks of the language.
161161

162-
Faster exploratory work:
163-
162+
Faster Exploratory Work:
164163
: By providing an easy to use, drag and drop interface the user can try a
165164
plethora of different estimators and adjusting the hyper-parameters as
166165
they see fit faster, and without writing a single line of code.
167166

167+
Implementation:
168+
: There are some **non-functional requirements**, such as the project running
169+
on the desktop platform, being able to pack it into a executable (to make
170+
evaluation easier for participants), have a framerate good enough for
171+
pleasant use (minimum 30 FPS), or support multithreading (as to not block
172+
the main/UI thread from running when executing the backend),
173+
168174

169175
What the project is not
170176
-----------------------

docs/src/postmortem.md

Lines changed: 98 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,112 @@
11
Postmortem
22
==========
33

4-
After the evaluation it is time to make a retrospective, and look what has
5-
been achieved and what has not.
6-
7-
On the introduction several objectives were mentioned, let's revisit those.
8-
9-
* Research. Background research was conducted on fields covered by the
10-
system. It was particularly interesting learning about the dataflow paradigm,
11-
because it is a niche I was not familiar with.
12-
It was also great looking at the available commercial solutions, they prove
13-
that there is a lot of enterprise interests on this kind of systems.
14-
15-
* Requirements. The bi-weekly iterations worked reasonably well, there was not
16-
anything that got stuck or delayed more than one additional iteration.
17-
It also proved useful for having a usable system from even the first iteration.
18-
19-
* Design. The final implementation followed the initial sketches pretty
20-
closely, proving the initial design had solid fundamentals, the good evaluation
21-
score, and the remarks given by the users demonstrates that while there are
22-
plenty of improvements that can be done it remains a good interface to use.
23-
24-
* Implementation. At the end of the project the non-functional requirements
25-
have been met, delivering a windows single executable file that participants
26-
used for the evaluation, while keeping a good performance, handling many
27-
blocks without a hitch, and keeping the frame rate steady while modifying
28-
connections and running the execution of the pipeline simultaneously.
29-
30-
* Testing. Probably the weakest part of the project because all the backend
31-
is based around visual elements unit testing proved pretty useless, and this
32-
part comprised the biggest part of the code.
33-
34-
* Evaluation. Despite having a low number of participants the evaluation
35-
resulted in a mostly unanimous good reviews of the software, as well as
36-
providing very useful feedback for future improvements.
37-
38-
* Learning. Because most of the milestones were achieved the final system has
39-
proved to be useful enough for its use as a learning tool, it was even
40-
remarked by two participants how easy it was to use, and how easy it was to do
41-
complex actions (such as hyper-parameter tuning) compared to other
42-
frameworks/libraries.
43-
44-
* Faster exploratory work. I personally used the software for performing
45-
ml analysis, finding it worked pretty well for early exploratory work, when
46-
limited by the lack of a block it was pretty easy and fast adding a block
47-
that solved the problem (in around ~20 lines of code).
48-
During this use I realized another possible improvement, caching operations,
49-
with this the results of pipelines are not recalculated unless something
50-
changes upstream, this provides the closest thing to a visual REPL[^REPL].
51-
52-
All the major milestones were reached except the compilation feature, this is
53-
because deciding the order in which blocks get translated means settling
54-
the current evaluation strategy, while leaving undecided means that some
55-
interesting such as optimistic evaluation can be implemented on the feature,
56-
for more on this check the type chapters, two languages section.
57-
58-
In conclusion Persimmon has achieved most of the settled objectives, proving
4+
After the evaluation it is time to make a retrospective, look what Persimmon
5+
has achieved.
6+
7+
8+
Objectives Review
9+
-----------------
10+
<!--
11+
Research:
12+
: Background research was conducted on fields covered by the
13+
system. It was particularly interesting learning about the dataflow paradigm,
14+
because it is a niche I was not familiar with.
15+
It was also great looking at the available commercial solutions, they prove
16+
that there is a lot of enterprise interests on this kind of systems.
17+
18+
Requirements:
19+
: The bi-weekly iterations worked reasonably well, there was not
20+
anything that got stuck or delayed more than one additional iteration.
21+
It also proved useful for having a usable system from even the first iteration.
22+
23+
Testing:
24+
: Probably the weakest part of the project because all the backend
25+
is based around visual elements unit testing proved pretty useless, and this
26+
part comprised the biggest part of the code.
27+
-->
28+
29+
Feasibility:
30+
: Using evaluation it can be concluded that it is possible to create a
31+
machine learning visual interface that is as flexible as a language,
32+
including a type system and errors in compilation time, and yet remains
33+
simple to use, even for newcomers.
34+
35+
Design and Usability:
36+
: The final implementation closely followed the initial sketches, proving the
37+
initial design had solid fundamentals.
38+
The good evaluation scores, and final remarks given by participants
39+
demonstrates that the interface has accomplished its objectives of
40+
producing a powerful yet simple to use interface.
41+
Features like the smart bubble that use instrospection to suggest suitable
42+
blocks to connect leverage the type system to help the user create the
43+
pipelines faster and easier.
44+
45+
Evaluation:
46+
: Despite having a low number of participants the evaluation
47+
resulted in a mostly unanimous good reviews of the software, as well as
48+
providing very useful feedback for future improvements.
49+
50+
Learning Tool:
51+
: Because most of the milestones were achieved the final system has
52+
proved to be useful enough for its use as a learning tool, it was even
53+
remarked by two participants how easy it was to use, and how easy it was to do
54+
complex actions (such as hyper-parameter tuning) compared to other
55+
frameworks/libraries.
56+
57+
Faster Exploratory Work:
58+
: I personally used the software for performing
59+
ml analysis, finding it worked pretty well for early exploratory work, when
60+
limited by the lack of a block it was pretty easy and fast adding a block
61+
that solved the problem (in around ~20 lines of code).
62+
During this use I realized another possible improvement, caching operations,
63+
with this the results of pipelines are not recalculated unless something
64+
changes upstream, this provides the closest thing to a visual REPL[^REPL].
65+
66+
Implementation:
67+
: At the end of the project the non-functional requirements have been met,
68+
delivering a windows single executable file that participants used for the
69+
evaluation, while keeping a good performance, handling many blocks without
70+
a hitch, and keeping the frame rate steady while modifying connections and
71+
running the execution of the pipeline simultaneously.
72+
73+
Retrospective
74+
-------------
75+
With over 7k lines of code 10 releases, and more than 200 commits, Persimmon
76+
stands as a medium size codebase, since its inception it has gathered
77+
attention, with over 3000 visits, and more than 90 stars on [Github].
78+
79+
<!--
80+
![Lines of code](images/loc.png)
81+
-->
82+
83+
It has been featured on [multiple], [websites], and even won [best project] at
84+
the compshow 2017 at the University of Hertfordshire.
85+
86+
![Chinese machine learning forum](images/china.png)
87+
88+
Conclusion
89+
----------
90+
In conclusion Persimmon has achieved all proposed objectives, proving
5991
there is room for improvement on the field of visual languages for machine
6092
learning, and that small improvements make a significant impact on the user
6193
experience.
62-
Giving more power to the user should not mean making the interface more
63-
complicated.
94+
In fact a system should not only make it hard or impossible to construct
95+
incorrect graphs, but should make it easier and faster to create correct graph.
96+
97+
Giving more power to the user does not mean making the interface more
98+
complicated, in fact it can be the opposite.
6499

65100

66101
Bibliography
67102
============
68103

104+
[Github]: htttps://github.com/AlvarBer/Persimmon
105+
[multiple]: http://mailchi.mp/pythonweekly/python-weekly-issue-295
106+
[websites]: http://forum.ai100.com.cn/blog/thread/ml-2017-05-10/
107+
[best project]: https://twitter.com/HertfordshireCS/status/857266574356598785
108+
69109
[^REPL]: A Read Eval Print Loop is an interactive console many modern
70110
programming languages that allows for the interactive execution of
71111
expressions, saving the results in a local session.
112+

persimmon.spec

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,15 @@ import pathlib
99

1010

1111
kv_files = glob('**/*.kv', recursive=True)
12+
png_files = glob('**/*.png', recursive=True)
1213

1314
non_python_files = []
14-
for file in kv_files:
15+
for file in kv_files + png_files:
1516
non_python_files.append((file,
1617
str(pathlib.Path(*pathlib.Path(dirname(file)).parts[1:]))))
1718
block_cipher = None
1819

19-
non_python_files.append(('persimmon/connections.png', '.'))
20+
#non_python_files.append(('persimmon/connections.png', '.'))
2021

2122
a = Analysis(['persimmon\\__main__.py'],
2223
pathex=['persimmon'],

persimmon/__main__.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import sys
2-
if (len(sys.argv) > 1 and
3-
(sys.argv[1] == '-d' or sys.argv[1] == '--debug')):
4-
import coloredlogs
5-
coloredlogs.DEFAULT_DATE_FORMAT = '%H:%M:%S'
6-
coloredlogs.DEFAULT_LOG_FORMAT = '[%(asctime)s] %(name)s - %(message)s'
7-
coloredlogs.install(level='DEBUG')
2+
if len(sys.argv) > 1 and sys.argv[1] in {'-d', '--debug'}:
3+
#import coloredlogs
4+
#coloredlogs.DEFAULT_DATE_FORMAT = '%H:%M:%S'
5+
#coloredlogs.DEFAULT_LOG_FORMAT = '[%(asctime)s] %(name)s - %(message)s'
6+
#coloredlogs.install(level='DEBUG')
7+
import logging
8+
logging.basicConfig(level=logging.DEBUG)
89
if hasattr(sys, '_MEIPASS'):
910
import os
1011
os.chdir(sys._MEIPASS)

0 commit comments

Comments
 (0)