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

Fix pipeline.log inconsistency & include LLM info in signature #598

Merged
merged 5 commits into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 2 additions & 6 deletions src/distilabel/pipeline/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,15 +150,11 @@ def _create_signature(self) -> str:

steps_info = []
pipeline_dump = self.dump()["pipeline"]

for step in pipeline_dump["steps"]:
step_info = step["name"]
for argument, value in sorted(step["step"].items()):
if (
(argument == TYPE_INFO_KEY)
or (argument == "llm")
or (value is None)
):
# NOTE: Should we include the LLM info at this stage??
if (argument == TYPE_INFO_KEY) or (value is None):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe there was a rationale for including the argument == "llm" there if I'm not mistake, can you confirm @gabrielmbmb

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know tbh, it was mainly @plaguss developing this method

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not really sure of why those arguments weren't included the first time, but anyway we will have to think of including those when the structured outputs integration is ready as we couldn't take that into account yet.

continue

if isinstance(value, dict):
Expand Down
3 changes: 3 additions & 0 deletions src/distilabel/pipeline/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ def run(
except RuntimeError:
pass
log_queue = mp.Queue()
# We must place the runtime parameters before calling setup_logging to ensure consistency
self._set_runtime_parameters(parameters or {})
self.dag.validate()
setup_logging(log_queue, filename=str(self._cache_location["log_file"])) # type: ignore
self._logger = logging.getLogger("distilabel.pipeline.local")

Expand Down