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
53fc6f10
Commit
53fc6f10
authored
2 years ago
by
Max Ramsay King
Browse files
Options
Downloads
Patches
Plain Diff
updated react elements
parent
9db06748
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
backend/auto_augmentation/progress.py
+4
-2
4 additions, 2 deletions
backend/auto_augmentation/progress.py
src/App.js
+21
-18
21 additions, 18 deletions
src/App.js
src/pages/Home.js
+47
-1
47 additions, 1 deletion
src/pages/Home.js
with
72 additions
and
21 deletions
backend/auto_augmentation/progress.py
+
4
−
2
View file @
53fc6f10
...
...
@@ -29,7 +29,7 @@ bp = Blueprint("progress", __name__)
def
response
():
# hyperparameters to change
# print("thing: ", request.files['dataset_upload'] )
if
request
.
method
==
'
POST
'
:
exclude_method
=
request
.
form
.
getlist
(
"
action_space
"
)
...
...
@@ -82,8 +82,10 @@ def response():
best_q_values
=
np
.
array
(
best_q_values
)
# save('best_q_values_{}_{}percent_{}.npy'.format(IsLeNet, int(toy_size*100), ds), best_q_values)
#best_q_values = load('best_q_values_{}_{}percent_{}.npy'.format(IsLeNet, int(toy_size*100), ds), allow_pickle=True)
# best_q_values = load('best_q_values_{}_{}percent_{}.npy'.format(IsLeNet, int(toy_size*100), ds), allow_pickle=True)
print
(
"
DONE
"
)
...
...
This diff is collapsed.
Click to expand it.
src/App.js
+
21
−
18
View file @
53fc6f10
...
...
@@ -3,26 +3,29 @@ import './App.css';
import
React
,
{
useState
,
useEffect
}
from
"
react
"
;
import
axios
from
"
axios
"
;
// import {BrowerRouter as Router, Route, Switch} from 'react-router-dom';
function
App
()
{
const
[
formData
,
setFormData
]
=
useState
(
null
)
function
getData
()
{
axios
({
method
:
"
POST
"
,
url
:
"
/profile
"
,
})
.
then
((
response
)
=>
{
const
res
=
response
.
data
setProfileData
(({
profile_name
:
res
.
name
,
about_me
:
res
.
about
}))
}).
catch
((
error
)
=>
{
if
(
error
.
response
)
{
console
.
log
(
error
.
response
)
console
.
log
(
error
.
response
.
status
)
console
.
log
(
error
.
response
.
headers
)
}
})}
// const [formData, setFormData] = useState(null)
// function getData() {
// axios({
// method: "POST",
// url:"/profile",
// })
// .then((response) => {
// const res =response.data
// setProfileData(({
// profile_name: res.name,
// about_me: res.about}))
// }).catch((error) => {
// if (error.response) {
// console.log(error.response)
// console.log(error.response.status)
// console.log(error.response.headers)
// }
// })}
//end of new line
return
(
...
...
This diff is collapsed.
Click to expand it.
src/pages/Home.js
+
47
−
1
View file @
53fc6f10
import
React
from
'
react
'
;
import
React
,
{
useState
,
useEffect
}
from
"
react
"
;
import
axios
from
"
axios
"
;
class
Home
extends
React
.
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
value
:
'
coconut
'
};
this
.
handleChange
=
this
.
handleChange
.
bind
(
this
);
this
.
handleSubmit
=
this
.
handleSubmit
.
bind
(
this
);
}
handleChange
(
event
)
{
this
.
setState
({
value
:
event
.
target
.
value
});
}
handleSubmit
(
event
)
{
alert
(
'
Your favorite flavor is:
'
+
this
.
state
.
value
);
event
.
preventDefault
();
}
render
(){
return
(
<
div
>
...
...
@@ -9,6 +28,33 @@ class Home extends React.Component{
<
form
action
=
"
/user_input
"
method
=
"
POST
"
enctype
=
"
multipart/form-data
"
>
<
label
for
=
"
dataset_upload
"
>
You
can
upload
your
dataset
folder
here
:
<
/label
>
<
input
type
=
"
file
"
id
=
'
dataset_upload
'
name
=
"
dataset_upload
"
class
=
"
upload
"
/><
br
><
/br
>
Or
you
can
select
a
dataset
from
our
database
:
<
br
/>
<
input
type
=
"
radio
"
id
=
"
dataset1
"
name
=
"
dataset_selection
"
value
=
"
MNIST
"
/>
<
label
for
=
"
dataset1
"
>
MNIST
dataset
<
/label><br/
>
<
input
type
=
"
radio
"
id
=
"
dataset2
"
name
=
"
dataset_selection
"
value
=
"
KMNIST
"
/>
<
label
for
=
"
dataset2
"
>
KMNIST
dataset
<
/label><br /
>
<
input
type
=
"
radio
"
id
=
"
dataset3
"
name
=
"
dataset_selection
"
value
=
"
FashionMNIST
"
/>
<
label
for
=
"
dataset3
"
>
FashionMNIST
dataset
<
/label><br /
>
<
input
type
=
"
radio
"
id
=
"
dataset4
"
name
=
"
dataset_selection
"
value
=
"
CIFAR10
"
/>
<
label
for
=
"
dataset4
"
>
CIFAR10
dataset
<
/label><br /
>
<
input
type
=
"
radio
"
id
=
"
dataset5
"
name
=
"
dataset_selection
"
value
=
"
CIFAR100
"
/>
<
label
for
=
"
dataset5
"
>
CIFAR100
dataset
<
/label><br /
>
<
input
type
=
"
radio
"
id
=
"
dataset6
"
name
=
"
dataset_selection
"
value
=
"
Other
"
/>
<
label
for
=
"
dataset6
"
>
Other
dataset
DIFFERENT
<
/label><br /
><
br
/>
<
input
type
=
"
submit
"
><
/input
>
<
/form
>
<
/div
>
...
...
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