eldrin / mtlmusicrepresentation-pytorch Goto Github PK
View Code? Open in Web Editor NEWCodebase and utilities for using models trained by multiple music related tasks
Codebase and utilities for using models trained by multiple music related tasks
Hi Eldrin,
after reading your paper, I was hoping that I could play with your code a bit, but that appears quite difficult. I'm not entirely sure if a github issue is the best way for this, please let me know if you prefer a different mode of contact. I tried to start by running the scripts/ext_feat.py
script that you mention in the readme. Here is a list of the different issues I'm facing:
DEFAULT_SCALER_REF
in musmtl/model.py
line 9 is broken. I'm getting an AttributeError: module 'importlib.resources' has no attribute 'files'
. However, it appears that pretty much no other place in the code is referencing this, except for line 327 in musmtl/tool.py
and that use is inside a main function that isn't used by the scripts/ext_feat.py
script. So I decided to set DEFAULT_SCALER_REF=None
and move on.TypeError
s in musmtl/utils.py
. All of them are related to type hints and are easy to fix (from typing import Tuple, List
and then tuple[...] -> Tuple[...], list[...] -> List[...]
).musmtl/tool.py
on line 92 uses np.load
on the scaler_fn
, which points to the file models/sclr_dbmel.dat.gz
. Here, I get the following error message:Traceback (most recent call last):
File "scripts/ext_feat.py", line 47, in <module>
for feature, fn in zip(ext.run(model_fns, SCALER_FN), model_fns):
File "/home/ingo/code/MTLMusicRepresentation-PyTorch/scripts/../musmtl/tool.py", line 163, in run
scaler, model = self._load_model(model_fn, scaler_fn, self.device)
File "/home/ingo/code/MTLMusicRepresentation-PyTorch/scripts/../musmtl/tool.py", line 92, in _load_model
with np.load(scaler_fn) as npf:
File "/home/ingo/code/MTLMusicRepresentation-PyTorch/.venv/lib/python3.8/site-packages/numpy/lib/npyio.py", line 445, in load
raise ValueError("Cannot load file containing pickled data "
ValueError: Cannot load file containing pickled data when allow_pickle=False
Of course, I tried to set allow_pickle=True
, but the file doesn't appear to actually be a pickle file:
Traceback (most recent call last):
File "/home/ingo/code/MTLMusicRepresentation-PyTorch/.venv/lib/python3.8/site-packages/numpy/lib/npyio.py", line 448, in load
return pickle.load(fid, **pickle_kwargs)
_pickle.UnpicklingError: invalid load key, '\x1f'.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "scripts/ext_feat.py", line 47, in <module>
for feature, fn in zip(ext.run(model_fns, SCALER_FN), model_fns):
File "/home/ingo/code/MTLMusicRepresentation-PyTorch/scripts/../musmtl/tool.py", line 163, in run
scaler, model = self._load_model(model_fn, scaler_fn, self.device)
File "/home/ingo/code/MTLMusicRepresentation-PyTorch/scripts/../musmtl/tool.py", line 92, in _load_model
with np.load(scaler_fn, allow_pickle=True) as npf:
File "/home/ingo/code/MTLMusicRepresentation-PyTorch/.venv/lib/python3.8/site-packages/numpy/lib/npyio.py", line 450, in load
raise IOError(
OSError: Failed to interpret file 'scripts/../models/sclr_dbmel.dat.gz' as a pickle
I have a feeling that it might be related to line 91 in musmtl/tool.py
, where a joblib load command is commented out, but I don't know how to fit the two together. Can you give me a pointer?
Would it help if I made a pull request with my changes?
Also, I find it very difficult to make sense of the different checkpoints in the data.zip file that the readme references. There are almost 400 checkpoint folders in mtl_dataset/mtlmodel_release
. Which one is good? Which one(s) is the paper based on?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.