Closed compor closed 1 year ago
Awesome! Do you invoke this with these arguments?
-f
data/asplos2024_exec_time_with_migration.csv
-i
-c
plots/configs/exec_time_with_migration/stacked_barchart.json
-s
plots/configs/exec_time_with_migration/stacked_barchart.mplstyle
(assuming execution from the npb
folder). Because I get an error:
warning: using default values for colors
Traceback (most recent call last):
File "/home/blackgeorge/Documents/phd/unified_abi/npb/plots/plot_stacked_barchart.py", line 224, in <module>
plot(args.file, args.style, args.config, args.interactive)
File "/home/blackgeorge/Documents/phd/unified_abi/npb/plots/plot_stacked_barchart.py", line 155, in plot
groups_legend = plt.legend(n, group_labels, **groups_legend_params)
File "/home/blackgeorge/Documents/phd/unified_abi/venv/lib/python3.7/site-packages/matplotlib/pyplot.py", line 2665, in legend
return gca().legend(*args, **kwargs)
File "/home/blackgeorge/Documents/phd/unified_abi/venv/lib/python3.7/site-packages/matplotlib/axes/_axes.py", line 305, in legend
self.legend_ = mlegend.Legend(self, handles, labels, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'alignment'
@blackgeorge-boom I added a requirements.txt
for venv activation and also an overhaul/simplification of both plotting scripts.
I'd like to see if I can merge them and more importantly use keyword arguments with the **
operator straight from the JSON config file, hence only changing the configuration files if the matplotlib API changes.
But that's for another PR.
@blackgeorge-boom I've fixed the legend issue and also unified the scripts to just use one.
How do you install this? Running pip install -e .
gives me:
(venv) ❯ pip install -e . unified_abi -> dev-migration-plots ? ! — $
Obtaining file:///home/blackgeorge/Documents/phd/unified_abi
Installing build dependencies ... done
Checking if build backend supports build_editable ... done
Getting requirements to build editable ... error
error: subprocess-exited-with-error
× Getting requirements to build editable did not run successfully.
│ exit code: 1
╰─> [67 lines of output]
/tmp/pip-build-env-px51okwi/overlay/lib/python3.10/site-packages/setuptools/config/pyprojecttoml.py:66: _BetaConfiguration: Support for `[tool.setuptools]` in `pyproject.toml` is still *beta*.
config = read_configuration(filepath, True, ignore_option_errors, dist)
configuration error: `project.scripts.dependencies` must be string
DESCRIPTION:
Reference to a Python object. It is either in the form
``importable.module``, or ``importable.module:object.attr``.
GIVEN VALUE:
[
"contourpy==1.0.7",
"cycler==0.11.0",
"fonttools==4.39.3",
"kiwisolver==1.4.4",
"matplotlib==3.7.1",
"numpy==1.24.2",
"packaging==23.1",
"pandas==2.0.0",
"Pillow==9.5.0",
"pyparsing==3.0.9",
"python-dateutil==2.8.2",
"pytz==2023.3",
"six==1.16.0",
"tzdata==2023.3"
]
OFFENDING RULE: 'type'
DEFINITION:
{
"type": "string",
"format": "python-entrypoint-reference",
"$comment": "https://packaging.python.org/specifications/entry-points/"
}
Traceback (most recent call last):
File "/home/blackgeorge/Documents/phd/unified_abi/venv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/home/blackgeorge/Documents/phd/unified_abi/venv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/home/blackgeorge/Documents/phd/unified_abi/venv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 132, in get_requires_for_build_editable
return hook(config_settings)
File "/tmp/pip-build-env-px51okwi/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 450, in get_requires_for_build_editable
return self.get_requires_for_build_wheel(config_settings)
File "/tmp/pip-build-env-px51okwi/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
File "/tmp/pip-build-env-px51okwi/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires
self.run_setup()
File "/tmp/pip-build-env-px51okwi/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 487, in run_setup
super(_BuildMetaLegacyBackend,
File "/tmp/pip-build-env-px51okwi/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 338, in run_setup
exec(code, locals())
File "<string>", line 1, in <module>
File "/tmp/pip-build-env-px51okwi/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 107, in setup
return distutils.core.setup(**attrs)
File "/tmp/pip-build-env-px51okwi/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 159, in setup
dist.parse_config_files()
File "/home/blackgeorge/Documents/phd/unified_abi/venv/lib/python3.10/site-packages/_virtualenv.py", line 21, in parse_config_files
result = old_parse_config_files(self, *args, **kwargs)
File "/tmp/pip-build-env-px51okwi/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 908, in parse_config_files
pyprojecttoml.apply_configuration(self, filename, ignore_option_errors)
File "/tmp/pip-build-env-px51okwi/overlay/lib/python3.10/site-packages/setuptools/config/pyprojecttoml.py", line 66, in apply_configuration
config = read_configuration(filepath, True, ignore_option_errors, dist)
File "/tmp/pip-build-env-px51okwi/overlay/lib/python3.10/site-packages/setuptools/config/pyprojecttoml.py", line 129, in read_configuration
validate(subset, filepath)
File "/tmp/pip-build-env-px51okwi/overlay/lib/python3.10/site-packages/setuptools/config/pyprojecttoml.py", line 55, in validate
raise ValueError(f"{error}\n{summary}") from None
ValueError: invalid pyproject.toml config: `project.scripts.dependencies`.
configuration error: `project.scripts.dependencies` must be string
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build editable did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
@blackgeorge-boom I think it was my bad; I moved the dependencies at the last minute and they need to be under the [project]
section.
@compor That's great now, thanks for all these changes!! LGTM
This PR adds scripts for stacked bar chart plots and related configs, plus missed migration timing in a benchmark.