Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Kaggle Phytoplankton
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
Container 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
Messaoudi Rayan
Kaggle Phytoplankton
Commits
3b063700
Commit
3b063700
authored
2 years ago
by
Yandi
Browse files
Options
Downloads
Patches
Plain Diff
modified create submission to make it work with job batches
parent
fa6f083a
No related branches found
Branches containing commit
No related tags found
1 merge request
!1
Master into main
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
create_submission.py
+2
-2
2 additions, 2 deletions
create_submission.py
logs/RNN_15/best_model.pt
+0
-0
0 additions, 0 deletions
logs/RNN_15/best_model.pt
logs/RNN_16/best_model.pt
+0
-0
0 additions, 0 deletions
logs/RNN_16/best_model.pt
main.py
+1
-1
1 addition, 1 deletion
main.py
with
3 additions
and
3 deletions
create_submission.py
+
2
−
2
View file @
3b063700
...
...
@@ -30,7 +30,7 @@ def dummy_model(X):
# Divided by a magic number
return
X
[:,
:,
4
:].
mean
(
dim
=
2
)
/
26
# This is (B, T)
def
create_submission
(
model
,
transform
,
device
):
def
create_submission
(
model
,
transform
,
device
,
rootDir
):
step_days
=
10
batch_size
=
1024
# We make chunks of num_days consecutive samples; As our dummy predictor
...
...
@@ -57,7 +57,7 @@ def create_submission(model, transform, device):
num_days_test
=
test_loader
.
dataset
.
ntimes
logging
.
info
(
"
= Filling in the submission file
"
)
with
open
(
"
submission.csv
"
,
"
w
"
)
as
fh_submission
:
with
open
(
rootDir
+
"
submission.csv
"
,
"
w
"
)
as
fh_submission
:
fh_submission
.
write
(
"
Id,Predicted
\n
"
)
submission_offset
=
0
...
...
This diff is collapsed.
Click to expand it.
logs/RNN_15/best_model.pt
+
0
−
0
View file @
3b063700
No preview for this file type
This diff is collapsed.
Click to expand it.
logs/RNN_16/best_model.pt
+
0
−
0
View file @
3b063700
No preview for this file type
This diff is collapsed.
Click to expand it.
main.py
+
1
−
1
View file @
3b063700
...
...
@@ -132,4 +132,4 @@ if __name__ == "__main__":
wandb
.
log
({
"
val_loss
"
:
val_loss
})
create_submission
.
create_submission
(
network
,
dataloader
.
composite_transform
(
dataloader
.
transform_remove_space_time
(),
dataloader
.
transform_min_max_scaling
(
MIN
,
MAX
)),
device
)
create_submission
.
create_submission
(
network
,
dataloader
.
composite_transform
(
dataloader
.
transform_remove_space_time
(),
dataloader
.
transform_min_max_scaling
(
MIN
,
MAX
)),
device
,
rootDir
)
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