Skip to content

Commit

Permalink
test-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
eatpk committed Jan 28, 2024
1 parent a8eac07 commit 79d94c2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion analog/test/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ logging:
log_dtype: none
num_workers: 1
lora:
init: random
init: pca
parameter_sharing: false
parameter_sharing_groups: null
rank: 64
Expand Down
15 changes: 6 additions & 9 deletions tests/storage/test_util_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,10 @@ def tearDownClass(cls):
shutil.rmtree(cls.test_dir)

def test_write_and_read(self):
data_buffer = [
(i, {"dummy_data": arr}) for i, arr in enumerate(generate_random_arrays())
]
rand_arr = generate_random_arrays()
data_buffer = [(i, {"dummy_data": arr}) for i, arr in enumerate(rand_arr)]
filename = "test_data"
order = ["dummy_data"]
order = [["dummy_data"]]
MemoryMapHandler.write(self.test_dir, filename, data_buffer, order)

mmap = None
Expand All @@ -78,12 +77,10 @@ def test_read(self):
expected_files_path = os.path.join(
os.path.dirname(os.path.abspath(__file__)), "test_mmap_data"
)

static_arr = generate_static_arrays()
filename = "test_data"
data_buffer = [
(i, {"dummy_data": arr}) for i, arr in enumerate(generate_static_arrays())
]
order = ["dummy_data"]
data_buffer = [(i, {"dummy_data": arr}) for i, arr in enumerate(static_arr)]
order = [["dummy_data"]]
MemoryMapHandler.write(expected_files_path, filename, data_buffer, order)
mmap = None
with MemoryMapHandler.read(expected_files_path, filename) as mm:
Expand Down

0 comments on commit 79d94c2

Please sign in to comment.