promptflow icon indicating copy to clipboard operation
promptflow copied to clipboard

[Feature Request] Not able to see logs generated from python node in AML workspace

Open anandchugh opened this issue 2 years ago • 4 comments

Is your feature request related to a problem? Please describe. We have a custom python node in the flow and enabled logging for the node. No logs for python node are visible in AML workspace in executionlogs.txt

logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__)

Run is created from local machine by using promptflow sdk api call.

Describe the solution you'd like Logs should be generated for python node. Its is quite difficult to figure out the root cause of any issue in python node.

Describe alternatives you've considered Tried different apporaches, but none of them worked.

  1. Tried to use print statement, for print statements also nothing gets printed in executionlogs.txt
  2. Tried to write logs to a file and sys.sdout but that also did not work.

Additional context Add any other context or screenshots about the feature request here.

anandchugh avatar Mar 12 '24 16:03 anandchugh

Hello @anandchugh. According to your description, I think you are using pfazure command to create run in AML workspace. Please correct me if I misunderstand your scenario.

If that is your scenario, there is a simple workaround here: use stderr for print. Such as print("xxx", file=sys.stderr)

huaiyan avatar Mar 13 '24 03:03 huaiyan

Hello @anandchugh. According to your description, I think you are using pfazure command to create run in AML workspace. Please correct me if I misunderstand your scenario.

If that is your scenario, there is a simple workaround here: use stderr for print. Such as print("xxx", file=sys.stderr)

I am usning pf sdk to create run in AML workspace, Thanks for the workaround

anandchugh avatar Mar 14 '24 11:03 anandchugh

You are welcome. We are planning feature to add log for each line's execution. Then you could see print content (with and without sys.stderr) and logging content in separate file for each line. I will close this issue when our feature is done.

huaiyan avatar Mar 19 '24 03:03 huaiyan

The feature to see log from separate line execution is finished. From portal, customer could enter each line page and check this line's log. image

huaiyan avatar Jul 01 '24 02:07 huaiyan