Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RM4ES Practicals
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sepia-pub
mael
RM4ES Practicals
Commits
d1062d8a
Commit
d1062d8a
authored
1 year ago
by
Maël Madon
Browse files
Options
Downloads
Patches
Plain Diff
evalys and plotting file
parent
2d5ba896
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
default.nix
+93
-40
93 additions, 40 deletions
default.nix
expe/plot.py
+33
-0
33 additions, 0 deletions
expe/plot.py
with
126 additions
and
40 deletions
default.nix
+
93
−
40
View file @
d1062d8a
{
kapack
?
import
{
(
fetchTarball
"https://github.com/oar-team/nur-kapack/archive/master.tar.gz"
)
pkgs
?
import
(
fetchTarball
"https://github.com/NixOS/nixpkgs/archive/refs/tags/23.11.tar.gz"
)
{}
{}
,
batsim
?
kapack
.
batsim
,
kapack
?
import
,
batexpe
?
kapack
.
batexpe
(
fetchTarball
"https://github.com/oar-team/nur-kapack/archive/901a5b656f695f2c82d17c091a55db2318ed3f39.tar.gz"
)
,
python3Packages
?
kapack
.
pkgs
.
python3Packages
{
inherit
pkgs
;}
,
pybatsim-core
?
kapack
.
pybatsim-core
,
python3
?
pkgs
.
python311
,
poetry
?
python3Packages
.
poetry-core
,
python3Packages
?
pkgs
.
python311Packages
# , pybatsim-core ? kapack.pybatsim-core
,
poetry
?
pkgs
.
poetry
}:
}:
let
let
jobs
=
rec
{
jobs
=
rec
{
pkgs
=
kapack
.
pkgs
;
lib
=
pkgs
.
lib
;
pybatsim-example
=
python3Packages
.
buildPythonPackage
rec
{
pname
=
"pybatsim-example"
;
version
=
"local"
;
format
=
"pyproject"
;
src
=
lib
.
sourceByRegex
./sched
[
"^pyproject
\.
toml$"
"^poetry
\.
lock$"
"^.*
\.
py$"
];
buildInputs
=
[
poetry
];
propagatedBuildInputs
=
[
pybatsim-core
];
};
# example shell that enables to run the example scheduler (run `pybatsim rejector` in the shell)
evalys
=
kapack
.
evalys
.
overrideAttrs
(
attr
:
rec
{
example-shell
=
pkgs
.
mkShell
rec
{
name
=
"evalys"
;
buildInputs
=
[
version
=
"d4d47bd2f4d076730b05f1345b1bf9032cd28753"
;
pybatsim-example
src
=
pkgs
.
fetchgit
rec
{
];
url
=
"https://github.com/Mema5/evalys.git"
;
};
rev
=
version
;
sha256
=
"sha256-eHGRNj2xWBoEgG2wvAZUoH1Us5d1yu9emu1Zyyms1JU="
;
};
});
# small shell to dev and test schedulers
# small shell to dev and test schedulers
dev
=
pkgs
.
mkShell
rec
{
dev
=
pkgs
.
mkShell
rec
{
buildInputs
=
[
buildInputs
=
[
pkgs
.
stdenv
.
cc
.
cc
.
lib
#
pkgs.stdenv.cc.cc.lib
poetry
poetry
];
];
shellHook
=
''
cd sched
poetry install
export VIRTUAL_ENV_DISABLE_PROMPT=1
poetry shell
''
;
LD_LIBRARY_PATH
=
"
${
pkgs
.
stdenv
.
cc
.
cc
.
lib
}
/lib"
;
#
LD_LIBRARY_PATH="${pkgs.stdenv.cc.cc.lib}/lib";
};
};
expe
=
pkgs
.
mkShell
rec
{
expe
=
pkgs
.
mkShell
rec
{
buildInputs
=
[
buildInputs
=
[
pkgs
.
stdenv
.
cc
.
cc
.
lib
# pkgs.stdenv.cc.cc.lib
poetry
# poetry
pybatsim-core
# pybatsim-core
batsim
# kapack.batsim
batexpe
# batexpe
# nixpkgs.qt6.qtbase
# nixpkgs.qt5.qtbase
(
python3
.
withPackages
(
ps
:
with
ps
;
with
python3Packages
;
[
# jupyter ipython
numpy
matplotlib
# plotly pip tabulate pytz isodate ordered-set yattag
])
)
evalys
];
# QT_PLUGIN_PATH = with pkgs.libsForQt5.qt5; "${qtbase}/${qtbase.qtPluginPrefix}";
QT_QPA_PLATFORM_PLUGIN_PATH
=
with
pkgs
.
libsForQt5
.
qt5
;
"
${
qtbase
.
bin
}
/lib/qt-
${
qtbase
.
version
}
/plugins/platforms"
;
# shellHook = ''
# QT_QPA_PLATFORM_PLUGIN_PATH="${qt6.qtbase.bin}/lib/qt-${qt6.qtbase.version}/plugins/platforms";
# '';
# nativeBuildInputs = [ nixpkgs.qt6.wrapQtAppsHook ];
};
test
=
pkgs
.
mkShell
rec
{
buildInputs
=
[
(
python3
.
withPackages
(
ps
:
with
ps
;
with
python3Packages
;
[
matplotlib
])
)
];
];
# QT_PLUGIN_PATH = with nixpkgs.libsForQt5.qt5; "${qtbase}/${qtbase.qtPluginPrefix}";
# QT_QPA_PLATFORM_PLUGIN_PATH= with nixpkgs.libsForQt5.qt5; "${qtbase.bin}/lib/qt-${qtbase.version}/plugins/platforms";
# shellHook = ''
# QT_QPA_PLATFORM_PLUGIN_PATH="${qt6.qtbase.bin}/lib/qt-${qt6.qtbase.version}/plugins/platforms";
# '';
# nativeBuildInputs = [ nixpkgs.qt6.wrapQtAppsHook ];
};
};
# lib = pkgs.lib;
# pybatsim-example = python3Packages.buildPythonPackage rec {
# pname = "pybatsim-example";
# version = "local";
# format = "pyproject";
# src = lib.sourceByRegex ./sched [
# "^pyproject\.toml$"
# "^poetry\.lock$"
# "^.*\.py$"
# ];
# buildInputs = [
# poetry
# ];
# propagatedBuildInputs = [
# pybatsim-core
# ];
# };
# # example shell that enables to run the example scheduler (run `pybatsim rejector` in the shell)
# example-shell = pkgs.mkShell rec {
# buildInputs = [
# pybatsim-example
# ];
# };
};
};
...
...
This diff is collapsed.
Click to expand it.
expe/plot.py
0 → 100644
+
33
−
0
View file @
d1062d8a
from
evalys.jobset
import
JobSet
import
matplotlib.pyplot
as
plt
import
argparse
def
plot
(
input
,
output
,
noDisplay
):
js
=
JobSet
.
from_csv
(
input
)
js
.
plot
(
with_details
=
True
)
if
output
is
not
None
:
plt
.
savefig
(
output
)
if
not
noDisplay
:
plt
.
show
()
def
main
():
parser
=
argparse
.
ArgumentParser
(
description
=
"
Reads a SWF (Standard Workload Format) file and transform
"
"
it into a JSON Batsim workload (with delay jobs)
"
)
parser
.
add_argument
(
'
input_csv
'
,
type
=
str
,
help
=
'
The input jobs.csv file
'
)
parser
.
add_argument
(
'
-o
'
,
'
--output_pdf
'
,
type
=
str
,
default
=
None
,
help
=
'
The output PDF file
'
)
parser
.
add_argument
(
'
--noDisplay
'
,
action
=
"
store_true
"
,
help
=
'
If set, will not pop-up the graph
'
)
args
=
parser
.
parse_args
()
plot
(
args
.
input_csv
,
args
.
output_pdf
,
args
.
noDisplay
)
if
__name__
==
"
__main__
"
:
main
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment