8000 Save `keras` primitives in Windows environment · Issue #261 · MLBazaar/MLPrimitives · GitHub
[go: up one dir, main page]

Skip to content

Save keras primitives in Windows environment #261

@sarahmish

Description

@sarahmish
  • MLPrimitives version: 0.2.5
  • Python version: 3.7
  • Operating System: windows 10

Description

Saving any keras based model using the adapter in windows machine, we get the following error

OSError: Unable to create file (unable to open file: name = 'C:\Users\Sarah\AppData\Local\Temp\tmp2ll0lzdn.hdf5', errno = 13, error message = 'Permission denied', flags = 13, o_flags = 302)

In windows, when we create temporary files, we need to explicitly set the permissions of the file in order to write to it. A quick fix to this problem is to set delete=False in the state setting and getting mode.

with tempfile.NamedTemporaryFile(suffix='.hdf5', delete=True) as fd:

Metadata

Metadata

Assignees

Labels

internal improvementThis is an improvement that does not add new functionality

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0