Hi I am going though the Flyte-2 code and have a ...
# flyte-support
a
Hi I am going though the Flyte-2 code and have a suggestion. This is a only and opinion/suggestion,
Copy code
# Current Implementation
run = flyte.run(main, x_list=list(range(10)))
Copy code
# Suggestion
run = flyte.run(main, x_list=list(range(10),logger,log_level))
Does it sound fair if we could pass a logger to the function, so we can get a detailed trace and place the logger file on a location of our choice. We would also need a log_level [INFO,DEBUG,ERROR] for the level of verbosity that is required Flyte CLI
flyte --help
has
flyte -vvv get logs <run-name>
I don’t see anything like that for python code.
f
You can set log level in Flyte.withruncontext or in Flyte init set log level
❤️ 1
It will pass down all the way
a
Let me try it out
I see there is only logging of type
StreamHandler
/
RichHandler
and no
FileHandler
. What if someone needs store/keep the logs of the run for audit and compliance. I would suggest that for logging we should have arguments like log_stream=True (for streaming the logs to console) and log_file_loc=“some location, if not absolute put it in current directory”. That way it will give a way to get the files into a location if required or if people want they can stream it/pipe it to a file
python main.py > log.txt
Moreover i think we should
RichHandler(console=sys.stdout)
currently it outputs to std.err so ``python main.py > log.txt` will not work until the pipe both std.err and std.out to a file
Is PR accepted for flyte2-sdk , i can raise it as PR. Not sure since it’s in Beta
f
Yes PRs are accepted
👍 1