-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
- UCI and hdf5/pandas stuff:
develop-InMem- Branch with IO into pandas dataframe direct from uci, with minimal (or no) write-backs during execution?- Goals:
- Be able to send hsp2 all needed inputs from CSV(s), omitting the UCI
- Eliminate the requirement of the hdf5 store for all data, allowing file storage instead?
- Code:
- Tasks:
- Code the class
IOManagerDFas child ofIOManager - Insure all
IOManagerclasses are compatible with theget_timeseries()function (a standalone function in thehsp2.hsp2.utilitiesfile)-
read_ts: Theget_timeseries()function lives outside of theIOManagerclass but expects anIOManagerinterface compatible object containing aread_tsmethod, thus, by sub-classingread_tson theIOManagerDFwe can make them seamlessly integrate and eliminate the redundant function inHSP2UtilitiesInMem.py-
_get_in_memory()must read the pandas df (should also behave exactly same as hdf5 which already caches in the object?) - Falls back on reading from the hdf5, but this should instead look at the
self._input, which is the object passed in asio_combinedat class creation.
-
-
- Merge duplicate code into
HSP2UtilitiesInMem.py,hsp2/main.py,hsp2io/io.py, andhsp2tools/readUCI.py - Run test scripts
- PR
- Code the class
- Questions:
- Test script/UCI:
- Should
readUCIinMem.pyreplacereadUCI.pyentirely? (looks like it does)
- Goals:
- Redundant/unused hdf5 class: There are classes named
HDF5defined in two places:src/hsp2/hsp2io/hdf.py- and in
src/hsp2/hsp2tools/HDF5.py - NOTE: the HDF5 file does not appear to be loaded anywhere, see:
fgrep -iR "import from hsp2tools" src/*|grep hdf -i
Code development
- Diff of develop-InMem branch (Paul's prototype): develop...develop-InMem
Caching
- IO class (read hdf) allows caching of timeseries, so that there is no need to reload a series that has already been loaded from disk.
- KO class does not currently have the ability to store data in memory,
save_timeseriespushes the data to disk, and then, that seems to incur large overhead.
Documentation
- Protocols are defined in src/hsp2/hsp2io/protocols.py
- Defines what things should look like, ex:
write_ts,read_ts - But they don't actually do anything
- Defines what things should look like, ex:
- Classes actually implement the interfaces
- Ex: src/hsp2/hsp2io/io.py
- Defines the code that implements the function, such as
write_ts()HSPsquared/src/hsp2/hsp2io/io.py
Line 58 in 6f40cc3
def write_ts(self,
Metadata
Metadata
Assignees
Labels
No labels