Skip to content

Fix: Properly trim leading logs token - #67

Merged
k223kim merged 1 commit into
mainfrom
bugfix/logs_again
Jul 30, 2026
Merged

Fix: Properly trim leading logs token#67
k223kim merged 1 commit into
mainfrom
bugfix/logs_again

Conversation

@ethanwharris

@ethanwharris ethanwharris commented Jul 30, 2026

Copy link
Copy Markdown
Member

#64 was not my best work haha - turns out it's worth checking things in real life and not just unit tests :p

Instead of what that was doing, we need to trim the entry earlier on when we get the page. Then we can also do it so it only applies to the first page of output.

Before:

>>> from lightning_sdk import Job
>>> j = Job(name="job-jul-29-15-40", teamspace="lightning-ai/ethan")
>>> j.logs
'+ lightning\n⚡ ~ python main.py\necho "Done"\n\nHello, Lightning World!\nDone'
>>> 

Now:

>>> from lightning_sdk import Job
>>> j = Job(name="job-jul-29-15-40", teamspace="lightning-ai/ethan")
>>> j.logs
'⚡ ~ python main.py\necho "Done"\n\nHello, Lightning World!\nDone'
>>> 

@k223kim
k223kim merged commit 89b0568 into main Jul 30, 2026
24 checks passed
@k223kim
k223kim deleted the bugfix/logs_again branch July 30, 2026 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants