Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added minimal-py312-cuda12.4-inference environment #3765

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Tarun-Chevula
Copy link
Contributor

Added minimal-py312-cuda11.8-inference environment

Copy link
Contributor

@vizhur vizhur left a comment

Choose a reason for hiding this comment

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

please complete new image onboarding process

except Exception as e:
error = str(e)

return AMLResponse({'error': error}, 500, json_str=True)

Check warning

Code scanning / CodeQL

Information exposure through an exception Medium test

Stack trace information
flows to this location and may be exposed to an external user.

Copilot Autofix AI about 10 hours ago

To fix the problem, we should avoid sending the exception details directly to the user. Instead, we should log the detailed error message on the server and return a generic error message to the user. This approach ensures that sensitive information is not exposed while still allowing developers to debug issues using the server logs.

  1. Modify the exception handling in the run function to log the exception details.
  2. Return a generic error message to the user instead of the exception details.
Suggested changeset 1
assets/inference/environments/minimal-py312-cuda12.4-inference/tests/src/valid_score.py

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/assets/inference/environments/minimal-py312-cuda12.4-inference/tests/src/valid_score.py b/assets/inference/environments/minimal-py312-cuda12.4-inference/tests/src/valid_score.py
--- a/assets/inference/environments/minimal-py312-cuda12.4-inference/tests/src/valid_score.py
+++ b/assets/inference/environments/minimal-py312-cuda12.4-inference/tests/src/valid_score.py
@@ -31,4 +31,6 @@
     except Exception as e:
-        error = str(e)
+        import traceback
+        error_details = traceback.format_exc()
+        print(f"Error occurred: {error_details}")
 
-        return AMLResponse({'error': error}, 500, json_str=True)
+        return AMLResponse({'error': 'An internal error has occurred.'}, 500, json_str=True)
EOF
@@ -31,4 +31,6 @@
except Exception as e:
error = str(e)
import traceback
error_details = traceback.format_exc()
print(f"Error occurred: {error_details}")

return AMLResponse({'error': error}, 500, json_str=True)
return AMLResponse({'error': 'An internal error has occurred.'}, 500, json_str=True)
Copilot is powered by AI and may make mistakes. Always verify output.
Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
@Tarun-Chevula Tarun-Chevula changed the title Added minimal-py312-cuda11.8-inference environment Added minimal-py312-cuda12.4-inference environment Jan 23, 2025
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