Skip to content

Commit

Permalink
Fix problem with relative path in adversarial competition submission
Browse files Browse the repository at this point in the history
validation tool.
  • Loading branch information
AlexeyKurakin committed Aug 31, 2017
1 parent 9fe7f5c commit a093253
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,8 @@ python validate_submission.py \

After run this tool will print whether submission is valid or not.
If submission is invalid then log messages will contain explanation why.

NOTE: This tool might not work properly if file is located on NFS or if
directory containing submission file can't be mounted in Docker using `-v`
command line argument. In such case copy file to different location and try
again.
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,9 @@ def validate_submission(self, filename, submission_type):
logging.error('Invalid submission type: %s', submission_type)
return False
self._prepare_temp_dir()
# Convert filename to be absolute path,
# relative path might cause problems when monting directory in Docker
filename = os.path.abspath(filename)
# extract submission
if not self._extract_submission(filename):
return False
Expand Down

0 comments on commit a093253

Please sign in to comment.