Skip to content

Commit

Permalink
Deployed 41fd0ea to master with MkDocs 1.5.3 and mike 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jan 26, 2024
1 parent 3c594e8 commit 2d41d64
Show file tree
Hide file tree
Showing 33 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion master/reference/nimlite/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1992,7 +1992,7 @@ <h4 id="tablite.nimlite.column_select" class="doc doc-heading">
<span class="normal">251</span>
<span class="normal">252</span>
<span class="normal">253</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="k">def</span> <span class="nf">column_select</span><span class="p">(</span><span class="n">table</span><span class="p">,</span> <span class="n">cols</span><span class="p">,</span> <span class="n">tqdm</span><span class="o">=</span><span class="n">_tqdm</span><span class="p">,</span> <span class="n">TaskManager</span><span class="o">=</span><span class="n">TaskManager</span><span class="p">):</span>
<span class="k">with</span> <span class="n">tqdm</span><span class="p">(</span><span class="n">total</span><span class="o">=</span><span class="mi">100</span><span class="p">,</span> <span class="n">desc</span><span class="o">=</span><span class="s2">&quot;column select&quot;</span><span class="p">,</span> <span class="n">bar_format</span><span class="o">=</span><span class="s1">&#39;</span><span class="si">{desc}</span><span class="s1">: </span><span class="si">{percentage:3.0f}</span><span class="s1">%|</span><span class="si">{bar}{r_bar}</span><span class="s1">&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">pbar</span><span class="p">:</span>
<span class="k">with</span> <span class="n">tqdm</span><span class="p">(</span><span class="n">total</span><span class="o">=</span><span class="mi">100</span><span class="p">,</span> <span class="n">desc</span><span class="o">=</span><span class="s2">&quot;column select&quot;</span><span class="p">,</span> <span class="n">bar_format</span><span class="o">=</span><span class="s1">&#39;</span><span class="si">{desc}</span><span class="s1">: </span><span class="si">{percentage:.1f}</span><span class="s1">%|</span><span class="si">{bar}{r_bar}</span><span class="s1">&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">pbar</span><span class="p">:</span>
<span class="n">T</span> <span class="o">=</span> <span class="nb">type</span><span class="p">(</span><span class="n">table</span><span class="p">)</span>
<span class="n">dir_pid</span> <span class="o">=</span> <span class="n">Config</span><span class="o">.</span><span class="n">workdir</span> <span class="o">/</span> <span class="n">Config</span><span class="o">.</span><span class="n">pid</span>

Expand Down
2 changes: 1 addition & 1 deletion master/search/search_index.json

Large diffs are not rendered by default.

Binary file modified master/sitemap.xml.gz
Binary file not shown.
Binary file modified master/tablite/__pycache__/__init__.cpython-310.pyc
Binary file not shown.
Binary file modified master/tablite/__pycache__/base.cpython-310.pyc
Binary file not shown.
Binary file modified master/tablite/__pycache__/config.cpython-310.pyc
Binary file not shown.
Binary file modified master/tablite/__pycache__/core.cpython-310.pyc
Binary file not shown.
Binary file modified master/tablite/__pycache__/datatypes.cpython-310.pyc
Binary file not shown.
Binary file modified master/tablite/__pycache__/diff.cpython-310.pyc
Binary file not shown.
Binary file modified master/tablite/__pycache__/export_utils.cpython-310.pyc
Binary file not shown.
Binary file modified master/tablite/__pycache__/file_reader_utils.cpython-310.pyc
Binary file not shown.
Binary file modified master/tablite/__pycache__/groupby_utils.cpython-310.pyc
Binary file not shown.
Binary file modified master/tablite/__pycache__/groupbys.cpython-310.pyc
Binary file not shown.
Binary file modified master/tablite/__pycache__/import_utils.cpython-310.pyc
Binary file not shown.
Binary file modified master/tablite/__pycache__/imputation.cpython-310.pyc
Binary file not shown.
Binary file modified master/tablite/__pycache__/joins.cpython-310.pyc
Binary file not shown.
Binary file modified master/tablite/__pycache__/lookup.cpython-310.pyc
Binary file not shown.
Binary file modified master/tablite/__pycache__/match.cpython-310.pyc
Binary file not shown.
Binary file modified master/tablite/__pycache__/merge.cpython-310.pyc
Binary file not shown.
Binary file modified master/tablite/__pycache__/mp_utils.cpython-310.pyc
Binary file not shown.
Binary file modified master/tablite/__pycache__/nimlite.cpython-310.pyc
Binary file not shown.
Binary file modified master/tablite/__pycache__/pivots.cpython-310.pyc
Binary file not shown.
Binary file modified master/tablite/__pycache__/redux.cpython-310.pyc
Binary file not shown.
Binary file modified master/tablite/__pycache__/reindex.cpython-310.pyc
Binary file not shown.
Binary file modified master/tablite/__pycache__/sort_utils.cpython-310.pyc
Binary file not shown.
Binary file modified master/tablite/__pycache__/sortation.cpython-310.pyc
Binary file not shown.
Binary file modified master/tablite/__pycache__/utils.cpython-310.pyc
Binary file not shown.
Binary file modified master/tablite/__pycache__/version.cpython-310.pyc
Binary file not shown.
Binary file modified master/tablite/_nimlite/__pycache__/__init__.cpython-310.pyc
Binary file not shown.
32 changes: 16 additions & 16 deletions master/tablite/_nimlite/funcs/column_selector/sliceconv.nim
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ proc putPage(page: BaseNDArray, infos: var Table[string, nimpy.PyObject], colNam

infos[colName] = newPyPage(pid, dir, page.len, page.getPageTypes())

proc finalizeSlice(indices: var seq[int], columnNames: seq[string], infos: var Table[string, nimpy.PyObject], castPaths: var Table[string, (Path, Path, bool)], pages: var seq[(string, nimpy.PyObject)], resultInfo: ColInfo): void =
proc finalizeSlice(indices: var seq[int], columnNames: seq[string], infos: var Table[string, nimpy.PyObject], castPaths: var Table[string, (Path, Path, Path, bool)], pages: var seq[(string, nimpy.PyObject)], resultInfo: ColInfo): void =
if indices.len == 0:
return

for colName in columnNames:
let (srcPath, dstPath, isTmp) = castPaths[colName]
var (srcPath, dstPath, dstSliced, isTmp) = castPaths[colName]
var castData = readNumpy(string srcPath)

if castData.len != indices.len:
castData = castData[indices]
castData.putPage(infos, colName, resultInfo[colName])
castData.save(string dstPath)
castData.save(string dstSliced)
elif srcPath != dstPath and isTmp:
moveFile(string srcPath, string dstPath)

Expand All @@ -40,8 +40,8 @@ proc toColSliceInfo(path: Path): ColSliceInfo =
return (workdir, pid)

proc doSliceConvert*(dirPid: Path, pageSize: int, columns: Table[string, string], rejectReasonName: string, resPass: ColInfo, resFail: ColInfo, desiredColumnMap: OrderedTable[string, DesiredColumnInfo], columnNames: seq[string], isCorrectType: Table[string, bool]): (seq[(string, nimpy.PyObject)], seq[(string, nimpy.PyObject)]) =
var castPathsPass = initTable[string, (Path, Path, bool)]()
var castPathsFail = initTable[string, (Path, Path, bool)]()
var castPathsPass = initTable[string, (Path, Path, Path, bool)]()
var castPathsFail = initTable[string, (Path, Path, Path, bool)]()
var pageInfosPass = initTable[string, nimpy.PyObject]()
var pageInfosFail = initTable[string, nimpy.PyObject]()
var pagesPass = newSeq[(string, nimpy.PyObject)]()
Expand All @@ -61,11 +61,12 @@ proc doSliceConvert*(dirPid: Path, pageSize: int, columns: Table[string, string]

for (k, v) in pagePaths.pairs:
let (wd, pid) = resFail[k]
castPathsFail[k] = (Path v, Path(wd) / Path("pages") / Path($pid & ".npy"), false)
let dstPath = Path(wd) / Path("pages") / Path($pid & ".npy")
castPathsFail[k] = (Path v, dstPath, dstPath, false)

let (rjwd, rjpid) = resFail[rejectReasonName]
let rejectReasonPath = Path(rjwd) / Path("pages") / Path($rjpid & ".npy")
castPathsFail[rejectReasonName] = (rejectReasonPath, rejectReasonPath, false)
castPathsFail[rejectReasonName] = (rejectReasonPath, rejectReasonPath, rejectReasonPath, false)

for (desiredName, desiredInfo) in desiredColumnMap.pairs:
let originalName = desiredInfo.originalName
Expand All @@ -76,6 +77,9 @@ proc doSliceConvert*(dirPid: Path, pageSize: int, columns: Table[string, string]
assert validMask.len >= szData, "Invalid mask size"

let alreadyCast = isCorrectType[desiredName]
let (workdir, pid) = resPass[desiredName]
let pagedir = Path(workdir) / Path("pages")
let dstPath = pagedir / Path($pid & ".npy")

originalData.putPage(pageInfosFail, originalName, originalPath.toColSliceInfo)

Expand All @@ -87,22 +91,18 @@ proc doSliceConvert*(dirPid: Path, pageSize: int, columns: Table[string, string]

validMask[i] = VALID

castPathsPass[desiredName] = (originalPath, originalPath, false)
castPathsPass[desiredName] = (originalPath, originalPath, dstPath, false)
originalData.putPage(pageInfosPass, desiredName, originalPath.toColSliceInfo)
continue

var castPath: Path
var pathExists = true

while pathExists:
castPath = workdir / Path(generateRandomString(5) & ".npy")
castPath = Path(workdir) / Path(generateRandomString(5) & ".npy")
pathExists = fileExists(string castPath)

let (workdir, pid) = resPass[desiredName]
let pagedir = Path(workdir) / Path("pages")
let dstPath = pagedir / Path($pid & ".npy")

castPathsPass[desiredName] = (castPath, dstPath, true)
castPathsPass[desiredName] = (castPath, dstPath, dstPath, true)

let desiredType = desiredInfo.`type`
let allowEmpty = desiredInfo.allowEmpty
Expand Down Expand Up @@ -154,13 +154,13 @@ proc doSliceConvert*(dirPid: Path, pageSize: int, columns: Table[string, string]
let pathpid = string (Path(dirpid) / Path("pages") / Path($pid & ".npy"))
let page = newNDArray(reasonLst)

page.save(pathpid)
page.putPage(pageInfosFail, rejectReasonName, resFail[rejectReasonName])
page.save(pathpid)

pagesFail.add((rejectReasonName, pageInfosFail[rejectReasonName]))

finally:
for (castPath, _, isTmp) in castPathsPass.values:
for (castPath, _, _, isTmp) in castPathsPass.values:
if not isTmp:
continue
discard tryRemoveFile(string castPath)
Expand Down
Binary file modified master/tablite/_nimlite/nimlite.so
Binary file not shown.
2 changes: 1 addition & 1 deletion master/tablite/nimlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def collect_cs_info(i: int, columns: dict, res_cols_pass: list, res_cols_fail: l


def column_select(table, cols, tqdm=_tqdm, TaskManager=TaskManager):
with tqdm(total=100, desc="column select", bar_format='{desc}: {percentage:3.0f}%|{bar}{r_bar}') as pbar:
with tqdm(total=100, desc="column select", bar_format='{desc}: {percentage:.1f}%|{bar}{r_bar}') as pbar:
T = type(table)
dir_pid = Config.workdir / Config.pid

Expand Down
2 changes: 1 addition & 1 deletion master/tablite/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
major, minor, patch = 2023, 9, 1
major, minor, patch = 2023, 9, 2
__version_info__ = (major, minor, patch)
__version__ = ".".join(str(i) for i in __version_info__)

0 comments on commit 2d41d64

Please sign in to comment.