Skip to content

Commit

Permalink
Css-methodSelection (#113)
Browse files Browse the repository at this point in the history
* Update functionSelection (#108)

* Reupload integral plugin

* argopt plugin

* Css user interaction for Bayesian Optimisation (#91)

* Display for less than 3 parameters

* Added current selection

* DoubleClick for editing

* Change plugin readable name

In order to avoid confusions with the Optimisation plugin, changed naming to indicate it referes to the ui.

* Added icon to GUI window

* Fix more than 2 variables error

* Minor aesthetic changes

* Css bayesian optimisation (#98)

* added re-attempt of env and pybullet

* ongoing pybullet/arg population changes

* added pybullet stubs

* added credit to stubs

* added gui/headless choice function

* added environment module tag to XML parser

* added pybullet config file

* renamed Environment module to remove plural

* added types and ABC for env modules

* removed renamed scripts

* modified run pipeline for pybullet

* moved relative to absolute converter to import helper

* added half-cheetah model

* pybullet loading and running working

* added half cheetah example with mass

* added option to set gravity

* removed requirement for data

* removed data loading for pybullet example script

* added __getattr__ function to access all pybullet methods from ENV class

* added option parsing

* Change progressTracker to treeview

* Correct icon

* WIP: editing option parsing

* option mods - not yet working

* arg passing without kwords to pybul from xml

* cleaned imports

* renamed depreciated setup file

* removed old setup file

* cleaned up main __init__ file

* added matplotlib to pyproject.toml

* Add pytest structure (#56)

Co-authored-by: Teemu Ruokolainen <[email protected]>

* Add cli (#57)

* working cli

* Update readme

* Update readme

Co-authored-by: Teemu Ruokolainen <[email protected]>

* Cm package restructuring (#54)

* moved py files to src/vai_labs for packaging

* added vscode config to gitignore

* updated package name in run_pipeline

* fixed pyproject matplotlib import

* fixed path for import helper

* updated project version for PYPI

* updated readme and pyproject.toml

* fixed README typo

* removed depreciated setup script

* fixed path in import_helper.py

* Update README.md

Updated repo name in README

* moved README images

* Update README image paths

* Remove readme.md.bak (#58)

Co-authored-by: Teemu Ruokolainen <[email protected]>

* Cm name updates (#59)

* updated naming and paths for projects

* merged README files

* updated README naming

* update import names in README

* updated example links

* updated missed readme names

* find-replace aidesign refs -> vai_lab

* renamed files containing old ai_design name

* renamed test file

* Css-gui_bugFixing (#60)

* Adjust aidCanvas' buttons' size

* Correctly resize lower buttons' sizes

* Resize buttons, pad radio frame, correct click on in or out

* Fix issue with data path

* Fix upload data mattrix path

* moved test script

Co-authored-by: cam586 <[email protected]>

* Fix repository url in readme and pyproject.toml (#63)

* added opencv & pytest (#62)

* Clean up lingering/duplicate files. (#64)

Co-authored-by: Teemu Ruokolainen <[email protected]>

* Added debug option (#65)

* add debug option to core,GUI

* Update test_launch.py

Add test_launch() function for pytest discovery

Co-authored-by: teemu <[email protected]>

* Added CI Test using Github Actions (#66)

* add debug option to core,GUI

* Update test_launch.py

Add test_launch() function for pytest discovery

* added initial actions yaml

* testing now triggered on PR

* removed testing for python3.7

* added option for manually running actions

* added workflow_dispatch options

* temp removal of PR trigger

* testing using push trigger

* removed incorrect pytest dir

* added env variable for GUI testing

* added virtual display for GUI testing

* removed old yml tag

* install virtual display with existing action

* fixed yml syntax

* fixed xvfb syntax

* removed old xvfb tags

* update to node.js 16

* test pip caching

* removed cache test

* fixed cov file path

* removed testing for python3.7

* install virtual display with existing action

* update to node.js 16

* fixed cov file path

* changed trigger condition to pull request

* renamed tests package

* added programming language classifiers

* changed trigger to PR

* added test and version shields

* fixed README typo

* gitignore any venv

* removed unneeded tk dep from toml

* simplified test call

* testing manual workflow trigger

* added workflow_dispatch options

* re-added pull_request trigger

Co-authored-by: teemu <[email protected]>

* Remove flit from readme (#67)

Co-authored-by: Teemu Ruokolainen <[email protected]>

* Cm fix readme img path (#68)

* fixed readme image paths

* updated version number

* Css fix pluginarchitecture diagram (#69)

* Include plugin diagram

* Delete old verion

* Update plugin diagram

* Update plugin diagram

* Add white filling to squares for dark mode

* fixed contribute urls

Co-authored-by: cam586 <[email protected]>

* Add rough sphinx documentation (#74)

* Add autogen docsting sphinx docs

* ReadTheDocs

* Building version

* Change index page title

* Add github actions workflow

* Update README

* Add pip install . to documentation.yml

* Add README.md as a page in documentation

* Add sphinx-apidoc command to readme; gitignore generated rst files

* Update readme sphinx commands

* Update readme

* Add comments

* Update commands in documentation workflow

* Fix typo in .gitignore

* Remove _static folder from config to remove warning message

* Specify python=3.10 for workflow

* Remove pip install sphinx-apidoc, no such package

* Update readme

* added docs build badge to readme

* fixed error-causing docstring

Co-authored-by: Teemu Ruokolainen <[email protected]>
Co-authored-by: chris <[email protected]>

* Cm test docs (#76)

* edited branch name for doc building

* test actions

* added jekyll options

* removed settings

* fixed gh pages deployment

* Cm add docs (#77)

* changed copyright year

* updated readme headings

* moved tutorials from readme to docs

* removed tutorials from readme

* added getting started page to index toc

* Update python=3.8 to python=3.10 in readme

* Cm feature add tests (#80)

* bumped version number

* add pilot example test

* simplified core.py

* improved naming and docs in core

* progress tracker.  ->

* added example script iteration

* fixed loop error msg in COre

* updated progress tracker naming (#71)

* fixed for loop logic and error handling in core (#72)

* Cm fix tracker loops (#73)

* fixed for loop logic and error handling in core

* fixed tracker dict population for loops

* Fix Progess Tracker naming

Removing Initialiser name requirement from Progress Tracker

* Remove Canvas if there are no ccordinates

* Fixing last fix.  Correctly read modules inside loop

* Fix error with coordinates case

* minor typo fix in core

* renamed .s variable to .xml_handler for readability

* fixed xml_handler naming in GUI_Core

* Trying to fix coordinates case

* moved avail_plugins to init

* Display treeview for no-coordinates case (need fixes))

* FIX - Consistent input and output naming issue

* Functioning progress tracker for coord and no coord

* Fixed list plugin options issues

* Minor fixes to test usability

* changed avail plugins options to readable names

* removed private and test files from avail_plugins

* removed old xml files, mod pybullet

* Fix parent issue

* fixed pybullet and canvas gui-test issues

* fixed pytest errors (except manual plugin)

* changed sklearn->scikit-learn in toml

* added pybullet to toml

* Remove testing file

* test fix with scalar

* translate boolean literals

* removed python 3.8,3.9

* added  param to ridge example

* removed closed check from core

* switced core check to _debug

---------

Co-authored-by: Carlos Sevilla Salcedo <[email protected]>

---------

Co-authored-by: Carlos Sevilla Salcedo <[email protected]>

* Fix examples path in README.md

* Another bad examples path

* update conda env part in README.md

* fixed calls to undefined parent (#90)

* Added Bayesian Optimisation plugin

* Fix merge errors

* Remove old run file

* Modify plugin types

* Addoptions to BO

* Css feature trying to catch errors (#94)

* Move Modelling plugins functions to template

* Add clsutering methods to template

* Change function doc

* Move DataProcessing plugins functions to template

* Update pipeline for testing

* Update init

* Fix conflicts

* Add DecisionMaking plugin template

* Fixing issues with Optimisation module

* Fixed errors passing params to BO

* Changed plugin Template to work for BO params

Still need to fix issue when running the BO

* BO suggests points correctly

* Change xml_handler naming

Change xml_handler naming to fit with the other UIs

* Typo correction

* Added bayes_opt optimisation plugin

* Modify integral to simpson

* Fixed issue with UI

---------

Co-authored-by: cam586 <[email protected]>
Co-authored-by: teemu <[email protected]>
Co-authored-by: Teemu Ruokolainen <[email protected]>
Co-authored-by: Richard Darst <[email protected]>

* Fix issue with example

* Added basic dataFlow selection

* Fixed issue with module list

* Remove option of data self-looping

* Add plugin's data input to XML

* Fixed error with ridge regression

* Added new data reading option

* Fix minor errors

* Define data communication

Redifined data passing and reading between different modules. `vai_lab_core` now stores all output data for each module and could be accessible by any module. Not tested on loops.

* Fixed issue duplicated module entries

Still need to fix issue with module name reading.

* Fixed names used to define input

* Clean some example files

* Remove testing print

* Add output module as editable

* Include a checklist for output data

* Fixed issue with output update

* Write output data in XML file working

* Include output path for outdata

* Storing output in file

* Fix space reading

* Allow one or more stored module output

* Update XML examples to dataflow

* Store relative path

* Add option of relative or absolute path

* Allow relative path

* Change input data definition to optionmenu

* By default store output of last module

* Update example coordinates

* Improve look of output data's optionmenu

---------

Co-authored-by: cam586 <[email protected]>
Co-authored-by: teemu <[email protected]>
Co-authored-by: Teemu Ruokolainen <[email protected]>
Co-authored-by: Richard Darst <[email protected]>

* Create a list with available functions

* Fine-tuning merge

* Change model name inside class

* Display all available class optional parameters

* Read required settings from the class

* Remove some unrequired parameters

* Set arguments with default values as optional

* Define function to get arguments from function

* Updated settings display

* Add treview for function selection

* GUI for function definition

* Changed solve method to fit

* Save methods in XML

* Add tag "options" to plugins

* Load options from XML

* Using methods and options defined in XML

* Fix issue with canvas interaction

* Allow having methods without options

* Indicate method's  data

* Remove 'Data' from DataProcessing modules

* Store options

- Fixed issue storing options from methods
- Removed 'Data' for DataProcessing modules
- Make correct comparison to determine if options are updated
- Correctly store method's data input. Stores name of variable.

* Reset XML if reset canvas

* Change default values for input data list

* Load data before XML

* Correctly update settings dictionary

* Method-wise data

* Fix issue with stored values and changed test data

* Combine Initialiser if previous XML existed

* Fixed issue with correctly updating loaded data

* ProgressTracking working for functions

Still need to fill the treeview with the previously set options and functions.

* Progress tracker loads the plugin's options

* Add methods and options to Progress tracker

* Fixed error with plugin trereview

It now displays the options as a string. For exmaple, it now shows "(0, 1)" for a tuple instead of "0 1"

* Remove reuirement of having methods and options

* Update example XML files

* Remove tests

* Fix error with user interaction demo

* Modify example to use test data

* Fix path issue with xml

* Fixed issue with relative paths

* Solve issue with relative paths

* Restructure conditions

* Fix options reading from XML and change data reading for looping

* Fixed issue with options in multiple lines

* MOD: update to Python 3.11

* FIX: python3.11 for sphinx

* DEL: delete obsolete workflow

---------

Co-authored-by: cam586 <[email protected]>
Co-authored-by: teemu <[email protected]>
Co-authored-by: Teemu Ruokolainen <[email protected]>
Co-authored-by: Richard Darst <[email protected]>
  • Loading branch information
5 people authored Oct 5, 2023
1 parent 4e9889e commit 425a4e2
Show file tree
Hide file tree
Showing 78 changed files with 1,936 additions and 815 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.10", "3.11"]
python-version: ["3.11"]
fail-fast: false

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sphinx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.10'
python-version: '3.11'

# pip cache
- name: pip cache
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ __pycache__/
**/*.pyc
*.py[cod]
*$py.class
*-env/

# C extensions
*.so
Expand Down
2 changes: 1 addition & 1 deletion dev-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: dev-vai-lab-env
channels:
- conda-forge
dependencies:
- python=3.10
- python=3.11
- c-compiler
- pip
- pip:
Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: vai-lab-env
channels:
- conda-forge
dependencies:
- python=3.10
- python=3.11
- c-compiler
- pip
- pip:
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@ authors = [
readme = "README.md"
classifiers = [
"License :: OSI Approved :: MIT License",
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11'
]
requires-python = ">=3.8"
requires-python = ">=3.11"
version = "0.0.dev4"
description = "AI assisted Virtual Laboratory framework."

Expand Down
2 changes: 1 addition & 1 deletion sphinx-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: sphinx-env
channels:
- conda-forge
dependencies:
- python=3.10
- python=3.11
- sphinx
- sphinx-rtd-theme
- myst-parser
1 change: 0 additions & 1 deletion sphinx-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# requirements.txt for sphinx
sphinx
sphinx-rtd-theme
myst-parser
10 changes: 5 additions & 5 deletions src/vai_lab/Core/vai_lab_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ def load_config_file(self, filename: Union[str,List,Tuple]):
self._xml_handler.load_XML(filedir)
self._initialised = True

def _load_data(self, module = 'Initialiser') -> None:
def _load_data(self, specs, module = 'Initialiser') -> None:
"""Loads data from XML file into Data object"""
init_data_fn = self._xml_handler.data_to_load(module)
init_data_fn = self._xml_handler.data_to_load(modules=specs, module=module)
if module not in self.data.keys():
self.data[module] = Data()
if isinstance(init_data_fn, str):
Expand All @@ -66,7 +66,7 @@ def _execute_module(self, specs):
mod: ModuleInterface = import_module(globals(), specs["module_type"]).__call__()
mod._debug = self._debug
mod.set_avail_plugins(self._avail_plugins)
self._load_data(specs["name"])
self._load_data(specs, specs["name"])
mod.set_data_in(self.data[specs["name"]])
mod.set_options(specs)
print("\t"*self.loop_level
Expand Down Expand Up @@ -108,6 +108,7 @@ def _execute_exit_point(self, specs):

with open(rel_to_abs(specs['plugin']['options']['outpath']), 'wb') as handle:
pickle.dump(data_out, handle, protocol=pickle.HIGHEST_PROTOCOL)

def _parse_loop_condition(self, condition):
try:
condition = int(condition)
Expand Down Expand Up @@ -169,7 +170,6 @@ def _execute(self, specs):

if not _tracker['terminate']:
self.load_config_file(self._xml_handler.filename)
# pass
else:
print('Pipeline terminated')
exit()
Expand All @@ -185,7 +185,7 @@ def run(self):
self._initialise_with_gui()
print("Running pipeline...")
if len(self._xml_handler.loaded_modules) > 0:
self._load_data()
self._load_data(self._xml_handler.loaded_modules)

self._init_status(self._xml_handler.loaded_modules)
self._execute(self._xml_handler.loaded_modules)
Expand Down
146 changes: 124 additions & 22 deletions src/vai_lab/Data/xml_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
root_mod = path.dirname(path.dirname(path.dirname(__file__)))
sys.path.append(root_mod)

from vai_lab._import_helper import get_lib_parent_dir
from vai_lab._import_helper import get_lib_parent_dir, rel_to_abs


class XML_handler:
Expand All @@ -30,6 +30,8 @@ def __init__(self, filename: str = None):
"pipeline": "declaration",
"relationships": "relationships",
"plugin": "plugin",
"method": "method",
"options": "options",
"coordinates": "list",
"Initialiser": "entry_point",
"inputdata": "data",
Expand Down Expand Up @@ -91,9 +93,42 @@ def load_XML(self, filename: str) -> None:
"""
if filename != None:
self.set_filename(filename)
self.tree = ET.parse(self.filename)
if hasattr(self, 'tree'):
prev_tree = self.tree
self.tree = self._combine_XML(prev_tree.getroot(), ET.parse(self.filename).getroot())
else:
self.tree = ET.parse(self.filename)
self._parse_XML()

def _combine_XML(self, tree1, tree2):
"""
This function recursively updates either the text or the children
of an element if another element is found in `tree1`, or adds it
from `tree2` if not found.
"""
# Create a mapping from tag name to element, as that's what we are fltering with
mapping = {el.tag: el for el in tree1}
for el in tree2:
if len(el) == 0:
# Not nested
try:
# Update the text
mapping[el.tag].text = el.text
except KeyError:
# An element with this name is not in the mapping
mapping[el.tag] = el
# Add it
tree1.append(el)
else :
try:
# Recursively process the element, and update it in the same way
self._combine_XML(mapping[el.tag], el)
except KeyError:
# Not in the mapping
mapping[el.tag] = el
tree1.append(el)
return ET.ElementTree(tree1)

def _parse_XML(self) -> None:
self.root = self.tree.getroot()
self._parse_tags(self.root, self.loaded_modules)
Expand Down Expand Up @@ -144,18 +179,38 @@ def _load_plugin(self, element: ET.Element, parent: dict) -> None:
"""
parent["plugin"] = {}
parent["plugin"]["plugin_name"] = element.attrib["type"]
parent["plugin"]["methods"] = {"_order" : []}
parent["plugin"]["options"] = {}
self._parse_tags(element, parent["plugin"])

def _load_method(self, element: ET.Element, parent: dict) -> None:
"""Parses tags associated with methods and appends to parent dict
:param elem: xml.etree.ElementTree.Element to be parsed
:param parent: dict or dict fragment parsed tags will be appened to
"""
for key in element.attrib:
parent["methods"]["_order"].append(element.attrib[key])
parent["methods"][element.attrib[key]] = {'options': {}}
self._parse_tags(element, parent["methods"][element.attrib[key]])

def _load_options(self, element: ET.Element, parent: dict) -> None:
"""Parses tags associated with options and appends to parent dict
:param elem: xml.etree.ElementTree.Element to be parsed
:param parent: dict or dict fragment parsed tags will be appened to
"""
for child in element:
if child.text is not None:
val = self._parse_text_to_list(child)
val = (val[0] if len(val) == 1 else val)
parent["plugin"]["options"][child.tag] = val
try:
parent["options"][child.tag] = literal_eval(child.text.strip())
except Exception as exc:
val = self._parse_text_to_list(child)
parent["options"][child.tag] = (val[0] if len(val) == 1 else val)

for key in child.attrib:
if key == "val":
parent["plugin"]["options"][child.tag] = child.attrib[key]
parent["options"][child.tag] = child.attrib[key]
else:
parent["plugin"]["options"][child.tag] = {
key: child.attrib[key]}
parent["options"][child.tag] = {key: child.attrib[key]}

def _load_entry_point(self, element: ET.Element, parent: dict) -> None:
"""Parses tags associated with initialiser and appends to parent dict
Expand Down Expand Up @@ -453,30 +508,33 @@ def update_plugin_options(self,
else:
xml_parent = xml_parent_name
plugin_elem: ET.Element = xml_parent.find("./plugin")
self._add_plugin_options(plugin_elem, options)
self._add_options(plugin_elem, options)
self._parse_XML()
if save_changes:
self.write_to_XML()

def _add_plugin_options(self,
def _add_options(self,
plugin_elem: ET.Element,
options
):
opt_elem = plugin_elem.find("./options")
if opt_elem is None:
opt_elem = ET.SubElement(plugin_elem, "options")
for key in options.keys():
if isinstance(options[key], list):
new_option = ET.SubElement(plugin_elem, key)
new_option = ET.SubElement(opt_elem, key)
option_text = ("\n{}".format(
"\n".join([*options[key]])))
new_option.text = option_text
elif isinstance(options[key], (int, float, str)):
new_option = plugin_elem.find(str("./" + key))
new_option = opt_elem.find(str("./" + key))
if new_option is None:
new_option = ET.SubElement(plugin_elem, key)
new_option = ET.SubElement(opt_elem, key)
text_lead = "\n" if "\n" not in str(options[key]) else ""
new_option.text = "{0} {1}".format(
text_lead, str(options[key]))
elif isinstance(options[key], (dict)):
self._add_plugin_options(plugin_elem, options[key])
self._add_options(opt_elem, options[key])

def append_input_data(self,
data_name: str,
Expand Down Expand Up @@ -511,14 +569,44 @@ def append_input_data(self,
if save_dir_as_relative:
data_dir = data_dir.replace(self.lib_base_path, "./")
data_dir = data_dir.replace("\\", "/")
if path.exists(path.dirname(data_dir)):
if path.exists(path.dirname(rel_to_abs(data_dir))):
plugin_elem.set('file', data_dir)
else:
plugin_elem.set('module', data_dir)

def append_method_to_plugin(self,
method_type: str,
method_options: dict,
xml_parent: Union[ET.Element, str],
overwrite_existing: Union[bool, int] = False
):
"""Appened method as subelement to existing plugin element
:param method_type: string type of method to be loaded into plugin
:param method_options: dict where keys & values are options & values
:param xml_parent: dict OR str.
If string given, parent elem is found via search,
Otherwise, method appeneded directly
"""
if isinstance(xml_parent, str):
xml_parent = self._get_element_from_name(xml_parent)

method_elem = xml_parent.find("./method")

if method_elem is not None and overwrite_existing:
if method_elem.attrib['type'] == method_type:
xml_parent.remove(method_elem)
method_elem = None

if method_elem is None:
method_elem = ET.SubElement(xml_parent, "method")
method_elem.set('type', method_type)
self._add_options(method_elem, method_options)

def append_plugin_to_module(self,
plugin_type: str,
plugin_options: dict,
method_list: list,
plugin_data: str,
xml_parent: Union[ET.Element, str],
overwrite_existing: Union[bool, int] = False
Expand Down Expand Up @@ -546,7 +634,13 @@ def append_plugin_to_module(self,
plugin_elem.set('type', plugin_type)
if plugin_data is not None and len(plugin_data) > 0:
self.append_input_data('X', plugin_data, xml_parent, False)
self._add_plugin_options(plugin_elem, plugin_options)
if '__init__' in plugin_options.keys():
self._add_options(plugin_elem, plugin_options['__init__'])
for f in method_list:
self.append_method_to_plugin(f,
plugin_options[f],
plugin_elem,
overwrite_existing)

def append_pipeline_module(self,
module_type: str,
Expand Down Expand Up @@ -577,6 +671,7 @@ def append_pipeline_module(self,
if plugin_type != None:
self.append_plugin_to_module(plugin_type,
plugin_options,
[],
parents[0],
new_mod,
0
Expand Down Expand Up @@ -625,10 +720,15 @@ def append_pipeline_loop(self,

xml_parent_element.append(new_loop)

def _get_data_structure(self, module) -> Dict[str, Any]:
data_struct = self._find_dict_with_key_val_pair(
self.loaded_modules[module],
"class", "data")
def _get_data_structure(self, modules, module) -> Dict[str, Any]:
try:
data_struct = self._find_dict_with_key_val_pair(
modules[module],
"class", "data")
except Exception as exc:
data_struct = self._find_dict_with_key_val_pair(
modules,
"class", "data")

assert len(data_struct) < 2, \
"Multiple data with same ID, please check XML"
Expand All @@ -641,8 +741,10 @@ def _get_data_structure(self, module) -> Dict[str, Any]:
return out

#@property
def data_to_load(self, module='Initialiser') -> Dict[str, str]:
return self._get_data_structure(module)["to_load"]
def data_to_load(self, modules=False, module='Initialiser') -> Dict[str, str]:
if not modules:
modules = self.loaded_modules
return self._get_data_structure(modules, module)["to_load"]


# Use case examples:
Expand Down
12 changes: 9 additions & 3 deletions src/vai_lab/DataProcessing/DataProcessing_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,14 @@ def set_options(self, module_config: dict) -> None:
def launch(self) -> None:
self._plugin.set_data_in(self._data_in)
self._plugin.configure(self._module_config["plugin"])
self._plugin.fit()
self.output_data = self._plugin.transform(self._data_in)
self._plugin.init()
for method in self._module_config["plugin"]["methods"]["_order"]:
if "options" in self._module_config["plugin"]["methods"][method].keys():
getattr(self._plugin, "{}".format(method))(self._plugin._parse_options_dict(self._module_config["plugin"]["methods"][method]["options"]))
else:
getattr(self._plugin, "{}".format(method))()

self.output_data = self._data_in.copy()

def get_result(self) -> DataInterface:
return self.output_data
return self.output_data
Loading

0 comments on commit 425a4e2

Please sign in to comment.