Conversation
| from . import visualization as viz | ||
| from .mode import Mode | ||
|
|
||
| logger = logging.getLogger(__name__) |
There was a problem hiding this comment.
For uniformity reasons, I prefer that we use tiledb.cloud.utilities.get_logger_wrapper for logging everywhere.
The method also allows for a verbosity level (verbose=True/False) that should be set from the UDF's arguments (as is the case with the as_batch method) so the logger can be declared inside the exec_batch_udf and the verbose should be "grabbed" from the kwargs
There was a problem hiding this comment.
@JohnMoutafis I agree, but we have a circular import problem because run_dag is in the utilities module.
There was a problem hiding this comment.
@spencerseale @JohnMoutafis are we still stuck here? Do I understand correctly that we don't have a circular import yet, but will when run_dag() calls this new function?
If we refactored and moved get_logger_wrapper() to, for example, tiledb.cloud.logging, that would eliminate the potential circular import, yes? I'm willing to do that work.
Pull in the logging module
|
Up for any ideas, including |
This is more approachable from a docs point of view compared to
as_batchand accepts both in-memory and references to registered UDFs.Because of the interests of users for calling UDFs with custom resource specifications and access credential names, this function acts to satisfy that interest.
For unit tests, didn't want to interfere with
unittestbased tests, so created a new test module for pytest-based.