Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename "Lenskit" to LensKit for consistency #602

Merged
merged 1 commit into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
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 @@
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 @@
_log.debug("process pool shut down")


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

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


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

_log_config: WorkerLogConfig
Expand All @@ -126,4 +126,4 @@
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)
Loading