Inspiration -
I wanted to make an AI application using scikit-learn and python. I found the car dataset to be interesting, that using just a minimum number of input features, it could predict the value of a car. I find it fun to experiment with.
What it does - Predicts the value of a car given...
Maintenance Required [4 - Very High, 3 - High, 2 - Med, 1 - Low] Doors [2, 3, 4, 5 (5=5 or more)] Persons [2, 4, 5 (5=5 or more)] Trunk Size [1 - Small, 2 - Med, 3 - High] Safety [3 - High, 2 - Med, 1 - Low]
How I built it -
I build this in python, and I used a database from http://archive.ics.uci.edu/ml/datasets/Car+Evaluation to train. It's a decent amount of data, so it should be reasonably accurate. The model is a feed-forward classification neural network.
Challenges I ran into -
Originally, I created a model that could re-route IP and adhoc networks to a higher efficiency that is currently available. I spent a large amount of time on this project, and it was successful in reducing the load on mobile ad-hoc networks. Unfortunately, acumos was limited to input and output data, and my model relied on custom training data for the user (namely signal dead spots for the AI to map around), and it seemed like acumos wanted pretrained models as microservices. It was unfortunate, but I began to look into datasets that could be turned into pretrained models. I ran across a dataset around the value of cars based on physical attributes, and I liked it because there was a large amount of data (almost 1800 cars) and no data was missing.
My first approach was to use a wrapper on Tensorflow called tflearn. Tflearn is really amazing, as it allows users to create highly complex and advanced networks in a reduced number of lines of code than if it was written in Tensorflow. I created numerous tflearn models that used LSTM layers, and convolutional layer for things like sentiment analysis, natural language processing, and image recognition. Unfortunately, Tflearn saves graph.meta data from tensorflow to a place where acumos could not find it, and I came to the conclusion that Tflearn was not compatible with acumos at this time. Therefore, I had to scrap those projects for acumos.
Then I realized, Tensorflow models did not seem to work. Originally, I wrote pretrained models and tried to have the acumos client find the .tf files and meta data files of the network, but that did not seem to be within the functionality of acumos (I posted a note of the issue to StackOverFlow and confirmed this). Acumos intended Tensorflow to be trained and uploaded in the same program it seems. However, I found that Tensorflow, upon training, relies on data that does not get onboarded correctly. I attempted to onboard Tensorflow models from mac, windows, and Linux, and was ultimately unsuccessful. The .tar file which would load the docker to run the container of the microservice failed because it could not find the graph.meta of the tensorflow model (probably because it got lost upon onboarding with tensorflow). I hypothesized that it could also have to do with windows and mac/Linux directory paths not being compatible (forward slash vs back slash).
I decided to go with scikit-Learn. It seemed to be the toolkit used by the examples on the marketplace already, so I figured it must work (I didn't find any indication that a model was ever successfully onboarded and deployed with tensorflow despite the examples provided). I had never used this tool before, but it was pretty easy to learn, and once I trained it on the car data, I was able to onboard it successfully.
However, here is where things got really tricky. Once it was onboarded successfully, I downloaded the .tar file and ran it in docker. It worked (something I had only dreamed about), but when I attempted to make HTTP post requests to the microservice running locally on my machine, it didn't work. It turns out, that the python acumos platform has a bug. Basically, the HTTP Post wants to send bytes of data to the microservice, and does not want to send a string of data. It sends the data using hexadecimal encoding for each byte, and each data point sent to the service has an index. I was sending 5 data points, and the index in python was '\x20' which python maps to '\n', which is not what the proto3 was looking for. Python does allow for hard coding bytes like 'x20', but anytime it gets treated like a string (for appending, splicing, etc...) it gets converted to its ascii equivalent. I had to develop a work around for this issue, but it was challenging and took a lot of time.
Ultimately, I look forward to when Acumos can clean up these bugs and allow for more complex projects, because I think the idea behind it is actually pretty cool, and they are almost there with it.
Accomplishments that I'm proud of -
Being able to download the model and run it with docker, and being able to upload it to the marketplace, where I hope it will eventually be used by people. Now that I know how onboard models, I'll be able to develop richer AI microservices.
What I learned -
I learned how to use docker, and run programs with containers. Most importantly, I learned how to develop microservices for Acumos, so I can potentially submit more in the future.
What's next for Car Price Predictor -
This project is pretty small and serves more as a hello world to this competition. I tried to make my steps clear in the Readme file, and maybe it'll help others upload their projects. I plan on submitting another project to this competition if I can get it to successfully upload. I personally think its a pretty cool project.
Built With
- acumos
- python
- scikit-learn

Log in or sign up for Devpost to join the conversation.