Skip to content

Commit

Permalink
rename "Lenskit" to LensKit for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
mdekstrand committed Jan 13, 2025
1 parent f24d461 commit f5a0422
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions lenskit/lenskit/logging/_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ def get_logger(
"""
if remove_private:
name = re.sub(r"\._.*", "", name)
return LenskitProxyLogger(None, logger_factory_args=[name], initial_values=init_als) # type: ignore
return LensKitProxyLogger(None, logger_factory_args=[name], initial_values=init_als) # type: ignore


class LenskitProxyLogger(BoundLoggerLazyProxy):
class LensKitProxyLogger(BoundLoggerLazyProxy):
"""
Lazy proxy logger for LensKit. This is based on Structlog's lazy proxy,
with using a filtering logger by default when structlog is not configured.
Expand Down
10 changes: 5 additions & 5 deletions lenskit/lenskit/parallel/pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def multiprocess_executor(
if n_jobs is None:
n_jobs = cfg.processes

ctx = LenskitMPContext(sp_config)
ctx = LensKitMPContext(sp_config)

Check warning on line 40 in lenskit/lenskit/parallel/pool.py

View check run for this annotation

Codecov / codecov/patch

lenskit/lenskit/parallel/pool.py#L40

Added line #L40 was not covered by tests
return ProcessPoolExecutor(n_jobs, ctx)


Expand All @@ -56,7 +56,7 @@ def __init__(
log.debug("persisting function")
if worker_parallel is None:
worker_parallel = ParallelConfig(1, 1, get_parallel_config().child_threads, 1)
ctx = LenskitMPContext(worker_parallel)
ctx = LensKitMPContext(worker_parallel)

log.debug("initializing shared memory")
self.manager = SharedMemoryManager()
Expand Down Expand Up @@ -88,7 +88,7 @@ def shutdown(self):
_log.debug("process pool shut down")


class LenskitProcess(SpawnProcess):
class LensKitProcess(SpawnProcess):
"LensKit worker process implementation."

def __init__(
Expand All @@ -115,7 +115,7 @@ def run(self):
ctx.send_task(task)


class LenskitMPContext(SpawnContext):
class LensKitMPContext(SpawnContext):
"LensKit multiprocessing context."

_log_config: WorkerLogConfig
Expand All @@ -126,4 +126,4 @@ def __init__(self, parallel: ParallelConfig):
self._parallel_config = parallel

def Process(self, *args: Any, **kwargs: Any) -> SpawnProcess:
return LenskitProcess(self._log_config, self._parallel_config, *args, **kwargs)
return LensKitProcess(self._log_config, self._parallel_config, *args, **kwargs)

0 comments on commit f5a0422

Please sign in to comment.