My Model Is Stuck in a Loop—And So Am I

Ethan w -

Hi everyone! Welcome back to week 6 of my blog.

Last week, I took a step back from experimentation and caught up on reading while my lab focused on a major conference deadline. I read Deep Imbalanced Regression via Hierarchical Classification Adjustment, which introduced a multi-level classification structure as an alternative to smoothing approaches. I also continued Deep Learning by Goodfellow, Bengio, and Courville which went into probability, information theory, and optimization.

This week, I implemented the file name change solution that my mentor recommended last week that would prevent the file access errors from parallel processes. Instead of overwriting the folder to update it, the code would create new checkpoint folders for updates. However, I ran into an unexpected issue. It seems like an empty folder is created at the start of training before any actual training is done and the parallel process overlaps on that initial folder. This creates a loop where they overlap and then a new folder is created and they overlap again. Now, I am more confident that it is an issue with specifically how Python on Windows handles file access and process management compared to Linux. Specifically how Windows locks files that are open and how python uses spawn() instead of fork() to generate new processes. Since there is no simple way to get Windows to behave like Linux, I will either run a VM in Linux or look to adjust the code to work well in windows.

Besides troubleshooting, I also began coding the extension of LDS and FDS to 2D. The code creates a 2D density histogram and uses a 2D gaussian kernel to smoothing the distributions. While I haven’t completed the implementation or obtained results, I’ll experiment in upcoming weeks to optimize the model.

Next week, I hope to fully resolve this parallel processing issue and if it doesn’t work, I will move towards moving into a Linux VM. Stay tuned!

More Posts

Comments:

All viewpoints are welcome but profane, threatening, disrespectful, or harassing comments will not be tolerated and are subject to moderation up to, and including, full deletion.

    Shelby Kilmer-Webb
    Hi Ethan! Great post. Windows is one of my least favorite OS for programming. I didn't know about these Windows issues with file access, so now I have another reason to dislike Windows, haha. Sorry to hear it's been such a pain, but glad you're figuring it out and moving forward! Sounds like it was an insightful learning opportunity.
    daniel_j
    Nice progress Ethan! That Windows vs. Linux issue sounds tricky, but I'm sure you can figure it out. Excited to see how the 2D extension turns out!
    Anonymous
    I’m excited to see how using a Linux VM could further your project!
    Siddharth Patil
    I’m excited to see how using a Linux VM could further your project!
    Ethan Wei
    Thanks Mrs. KW! Yeah dealing with these Windows quirks definitely add a layer of challenge. I am moving towards Linux right now actually!
    Ethan Wei
    Thanks Daniel! Me too!
    Ethan Wei
    Thanks Sid!
    annie_c
    Ethan, wow, this was such an insightful update! I really appreciate how clearly you explained the nuances of the parallel processing issue—your observations about the differences between how Python handles processes on Windows vs. Linux are super valuable (and honestly...relatable 🤓). It’s impressive how you're approaching the problem from both a technical and practical angle. :) Your exploration into extending LDS and FDS to 2D sounds really exciting, too. I’m looking forward to seeing your results! Keep up the amazing work—your ability to balance reading, coding, and troubleshooting is super inspiring. I'll definitely stay tuned!
    ethan_w
    Wow thanks Annie!

Leave a Reply

Your email address will not be published. Required fields are marked *