Keras Continued

Release 0.2

As release 0.2 comes to an end, I have created my second pull request for keras, continuing my work with creating an import tool. Last week I discussed my issue about only reading keras relevant imports, and implemented the ignore terms array strategy. Using this strategy I began to get one step closer to an optimal result, but was not quite yet done as the tool needed some advancements.

Advancements Needed

One oversight on my end was ignoring comments from the files being read. In python comments follow this syntax

Screen Shot 2019-02-08 at 11.42.08 AM

In the first case it is easy to ignore, to see if a line starts with # and ignore everything following it on that line, the latter however is a bit more complex. In a few of the files in keras, there a multiline comments that contain examples of scripts, and some of these contain import statements within comments as seen below.

Screen Shot 2019-02-08 at 11.46.55 AM

I had to ignore these multiline comments, in order to receive clean and correct results. Following this I took to GitHub to create my pull request in an effort to:

  1. Show the work I have currently done for this tool, and the ideas I have brought forward
  2. Draw attention the (relatively dead) issue I worked on, in order to get some ideas on how to tackle the problems I am facing

Additionally the issue requested this tool be integrated with Travis CI, however I did not want to invest my time and effort into Travis before I knew I was on the right approach and I may end up scrapping everything anyway. The functionality of the script works effectively and can be integrated with Travis if acceptable.

The results

It would seem that the efforts I made in my pull request worked, as I received a comment on the post from gabrieldemarmiesse, the main moderator of the keras project giving me advice on what to work on. It would seem that I am going back to stage one, looking back into AST (abstract search trees), as well as pylint, this time creating custom tests for pylint. This seems like the right approach, and was where I began originally, but did not know about pylint custom tests, and faced problems with AST.

Next steps

The comment is still fresh so I am beginning to look into these tools suggested, and seeing how I can complete this or at least begin working on it. I am proud of the progress I made over this release, and even if the work I did is not being merged, the idea behind it, and the know how to achieve it is just as viable and effective. Open source is a big world, but even the little steps count.

Until next time…

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s