Mr DeepFakes Forums
  • New and improved dark forum theme!
  • Guests can now comment on videos on the tube.
   
Total Likes Received: 17 (0.2 per day | 1.63 percent of total 1043)
(Find All Threads Liked ForFind All Posts Liked For) Total Likes Given: 0 (0 per day | 0 percent of total 1044)
(Find All Liked ThreadsFind All Liked Posts)

Endalus
(LightFaker)
LightFaker

Registration Date: 02-23-2019
Date of Birth: Not Specified
Local Time: 05-19-2019 at 07:11 PM
Status:

Endalus's Most Liked Post
Post Subject Numbers of Likes
Model Backup batch files 2
Thread Subject Forum Name
Model Backup batch files Guides
Post Message
Hi all. I'm paranoid about losing hours of progress on models due to model crashes or the VM I use to train on going down for maintenance unexpectedly during a save cycle, so I wrote a couple batch files to help with backing up models so that I can roll back if something goes bad with the current active model. 

I'm still learning python, so I don't currently know enough to try to edit DFL code directly, but these do alright in the meantime. You can copy this code and save it as a batch file in your workspace directory.

This first one is run manually and will copy your current model to a timestamped backup directory.
Code:
@echo off
set CUR_YYYY=%date:~10,4%
set CUR_MM=%date:~4,2%
set CUR_DD=%date:~7,2%
set CUR_HH=%time:~0,2%
if %CUR_HH% lss 10 (set CUR_HH=0%time:~1,1%)

set CUR_NN=%time:~3,2%
set CUR_SS=%time:~6,2%
set CUR_MS=%time:~9,2%

set SUBFILENAME=Backup-%CUR_YYYY%.%CUR_MM%.%CUR_DD%-%CUR_HH%.%CUR_NN%.%CUR_SS%
mkdir %SUBFILENAME%

xcopy model %SUBFILENAME% /s /e


This second one will backup your model to a timestamped directory every 15 minutes until you close the command window

Code:
:LOOP

set CUR_YYYY=%date:~10,4%
set CUR_MM=%date:~4,2%
set CUR_DD=%date:~7,2%
set CUR_HH=%time:~0,2%
if %CUR_HH% lss 10 (set CUR_HH=0%time:~1,1%)

set CUR_NN=%time:~3,2%
set CUR_SS=%time:~6,2%
set CUR_MS=%time:~9,2%

set SUBFILENAME=Backup-%CUR_YYYY%.%CUR_MM%.%CUR_DD%-%CUR_HH%.%CUR_NN%.%CUR_SS%
mkdir %SUBFILENAME%

xcopy model %SUBFILENAME% /s /e

timeout 900

if not ErrorLevel 1 goto :LOOP

You can also just use windows Task Scheduler to run the manual batch file as a recurring task, but I found that to be kind of flaky, so I just wrote a looping batch file.

Hope this is helpful

Endalus's Forum Info
Joined:
02-23-2019
Last Visit:
Today, 08:54 AM
Total Posts:
44 (0.51 posts per day | 0.73 percent of total posts) Find All Posts
Total Threads:
3 (0.04 threads per day | 0.22 percent of total threads) Find All Threads
Time Spent Online:
3 Weeks, 21 Hours
Thanks/Likes:
Given: 0 | Recieved: 17
Members Referred:
0
Endalus's Contact Details