From d8a80e7dd43f1bb5449b600f123266c7b637f06d Mon Sep 17 00:00:00 2001 From: JieguangZhou Date: Tue, 29 Oct 2024 18:36:28 +0800 Subject: [PATCH] Fixed decode function and table.data --- CHANGELOG.md | 1 + superduper/backends/local/compute.py | 3 +++ superduper/backends/local/crontab.py | 3 ++- superduper/base/document.py | 2 +- superduper/components/table.py | 3 ++- 5 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 49c47b1e3..c46632099 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -102,6 +102,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fix the ordering and sequencing of jobs initiated on `db.apply` - Fix rest routes with db injection and prefix. - Fix cluster db setter. +- Fix decode function ## [0.3.0](https://github.com/superduper-io/superduper/compare/0.3.0...0.2.0]) (2024-Jun-21) diff --git a/superduper/backends/local/compute.py b/superduper/backends/local/compute.py index e643cda5f..fe1180285 100644 --- a/superduper/backends/local/compute.py +++ b/superduper/backends/local/compute.py @@ -67,6 +67,9 @@ def submit(self, job: Job) -> str: self.db.metadata.update_job(job.identifier, 'status', 'running') try: + logging.debug( + f'Running job {job.job_id}: {component.identifier}.{job.method}' + ) method = getattr(component, job.method) output = method(*args, **kwargs) except Exception as e: diff --git a/superduper/backends/local/crontab.py b/superduper/backends/local/crontab.py index 5bc234c33..cc5ceb694 100644 --- a/superduper/backends/local/crontab.py +++ b/superduper/backends/local/crontab.py @@ -1,6 +1,7 @@ from superduper.backends.base.crontab import CrontabBackend +# TODO: implement this class LocalCrontabBackend(CrontabBackend): """Local crontab backend.""" @@ -20,7 +21,7 @@ def list_components(self): def list_uuids(self): """List UUIDs of components.""" - raise NotImplementedError + return [] def drop(self): """Drop the crontab.""" diff --git a/superduper/base/document.py b/superduper/base/document.py index e0b06d8a8..42e765961 100644 --- a/superduper/base/document.py +++ b/superduper/base/document.py @@ -569,7 +569,7 @@ def _get_leaf_from_cache(k, builds, getters, db: t.Optional['Datalayer'] = None) for other in keys: import re - matches = re.findall(f'.*\?\(({k}\..*)\)', other) + matches = re.findall(f'.*\?\(({k}\..*?)\)', other) old_other = other[:] if matches: for match in matches: diff --git a/superduper/components/table.py b/superduper/components/table.py index ea2f6fe3d..19193b23a 100644 --- a/superduper/components/table.py +++ b/superduper/components/table.py @@ -69,4 +69,5 @@ def add_data(self): data = self.data.data else: data = self.data - self.db[self.identifier].insert(data).execute() + if data: + self.db[self.identifier].insert(data).execute()