Skip to content

Minor Fixed for Model local testing#469

Merged
luv-bansal merged 1 commit intomasterfrom
minor-fixes
Dec 19, 2024
Merged

Minor Fixed for Model local testing#469
luv-bansal merged 1 commit intomasterfrom
minor-fixes

Conversation

@luv-bansal
Copy link
Copy Markdown
Contributor

Why

How

Tests

Notes

@github-actions
Copy link
Copy Markdown

Code Coverage

Package Line Rate Health
clarifai 43%
clarifai.cli 65%
clarifai.client 68%
clarifai.client.auth 69%
clarifai.constants 100%
clarifai.datasets 100%
clarifai.datasets.export 80%
clarifai.datasets.upload 75%
clarifai.datasets.upload.loaders 37%
clarifai.models 100%
clarifai.modules 0%
clarifai.rag 72%
clarifai.runners 9%
clarifai.runners.models 16%
clarifai.runners.utils 57%
clarifai.schema 100%
clarifai.urls 80%
clarifai.utils 77%
clarifai.utils.evaluation 67%
clarifai.workflows 94%
Summary 60% (3845 / 6357)

Minimum allowed line rate is 50%

Comment on lines -250 to -261
# Terminate any child processes that may have been spawned by the main process
if process:
try:
parent = psutil.Process(process.pid)
# Get all child processes recursively
for child in parent.children(recursive=True):
child.kill()
except psutil.NoSuchProcess:
pass
except Exception as e:
logger.error(f"Error terminating child processes: {e}")

Copy link
Copy Markdown
Contributor Author

@luv-bansal luv-bansal Dec 19, 2024

Choose a reason for hiding this comment

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

Don't think this is needed, because there won't be any child process. Also psutil package won't be available in clarifai package

labels = sorted(labels.items(), key=lambda x: int(x[0]))

config_file = os.path.join(self.folder, 'config.yaml')
self.hf_labels_to_config(labels, config_file)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This was throwing error when testing image model locally within container because docker don't have permission to change config file. And we don't need this for testing model

@luv-bansal luv-bansal requested a review from zeiler December 19, 2024 14:03
@luv-bansal luv-bansal enabled auto-merge (squash) December 19, 2024 14:24
@luv-bansal luv-bansal merged commit 2be4814 into master Dec 19, 2024
@luv-bansal luv-bansal deleted the minor-fixes branch December 19, 2024 14:31
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.

2 participants