Skip to content

Commit

Permalink
Fixed NLT
Browse files Browse the repository at this point in the history
Signed-off-by: Denis Barakhtanov <dbarahtanov@enakta.com>
  • Loading branch information
0xE0F committed Nov 14, 2024
1 parent 542a1cc commit 76ed7e9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions utils/node_local_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -4532,9 +4532,11 @@ def test_mount_ro(self):
return
raise

def import_torch(self):
def import_torch(self, server):
"""Return a handle to the pydaos.torch module"""
os.environ['D_LOG_MASK'] = 'INFO'
os.environ['DAOS_AGENT_DRPC_DIR'] = server.agent_dir

return importlib.import_module('pydaos.torch')

@needs_dfuse_with_opt(caching_variants=[False])
Expand All @@ -4553,7 +4555,7 @@ def test_torch_map_dataset(self):
with open(file, 'wb') as f:
f.write(tf["content"])

torch = self.import_torch()
torch = self.import_torch(self.server)
dataset = torch.Dataset(pool=self.pool.uuid, cont=self.container.uuid)

assert len(dataset) == len(test_files)
Expand Down Expand Up @@ -4587,7 +4589,7 @@ def test_torch_iter_dataset(self):
with open(file, 'wb') as f:
f.write(tf["content"])

torch = self.import_torch()
torch = self.import_torch(self.server)
dataset = torch.IterableDataset(pool=self.pool.uuid, cont=self.container.uuid)

for content in dataset:
Expand Down

0 comments on commit 76ed7e9

Please sign in to comment.