Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mmlf-docker
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Sebastian Höffner
mmlf-docker
Merge requests
!1
WIP: GUI version
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
WIP: GUI version
feature/gui
into
master
Overview
0
Commits
5
Changes
5
Merged
Sebastian Höffner
requested to merge
feature/gui
into
master
5 years ago
Overview
0
Commits
5
Changes
5
Expand
This version uses X-forwarding to start the GUI.
0
0
Merge request reports
Compare
master
version 1
c13a9cff
5 years ago
master (base)
and
version 1
latest version
029727de
5 commits,
5 years ago
version 1
c13a9cff
1 commit,
5 years ago
5 files
+
176
−
6
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
5
Search (e.g. *.vue) (Ctrl+P)
0001-Fixing-yaml.load-calls.patch
0 → 100644
+
78
−
0
Options
From b9338215890fba53ca342a1fff27327b23f867ff Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sebastian=20H=C3=B6ffner?= <info@sebastian-hoeffner.de>
Date: Mon, 13 May 2019 14:48:47 +0200
Subject: [PATCH 1/2] Fixing yaml.load calls.
---
mmlf/__init__.py | 10 +++++-----
mmlf/gui/explorer.py | 6 +++---
mmlf/gui/world_config_editor.py | 4 ++--
3 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/mmlf/__init__.py b/mmlf/__init__.py
index 7fa18c6..60e0a0a 100644
--- a/mmlf/__init__.py
+++ b/mmlf/__init__.py
@@ -164,8 +164,8 @@
def loadWorldFromConfigFile(configPath, useGUI=False):
absConfigPath = configPath
# Load YAML-file
- worldConfigObject = yaml.load(open(absConfigPath, 'r'))
-
+ worldConfigObject = yaml.load(open(absConfigPath, 'r'), Loader=yaml.FullLoader)
+
# Load World
return loadWorld(worldConfigObject, baseUserDir, useGUI=useGUI)
@@ -247,13 +247,13 @@
def loadExperimentConfig(experimentPath):
experimentPath = getRWPath() + os.sep + experimentPath
experimentConfigFile = experimentPath + os.sep + "experiment_config.yaml"
- experimentConf = yaml.load(open(experimentConfigFile, 'r'))
-
+ experimentConf = yaml.load(open(experimentConfigFile, 'r'), Loader=yaml.FullLoader)
+
# Add all worlds specified in this directory to the world list
experimentConf["worlds"] = dict()
worldDir = experimentPath + os.sep + "worlds"
for worldConfFile in glob.glob(worldDir + os.sep + "*.yaml"):
- worldConfigObject = yaml.load(open(worldConfFile, 'r'))
+ worldConfigObject = yaml.load(open(worldConfFile, 'r'), Loader=yaml.FullLoader)
worldName = worldConfFile.split(os.sep)[-1][:-5]
experimentConf["worlds"][worldName] = worldConfigObject
diff --git a/mmlf/gui/explorer.py b/mmlf/gui/explorer.py
index 21a99e6..0f7ec84 100644
--- a/mmlf/gui/explorer.py
+++ b/mmlf/gui/explorer.py
@@ -54,9 +54,9 @@
class MMLFExplorer(QtGui.QWidget):
# Create WorldConfigEditor and load default configuration
from mmlf.gui.world_config_editor import WorldConfigEditor # must be imported lazily!s
self.worldConfigEditor = WorldConfigEditor(self, self.vlayout)
- worldConfig = yaml.load(open(mmlf.getRWPath() + os.sep + "config"
- + os.sep + "mountain_car" + os.sep
- + "world_td_lambda_exploration.yaml"))
+ worldConfig = yaml.load(open(mmlf.getRWPath() + os.sep + "config"
+ + os.sep + "mountain_car" + os.sep
+ + "world_td_lambda_exploration.yaml"), Loader=yaml.FullLoader)
# Add missing entries for the monitor to worldConfig
from mmlf.framework.monitor import Monitor
for key in Monitor.DEFAULT_CONFIG_DICT.keys():
diff --git a/mmlf/gui/world_config_editor.py b/mmlf/gui/world_config_editor.py
index e6d049c..6a3e94a 100644
--- a/mmlf/gui/world_config_editor.py
+++ b/mmlf/gui/world_config_editor.py
@@ -116,8 +116,8 @@
class WorldConfigEditor(object):
mmlf.getRWPath() + os.sep + "config",
"MMLF world config files (*.yaml)"))
if worldConfFile == "": return False # No file was selected
- worldConfig = yaml.load(open(worldConfFile, 'r'))
-
+ worldConfig = yaml.load(open(worldConfFile, 'r'), Loader=yaml.FullLoader)
+
# Add missing entries for the monitor to worldConfig
for key in Monitor.DEFAULT_CONFIG_DICT.keys():
if key not in worldConfig["monitor"]:
--
2.21.0
Loading