Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MetaRL
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
Service Desk
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
Wang, Mia
MetaRL
Commits
c4d6923d
Commit
c4d6923d
authored
2 years ago
by
Sun Jin Kim
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of gitlab.doc.ic.ac.uk:yw21218/metarl
parents
084b2463
b764dcf6
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
backend_react/react_app.py
+6
-6
6 additions, 6 deletions
backend_react/react_app.py
src/pages/Confirm.js
+13
-8
13 additions, 8 deletions
src/pages/Confirm.js
src/pages/Home.js
+1
-0
1 addition, 0 deletions
src/pages/Home.js
with
20 additions
and
14 deletions
backend_react/react_app.py
+
6
−
6
View file @
c4d6923d
...
@@ -23,9 +23,9 @@ import os
...
@@ -23,9 +23,9 @@ import os
import
sys
import
sys
sys
.
path
.
insert
(
0
,
os
.
path
.
abspath
(
'
..
'
))
sys
.
path
.
insert
(
0
,
os
.
path
.
abspath
(
'
..
'
))
# import agents and its functions
#
# import agents and its functions
from
..
MetaAugment
import
UCB1_JC_py
as
UCB1_JC
from
MetaAugment
import
UCB1_JC_py
as
UCB1_JC
from
..
MetaAugment.autoaugment_learners
import
evo_learner
from
MetaAugment.autoaugment_learners
import
evo_learner
import
MetaAugment.controller_networks
as
cn
import
MetaAugment.controller_networks
as
cn
import
MetaAugment.autoaugment_learners
as
aal
import
MetaAugment.autoaugment_learners
as
aal
print
(
'
@@@ import successful
'
)
print
(
'
@@@ import successful
'
)
...
@@ -43,8 +43,8 @@ app = Flask(__name__)
...
@@ -43,8 +43,8 @@ app = Flask(__name__)
def
get_form_data
():
def
get_form_data
():
print
(
'
@@@ in Flask Home
'
)
print
(
'
@@@ in Flask Home
'
)
# form_data = request.get_json()
# form_data = request.get_json()
form_data
=
request
.
files
[
'
ds_upload
'
]
#
form_data = request.files['ds_upload']
print
(
'
@@@ form_data
'
,
form_data
)
#
print('@@@ form_data', form_data)
# form_data = request.form.get('test')
# form_data = request.form.get('test')
# print('@@@ this is form data', request.get_data())
# print('@@@ this is form data', request.get_data())
...
@@ -156,7 +156,7 @@ def confirm():
...
@@ -156,7 +156,7 @@ def confirm():
data
=
{
'
ds
'
:
ds
,
'
ds_name
'
:
ds_name
,
'
IsLeNet
'
:
IsLeNet
,
'
ds_folder.filename
'
:
ds_name
,
data
=
{
'
ds
'
:
ds
,
'
ds_name
'
:
ds_name
,
'
IsLeNet
'
:
IsLeNet
,
'
ds_folder.filename
'
:
ds_name
,
'
auto_aug_learner
'
:
auto_aug_learner
,
'
batch_size
'
:
batch_size
,
'
learning_rate
'
:
learning_rate
,
'
auto_aug_learner
'
:
auto_aug_learner
,
'
batch_size
'
:
batch_size
,
'
learning_rate
'
:
learning_rate
,
'
toy_size
'
:
toy_size
,
'
iterations
'
:
iterations
,
}
'
toy_size
'
:
toy_size
,
'
iterations
'
:
iterations
,
}
return
{
'
d
at
a 1
'
:
'
show data
'
}
return
{
'
b
at
ch_size
'
:
'
12
'
}
# ========================================================================
# ========================================================================
@app.route
(
'
/training
'
,
methods
=
[
'
POST
'
,
'
GET
'
])
@app.route
(
'
/training
'
,
methods
=
[
'
POST
'
,
'
GET
'
])
...
...
This diff is collapsed.
Click to expand it.
src/pages/Confirm.js
+
13
−
8
View file @
c4d6923d
...
@@ -4,14 +4,19 @@ import CheckCircleOutlineRoundedIcon from '@mui/icons-material/CheckCircleOutlin
...
@@ -4,14 +4,19 @@ import CheckCircleOutlineRoundedIcon from '@mui/icons-material/CheckCircleOutlin
import
TuneRoundedIcon
from
'
@mui/icons-material/TuneRounded
'
;
import
TuneRoundedIcon
from
'
@mui/icons-material/TuneRounded
'
;
export
default
function
Confirm
()
{
export
default
function
Confirm
()
{
const
[
batchSize
,
setBatchSize
]
=
useState
(
0
)
// // const [myData, setMyData] = useState([{}])
// // const [myData, setMyData] = useState([{}])
// useEffect(async () => {
useEffect
(()
=>
{
// await fetch('/confirm').then(
const
res
=
fetch
(
'
/confirm
'
).
then
(
// response => {console.log('response', response, 'response.json()', response.json()); response.json()}
response
=>
response
.
json
()
// )
).
then
(
data
=>
setBatchSize
(
data
.
batch_size
));
// // .then(data => {console.log('training', data);
// // })
console
.
log
(
"
batchsize
"
,
batchSize
)
// }, []);
// setBatchSize(res.batch_size)
// .then(data => {console.log('training', data);
// })
},
[]);
...
@@ -34,7 +39,7 @@ export default function Confirm() {
...
@@ -34,7 +39,7 @@ export default function Confirm() {
<
ListItemAvatar
>
<
ListItemAvatar
>
<
TuneRoundedIcon
color
=
"
primary
"
fontSize
=
'
large
'
/>
<
TuneRoundedIcon
color
=
"
primary
"
fontSize
=
'
large
'
/>
<
/ListItemAvatar
>
<
/ListItemAvatar
>
<
ListItemText
primary
=
"
Batch size
"
secondary
=
"
[B
atch
s
ize
]
"
/>
<
ListItemText
primary
=
"
Batch size
"
secondary
=
{
b
atch
S
ize
}
/
>
<
/ListItem
>
<
/ListItem
>
<
/Grid
>
<
/Grid
>
<
Grid
xs
=
{
12
}
sm
=
{
6
}
item
>
<
Grid
xs
=
{
12
}
sm
=
{
6
}
item
>
...
...
This diff is collapsed.
Click to expand it.
src/pages/Home.js
+
1
−
0
View file @
c4d6923d
...
@@ -58,6 +58,7 @@ export default function Home() {
...
@@ -58,6 +58,7 @@ export default function Home() {
body
:
formData
body
:
formData
}).
then
((
response
)
=>
response
.
json
());
}).
then
((
response
)
=>
response
.
json
());
console
.
log
(
'
check if it is here
'
)
console
.
log
(
'
check if it is here
'
)
navigate
(
'
/confirm
'
,
{
replace
:
true
});
navigate
(
'
/confirm
'
,
{
replace
:
true
});
//
//
///////// testing
///////// testing
...
...
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