Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MISTK Logs on Single Machines with Multiple Users #5

Open
dfvankomen opened this issue Sep 23, 2020 · 0 comments
Open

MISTK Logs on Single Machines with Multiple Users #5

dfvankomen opened this issue Sep 23, 2020 · 0 comments

Comments

@dfvankomen
Copy link

To expedite testing of machine learning models, there are multiple users that are installing their own instances of MISTK in virtual environments. Upon running and initializing the class, the following traceback occurred:

Traceback (most recent call last):
 File "/usr/lib/python3.6/logging/config.py", line 565, in configure
  handler = self.configure_handler(handlers[name])
 File "/usr/lib/python3.6/logging/config.py", line 738, in configure_handler
  result = factory(**kwargs)
 File "/usr/lib/python3.6/logging/handlers.py", line 150, in __init__
  BaseRotatingHandler.__init__(self, filename, mode, encoding, delay)
 File "/usr/lib/python3.6/logging/handlers.py", line 57, in __init__
  logging.FileHandler.__init__(self, filename, mode, encoding, delay)
 File "/usr/lib/python3.6/logging/__init__.py", line 1032, in __init__
  StreamHandler.__init__(self, self._open())
 File "/usr/lib/python3.6/logging/__init__.py", line 1061, in _open
  return open(self.baseFilename, self.mode, encoding=self.encoding)
PermissionError: [Errno 13] Permission denied: '/tmp/mistk.log'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
 ...
 File "[VIRTUALENVPATH]/lib/python3.6/site-packages/mistk/__init__.py", line 20, in <module>
  log.config(__name__)
 File "[VIRTUALENVPATH]/lib/python3.6/site-packages/mistk/log/__init__.py", line 65, in config
  logging.config.dictConfig(log_config)
 File "/usr/lib/python3.6/logging/config.py", line 802, in dictConfig
  dictConfigClass(config).configure()
 File "/usr/lib/python3.6/logging/config.py", line 573, in configure
  '%r: %s' % (name, e))
ValueError: Unable to configure handler 'file_handler': [Errno 13] Permission denied: '/tmp/mistk.log'

I've redacted the full path to the virtual environment and when the AbstractModel is built, but the problem is that the user doesn't have permission to write to /tmp/mistk.log which is where the logs are being saved.

I assume this is because another user created the file or is currently writing to the file (since the machine has multiple GPUs multiple users can train models for testing). It looks like that can be changed or some other config file can be read, but the documentation on the ordering of how to do this doesn't exist.

For now, we're editing ../conf/log_config.json to change the path from /tmp but that doesn't seem like a feasible fix in the long run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant