exasol / advanced-analytics-framework Goto Github PK
View Code? Open in Web Editor NEWFramework for building complex data analysis algorithms with Exasol
License: MIT License
Framework for building complex data analysis algorithms with Exasol
License: MIT License
Background:
Some algorithms need communication between UDF Instances of a UDF Call for example ML algorithms or some HPC algorithms. To achieve this, we need first to discovery all UDF instances of a UDF call. We can have many instances in a cluster, such that we need to do first a local discovery per node.
In case of any errors in the execution, temporarily created
-- bucketfs files
-- tables
should be cleaned, if with the keeping option not selected.
don't let Lua do sys.exit() when an error occurs
in the current installation, the bundled Lua script is generated while installing the project
however this installation requires Lua and its dependencies to be installed in the user machine.
in order to break this dependencies, we should store the bundled Lua scripts in the wheel.
add functionality to save bundled script
provide an option to cli whether to re-bundle or not
call re-bundling in each commit to be sure that it is saved
def _invalidate(self):
self._check_if_valid()
self._invalid_object_proxies = self._invalid_object_proxies.union(self._valid_object_proxies)
self._valid_object_proxies = set()
self._owned_object_proxies = set()
self._is_valid = False
child_context_were_not_released = False
for child_query_handler_context in self._child_query_handler_context_list:
if child_query_handler_context._is_valid:
child_context_were_not_released = True
child_query_handler_context._invalidate()
if child_context_were_not_released:
raise RuntimeError("Child contexts are not released.")
I saw we are missing a README in this project.
- pyproject.toml
- exasol_advanced_analytics_framework
- tests/test_package/
- pyproject.toml
- include: ../event_handlers or if this doesn't work we create symlink ../event_handlers -> test_package
- tests/event_handlers
- test_event_handler1.py
- test_event_handler2.py
- language_container
- exasol_advanced_analytics_framework
- flavor_base
- release
- install exasol_advanced_analytics_framework
- test depends on release
- install test_package
Vagrant is a tool for developer to provision reproducible development environments. We use vagrant to provide a developer sandbox for testing this project.
class Variables
def __init__(parent_scope_variables)
"""
Variables are scoped and typed and need to be declared before usage. The scope means when ever you entry a Block (e.g. in IfStatement, your variables get a new Scope, variables you create in this scope are only visiable in this scope or subscope, but not in the parent scopes.)
"""
self.parent_scope_variables = parent_scope_variables
self.local_variables:Dict[name,Variable] = {}
def declare(name, type, value)
def get(name)
def set(name, value)
class Statement
"""
We implement objects for the usual imparative constructs, such as Statements, If-Statements, Loops, .... Except that our statements consist of an init_handler method which is called first and handle_event method, which is can execute SQL queries via the Continue Result
"""
def init_hanler(variables:Variables)
def handle_event(event_context, event_handler_context):Union[Continue,Finished]
class StatementChain(Statement)
def __init__(event_hanlder_factories:List[StatementFactory])
self.event_hanlder_factories=event_hanlder_factories
def init_hanler(variables:Variables)
self.event_handlers = create_event_hanlder(self.event_hanlder_factories)
self.current_event_handlers_idx = 0
self.event_handlers[self.current_event_handlers_idx].init_handler(variables)
def handle_event(event_context, event_handler_context):Union[Continue,Finished]
result = self.event_handlers[self.current_event_handlers_idx](event_context, event_handler_context)
if isinstance(result, Continue):
return result
else
if self.current_event_handlers_idx<len(self.event_handlers)-1:
self.current_event_handlers_idx+=1
self.event_handlers[self.current_event_handlers_idx].init_handler(variables)
elif
return result
class ForEachStatement(Statement)
class WhileStatement(Statement)
class IfStatement(Statement)
We need a User Guide for this repo. It should contain the following sections:
def __hash__(self):
self._check_if_valid()
return hash(id(self))
def cleanup(self):
if self._is_valid:
raise Exception("Cleanup of BucketFSLocationProxy only allowed after release.")
for file in self._bucketfs_location.list_files_in_bucketfs(""):
self._bucketfs_location.delete_file_in_bucketfs(file)
_ScopeQueryHandlerContextBase.get_temporary_path should be private because it is used by other functions and doesn't returna object that can be cleaned up
*.sql linguist-generated
def handle_start(parameters,EventHandlerContext)->EventHandlerResult
def handle_query_result(EventContext)->EventHandlerResult
The EventContext is an abstraction around the UDFContext or any exasol driver (e.g. pyexasol). We simplified its interface, such that either of them can implement that. However, in contrast to the UDFContext returns next method the row and not a bool for indicating if there are more rows.
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.