Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
V
vidai
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SexHackMe
vidai
Commits
7990ce26
Commit
7990ce26
authored
Oct 09, 2025
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add stdout progress logging to workers for job status visibility without --debug flag
parent
dddbc59b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
worker_analysis.py
vidai/worker_analysis.py
+5
-0
worker_training.py
vidai/worker_training.py
+2
-0
No files found.
vidai/worker_analysis.py
View file @
7990ce26
...
@@ -201,6 +201,7 @@ def analyze_media(media_path, prompt, model_path, interval=10, job_id=None, comm
...
@@ -201,6 +201,7 @@ def analyze_media(media_path, prompt, model_path, interval=10, job_id=None, comm
'message'
:
f
'Extracted {total_frames} frames'
'message'
:
f
'Extracted {total_frames} frames'
})
})
comm
.
send_message
(
progress_msg
)
comm
.
send_message
(
progress_msg
)
print
(
f
"PROGRESS: Job {job_id} - 10
% -
Extracted {total_frames} frames"
)
descriptions
=
[]
descriptions
=
[]
...
@@ -239,6 +240,7 @@ def analyze_media(media_path, prompt, model_path, interval=10, job_id=None, comm
...
@@ -239,6 +240,7 @@ def analyze_media(media_path, prompt, model_path, interval=10, job_id=None, comm
'message'
:
f
'Analyzed frame {i+1}/{total_frames}'
'message'
:
f
'Analyzed frame {i+1}/{total_frames}'
})
})
comm
.
send_message
(
progress_msg
)
comm
.
send_message
(
progress_msg
)
print
(
f
"PROGRESS: Job {job_id} - {progress_percent}
% -
Analyzed frame {i+1}/{total_frames}"
)
if
output_dir
:
if
output_dir
:
import
shutil
import
shutil
...
@@ -255,6 +257,7 @@ def analyze_media(media_path, prompt, model_path, interval=10, job_id=None, comm
...
@@ -255,6 +257,7 @@ def analyze_media(media_path, prompt, model_path, interval=10, job_id=None, comm
'message'
:
'Generating video summary'
'message'
:
'Generating video summary'
})
})
comm
.
send_message
(
progress_msg
)
comm
.
send_message
(
progress_msg
)
print
(
f
"PROGRESS: Job {job_id} - 85
% -
Generating video summary"
)
# Check for cancellation before summary
# Check for cancellation before summary
if
job_id
and
check_job_cancelled
(
job_id
):
if
job_id
and
check_job_cancelled
(
job_id
):
...
@@ -283,6 +286,7 @@ def analyze_media(media_path, prompt, model_path, interval=10, job_id=None, comm
...
@@ -283,6 +286,7 @@ def analyze_media(media_path, prompt, model_path, interval=10, job_id=None, comm
'message'
:
'Analysis completed'
'message'
:
'Analysis completed'
})
})
comm
.
send_message
(
progress_msg
)
comm
.
send_message
(
progress_msg
)
print
(
f
"PROGRESS: Job {job_id} - 100
% -
Analysis completed"
)
result
=
f
"Frame Descriptions:
\n
"
+
"
\n
"
.
join
(
descriptions
)
+
f
"
\n\n
Summary:
\n
{summary}"
result
=
f
"Frame Descriptions:
\n
"
+
"
\n
"
.
join
(
descriptions
)
+
f
"
\n\n
Summary:
\n
{summary}"
return
result
,
total_tokens
return
result
,
total_tokens
...
@@ -353,6 +357,7 @@ def worker_process(backend_type: str):
...
@@ -353,6 +357,7 @@ def worker_process(backend_type: str):
model_path
=
data
.
get
(
'model_path'
,
'Qwen/Qwen2.5-VL-7B-Instruct'
)
model_path
=
data
.
get
(
'model_path'
,
'Qwen/Qwen2.5-VL-7B-Instruct'
)
interval
=
data
.
get
(
'interval'
,
10
)
interval
=
data
.
get
(
'interval'
,
10
)
job_id
=
message
.
msg_id
# Use message ID for job identification
job_id
=
message
.
msg_id
# Use message ID for job identification
print
(
f
"PROGRESS: Job {message.msg_id} accepted - Starting analysis"
)
print
(
f
"DEBUG: Starting analysis of {media_path} with model {model_path} for job {job_id}"
)
print
(
f
"DEBUG: Starting analysis of {media_path} with model {model_path} for job {job_id}"
)
result
,
tokens_used
=
analyze_media
(
media_path
,
prompt
,
model_path
,
interval
,
job_id
,
comm
)
result
,
tokens_used
=
analyze_media
(
media_path
,
prompt
,
model_path
,
interval
,
job_id
,
comm
)
print
(
f
"DEBUG: Analysis completed for job {message.msg_id}, used {tokens_used} tokens"
)
print
(
f
"DEBUG: Analysis completed for job {message.msg_id}, used {tokens_used} tokens"
)
...
...
vidai/worker_training.py
View file @
7990ce26
...
@@ -70,8 +70,10 @@ def worker_process(backend_type: str):
...
@@ -70,8 +70,10 @@ def worker_process(backend_type: str):
train_dir
=
data
.
get
(
'train_dir'
,
''
)
train_dir
=
data
.
get
(
'train_dir'
,
''
)
if
train_dir
and
os
.
path
.
isdir
(
train_dir
):
if
train_dir
and
os
.
path
.
isdir
(
train_dir
):
print
(
f
"PROGRESS: Job {message.msg_id} accepted - Starting training"
)
print
(
f
"DEBUG: Starting training for job {message.msg_id}"
)
print
(
f
"DEBUG: Starting training for job {message.msg_id}"
)
result
=
train_model
(
train_dir
,
output_model
,
description
)
result
=
train_model
(
train_dir
,
output_model
,
description
)
print
(
f
"PROGRESS: Job {message.msg_id} - 100
% -
Training completed"
)
print
(
f
"DEBUG: Training completed for job {message.msg_id}"
)
print
(
f
"DEBUG: Training completed for job {message.msg_id}"
)
else
:
else
:
result
=
"No valid training directory provided"
result
=
"No valid training directory provided"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment