awslabs / sagemaker-defect-detection Goto Github PK
View Code? Open in Web Editor NEWDetect Defects in Products from their Images using Amazon SageMaker
Home Page: https://awslabs.github.io/sagemaker-defect-detection/
License: Apache License 2.0
Detect Defects in Products from their Images using Amazon SageMaker
Home Page: https://awslabs.github.io/sagemaker-defect-detection/
License: Apache License 2.0
Hi, I am a student trying to do this "Product Defect Detection" solution. I tried 0_demo.iynb
but I got in a Error problem. I can't start this solution because of the CloudFormation issue.
How can I do this github code?? Could you teach me how to make a cloudformation stack with a yaml file???
I really need to run this code ...
Thank you
Describe the bug
A clear and concise description of what the bug is.
In 0_demo.ipynb, the cell that performs the prediction would fail in SageMaker Studio with SageMaker JumpStart PyTorch 1.0 kernel with the following error message:
%%time
# SageMaker 1.x doesn't allow_pickle=True by default
np_load_old = np.load
np.load = lambda *args, **kwargs: np_load_old(*args, allow_pickle=True, **kwargs)
demo_predictions = demo_detector.predict(input)
np.load = np_load_old
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<timed exec> in <module>
/opt/conda/envs/sagemaker-soln/lib/python3.7/site-packages/sagemaker/predictor.py in predict(self, data, initial_args, target_model, target_variant)
121 request_args = self._create_request_args(data, initial_args, target_model, target_variant)
122 response = self.sagemaker_session.sagemaker_runtime_client.invoke_endpoint(**request_args)
--> 123 return self._handle_response(response)
124
125 def _handle_response(self, response):
/opt/conda/envs/sagemaker-soln/lib/python3.7/site-packages/sagemaker/predictor.py in _handle_response(self, response)
130 response_body = response["Body"]
131 content_type = response.get("ContentType", "application/octet-stream")
--> 132 return self.deserializer.deserialize(response_body, content_type)
133
134 def _create_request_args(self, data, initial_args=None, target_model=None, target_variant=None):
/opt/conda/envs/sagemaker-soln/lib/python3.7/site-packages/sagemaker/deserializers.py in deserialize(self, stream, content_type)
223 return np.array(json.load(codecs.getreader("utf-8")(stream)), dtype=self.dtype)
224 if content_type == "application/x-npy":
--> 225 return np.load(io.BytesIO(stream.read()), allow_pickle=self.allow_pickle)
226 finally:
227 stream.close()
<timed exec> in <lambda>(*args, **kwargs)
TypeError: <lambda>() got multiple values for keyword argument 'allow_pickle'
To Reproduce
Steps to reproduce the behavior and error details
In SageMaker Studio, open JumpStart solution browser, launch a Product Defect Detection in Images solution, use SageMaker JumpStart PyTorch 1.0 kernel, execute all cells in the 0_demo.ipynb notebook.
Expected behavior
A clear and concise description of what you expected to happen.
The cell should execute, and return values to demo_predictions
variable.
Additional context
Add any other context about the problem here.
The sagemaker python sdk version: 2.18.0.
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.